summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorGustavo Zacarias <gustavo@zacarias.com.ar>2011-02-03 17:45:56 -0300
committerPeter Korsgaard <jacmet@sunsite.dk>2011-02-04 19:49:33 +0100
commit9384f00cce18077bb32494489f5b9e37ff5564e3 (patch)
treec1d7adadfa4f28a70e6823a8fefc821cb861d9f2 /package
parentc18c1d667afb3cdc1e1cd177a4b2d5ad77203731 (diff)
busybox: add 1.18.2 modprobe fix
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package')
-rw-r--r--package/busybox/busybox-1.18.2/busybox-1.18.2-modprobe.patch20
1 files changed, 20 insertions, 0 deletions
diff --git a/package/busybox/busybox-1.18.2/busybox-1.18.2-modprobe.patch b/package/busybox/busybox-1.18.2/busybox-1.18.2-modprobe.patch
new file mode 100644
index 000000000..cad887e05
--- /dev/null
+++ b/package/busybox/busybox-1.18.2/busybox-1.18.2-modprobe.patch
@@ -0,0 +1,20 @@
+--- busybox-1.18.2/modutils/modutils.c
++++ busybox-1.18.2-modprobe/modutils/modutils.c
+@@ -71,12 +71,11 @@ char* FAST_FUNC parse_cmdline_module_opt
+ optlen = 0;
+ while (*++argv) {
+ options = xrealloc(options, optlen + 2 + strlen(*argv) + 2);
+- /* Older versions were enclosing space-containing *argv in "",
+- * but both modprobe and insmod from module-init-tools 3.11.1
+- * don't do this anymore. (As to extra trailing space,
+- * insmod adds it but modprobe does not. We do in both cases)
+- */
+- optlen += sprintf(options + optlen, "%s ", *argv);
++ /* Spaces handled by "" pairs, but no way of escaping quotes */
++//TODO: module-init-tools version 3.11.1 quotes only value:
++//it generates var="val with spaces", not "var=val with spaces"
++//(and it won't quote var *name* even if it has spaces)
++ optlen += sprintf(options + optlen, (strchr(*argv, ' ') ? "\"%s\" " : "%s "), *argv);
+ }
+ return options;
+ }