aboutsummaryrefslogtreecommitdiffstats
path: root/package/busybox
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2010-02-24 23:59:46 +0000
committerJo-Philipp Wich <jow@openwrt.org>2010-02-24 23:59:46 +0000
commitfb96235ea5a4b936fd11d8305a71f6d3c6c82cd5 (patch)
tree6f5fb2b06309e838695659aaf4f9527fdb698136 /package/busybox
parentba29f080085d9e71f9e9469aba3d966f3fbda349 (diff)
downloadupstream-fb96235ea5a4b936fd11d8305a71f6d3c6c82cd5.tar.gz
upstream-fb96235ea5a4b936fd11d8305a71f6d3c6c82cd5.tar.bz2
upstream-fb96235ea5a4b936fd11d8305a71f6d3c6c82cd5.zip
busybox: implement -q flag for insmod for Linux 2.6 and actually suppress errors when the flag is specified, part 2 of the iptables modprobe fix
SVN-Revision: 19851
Diffstat (limited to 'package/busybox')
-rw-r--r--package/busybox/patches/910-insmod-q-flag.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/package/busybox/patches/910-insmod-q-flag.patch b/package/busybox/patches/910-insmod-q-flag.patch
new file mode 100644
index 0000000000..846b3df56f
--- /dev/null
+++ b/package/busybox/patches/910-insmod-q-flag.patch
@@ -0,0 +1,33 @@
+--- a/modutils/insmod.c
++++ b/modutils/insmod.c
+@@ -107,7 +107,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
+@@ -117,10 +117,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)
+@@ -131,7 +129,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);
+