2010-02-25 01:59:46 +02:00
|
|
|
--- a/modutils/insmod.c
|
|
|
|
+++ b/modutils/insmod.c
|
2011-04-20 05:56:23 +03:00
|
|
|
@@ -133,7 +133,7 @@ int insmod_main(int argc, char **argv) M
|
2010-02-25 01:59:46 +02:00
|
|
|
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
|
2011-04-20 05:56:23 +03:00
|
|
|
@@ -143,10 +143,8 @@ int insmod_main(int argc UNUSED_PARAM, c
|
2010-02-25 01:59:46 +02:00
|
|
|
* 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)
|
2011-04-20 05:56:23 +03:00
|
|
|
@@ -157,7 +155,7 @@ int insmod_main(int argc UNUSED_PARAM, c
|
2010-02-25 01:59:46 +02:00
|
|
|
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);
|
|
|
|
|