multicall: do not call getopt_long() inside the stub applet
This commit is contained in:
parent
9715b41c28
commit
46bb0565fa
1 changed files with 6 additions and 4 deletions
|
@ -73,6 +73,8 @@ applet_cmp(const void *a, const void *b)
|
|||
|
||||
void multicall_usage(int status) __attribute__((noreturn));
|
||||
|
||||
struct if_applet ifupdown_applet;
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
|
@ -92,9 +94,11 @@ main(int argc, char *argv[])
|
|||
}
|
||||
|
||||
self_applet = *app;
|
||||
process_options(*app, argc, argv);
|
||||
|
||||
return (*app)->main(argc, argv);
|
||||
if (self_applet != &ifupdown_applet)
|
||||
process_options(*app, argc, argv);
|
||||
|
||||
return self_applet->main(argc, argv);
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -106,8 +110,6 @@ multicall_main(int argc, char *argv[])
|
|||
return main(argc - 1, argv + 1);
|
||||
}
|
||||
|
||||
struct if_applet ifupdown_applet;
|
||||
|
||||
void
|
||||
multicall_usage(int status)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue