mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-08-01 07:27:43 +00:00
busybox: add 1.18.2 modprobe fix
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
This commit is contained in:
parent
c18c1d667a
commit
9384f00cce
20
package/busybox/busybox-1.18.2/busybox-1.18.2-modprobe.patch
Normal file
20
package/busybox/busybox-1.18.2/busybox-1.18.2-modprobe.patch
Normal file
@ -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;
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user