package/busybox: add missing bits from 1.17.1 update (mostly config stuff), rename...
[openwrt.git] / package / busybox / patches / 910-insmod-q-flag.patch
1 --- a/modutils/insmod.c
2 +++ b/modutils/insmod.c
3 @@ -129,7 +129,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 @@ -139,10 +139,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 @@ -153,7 +151,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
This page took 0.060476 seconds and 5 git commands to generate.