mirror of
https://github.com/sheumann/hush.git
synced 2024-12-22 14:30:31 +00:00
build system: fix a few warnings for allnoconfig build
Not that allnoconfig build is useful in any way... Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
1b0dcc02dd
commit
f4f8fe841c
@ -90,6 +90,8 @@ int main(void)
|
|||||||
printf("%s\n\n", usage_array[i].aname);
|
printf("%s\n\n", usage_array[i].aname);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
printf("=back\n\n");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
=back
|
|
||||||
|
|
||||||
=head1 LIBC NSS
|
=head1 LIBC NSS
|
||||||
|
|
||||||
GNU Libc (glibc) uses the Name Service Switch (NSS) to configure the behavior
|
GNU Libc (glibc) uses the Name Service Switch (NSS) to configure the behavior
|
||||||
|
@ -841,6 +841,7 @@ static int busybox_main(char **argv)
|
|||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
|
# if NUM_APPLETS > 0
|
||||||
void FAST_FUNC run_applet_no_and_exit(int applet_no, char **argv)
|
void FAST_FUNC run_applet_no_and_exit(int applet_no, char **argv)
|
||||||
{
|
{
|
||||||
int argc = 1;
|
int argc = 1;
|
||||||
@ -858,15 +859,15 @@ void FAST_FUNC run_applet_no_and_exit(int applet_no, char **argv)
|
|||||||
* "true" and "false" are also special.
|
* "true" and "false" are also special.
|
||||||
*/
|
*/
|
||||||
if (1
|
if (1
|
||||||
#if defined APPLET_NO_test
|
# if defined APPLET_NO_test
|
||||||
&& applet_no != APPLET_NO_test
|
&& applet_no != APPLET_NO_test
|
||||||
#endif
|
# endif
|
||||||
#if defined APPLET_NO_true
|
# if defined APPLET_NO_true
|
||||||
&& applet_no != APPLET_NO_true
|
&& applet_no != APPLET_NO_true
|
||||||
#endif
|
# endif
|
||||||
#if defined APPLET_NO_false
|
# if defined APPLET_NO_false
|
||||||
&& applet_no != APPLET_NO_false
|
&& applet_no != APPLET_NO_false
|
||||||
#endif
|
# endif
|
||||||
) {
|
) {
|
||||||
if (argc == 2 && strcmp(argv[1], "--help") == 0) {
|
if (argc == 2 && strcmp(argv[1], "--help") == 0) {
|
||||||
/* Make "foo --help" exit with 0: */
|
/* Make "foo --help" exit with 0: */
|
||||||
@ -878,19 +879,22 @@ void FAST_FUNC run_applet_no_and_exit(int applet_no, char **argv)
|
|||||||
check_suid(applet_no);
|
check_suid(applet_no);
|
||||||
exit(applet_main[applet_no](argc, argv));
|
exit(applet_main[applet_no](argc, argv));
|
||||||
}
|
}
|
||||||
|
# endif /* NUM_APPLETS > 0 */
|
||||||
|
|
||||||
static NORETURN void run_applet_and_exit(const char *name, char **argv)
|
static NORETURN void run_applet_and_exit(const char *name, char **argv)
|
||||||
{
|
{
|
||||||
int applet;
|
|
||||||
|
|
||||||
# if ENABLE_BUSYBOX
|
# if ENABLE_BUSYBOX
|
||||||
if (is_prefixed_with(name, "busybox"))
|
if (is_prefixed_with(name, "busybox"))
|
||||||
exit(busybox_main(argv));
|
exit(busybox_main(argv));
|
||||||
# endif
|
# endif
|
||||||
|
# if NUM_APPLETS > 0
|
||||||
/* find_applet_by_name() search is more expensive, so goes second */
|
/* find_applet_by_name() search is more expensive, so goes second */
|
||||||
applet = find_applet_by_name(name);
|
{
|
||||||
if (applet >= 0)
|
int applet = find_applet_by_name(name);
|
||||||
run_applet_no_and_exit(applet, argv);
|
if (applet >= 0)
|
||||||
|
run_applet_no_and_exit(applet, argv);
|
||||||
|
}
|
||||||
|
# endif
|
||||||
|
|
||||||
/*bb_error_msg_and_die("applet not found"); - links in printf */
|
/*bb_error_msg_and_die("applet not found"); - links in printf */
|
||||||
full_write2_str(applet_name);
|
full_write2_str(applet_name);
|
||||||
@ -957,10 +961,10 @@ int main(int argc UNUSED_PARAM, char **argv)
|
|||||||
#else
|
#else
|
||||||
lbb_prepare("busybox" IF_FEATURE_INDIVIDUAL(, argv));
|
lbb_prepare("busybox" IF_FEATURE_INDIVIDUAL(, argv));
|
||||||
|
|
||||||
#if !ENABLE_BUSYBOX
|
# if !ENABLE_BUSYBOX
|
||||||
if (argv[1] && is_prefixed_with(bb_basename(argv[0]), "busybox"))
|
if (argv[1] && is_prefixed_with(bb_basename(argv[0]), "busybox"))
|
||||||
argv++;
|
argv++;
|
||||||
#endif
|
# endif
|
||||||
applet_name = argv[0];
|
applet_name = argv[0];
|
||||||
if (applet_name[0] == '-')
|
if (applet_name[0] == '-')
|
||||||
applet_name++;
|
applet_name++;
|
||||||
|
Loading…
Reference in New Issue
Block a user