1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-07-20 15:32:13 +03:00
openwrt-xburst/package/busybox/patches/910-insmod-q-flag.patch
nbd 3564c671b1 busybox: refresh patches
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@26738 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-04-20 02:56:23 +00:00

34 lines
876 B
Diff

--- a/modutils/insmod.c
+++ b/modutils/insmod.c
@@ -133,7 +133,7 @@ int insmod_main(int argc, char **argv) M
int insmod_main(int argc UNUSED_PARAM, char **argv)
{
char *filename;
- int rc;
+ int rc, opt;
/* Compat note:
* 2.6 style insmod has no options and required filename
@@ -143,10 +143,8 @@ int insmod_main(int argc UNUSED_PARAM, c
* or in $MODPATH.
*/
- IF_FEATURE_2_4_MODULES(
- getopt32(argv, INSMOD_OPTS INSMOD_ARGS);
- argv += optind - 1;
- );
+ opt = getopt32(argv, INSMOD_OPTS, NULL, NULL);
+ argv += optind - 1;
filename = *++argv;
if (!filename)
@@ -157,7 +155,7 @@ int insmod_main(int argc UNUSED_PARAM, c
goto done;
rc = bb_init_module(g_filename, parse_cmdline_module_options(argv));
- if (rc)
+ if (rc && !(opt & INSMOD_OPT_SILENT))
bb_error_msg("can't insert '%s': %s", filename, moderror(rc));
free (g_filename);