ath9k: rework tx power handling - display the correct *current* tx power, and also...
[openwrt-10.03/.git] / package / busybox / patches / 910-insmod-q-flag.patch
1 --- a/modutils/insmod.c
2 +++ b/modutils/insmod.c
3 @@ -107,7 +107,7 @@ int insmod_main(int argc, char **argv) M
4  int insmod_main(int argc UNUSED_PARAM, char **argv)
5  {
6         char *filename;
7 -       int rc;
8 +       int rc, opt;
9  
10         /* Compat note:
11          * 2.6 style insmod has no options and required filename
12 @@ -117,10 +117,8 @@ int insmod_main(int argc UNUSED_PARAM, c
13          * or in $MODPATH.
14          */
15  
16 -       IF_FEATURE_2_4_MODULES(
17 -               getopt32(argv, INSMOD_OPTS INSMOD_ARGS);
18 -               argv += optind - 1;
19 -       );
20 +       opt = getopt32(argv, INSMOD_OPTS, NULL, NULL);
21 +       argv += optind - 1;
22  
23         filename = *++argv;
24         if (!filename)
25 @@ -131,7 +129,7 @@ int insmod_main(int argc UNUSED_PARAM, c
26                         goto done;
27  
28         rc = bb_init_module(g_filename, parse_cmdline_module_options(argv));
29 -       if (rc)
30 +       if (rc && !(opt & INSMOD_OPT_SILENT))
31                 bb_error_msg("can't insert '%s': %s", filename, moderror(rc));
32         free (g_filename);
33