diff options
author | Denys Vlasenko | 2011-02-08 18:34:03 +0100 |
---|---|---|
committer | Denys Vlasenko | 2011-02-08 18:34:03 +0100 |
commit | 92e531458a6c0e6464fbdc1463f91edc7fb752c7 (patch) | |
tree | 72062fc0e07619658d45b88172f230fc0ab34422 /modutils/modutils.c | |
parent | 12d97b66805f87e535962963e858fc2422ffdbc7 (diff) | |
download | busybox-1_18_3.zip busybox-1_18_3.tar.gz |
Apply post-1.18.2 fixes, bump version to 1.18.31_18_3
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'modutils/modutils.c')
-rw-r--r-- | modutils/modutils.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/modutils/modutils.c b/modutils/modutils.c index 565d0d2..415dbbe 100644 --- a/modutils/modutils.c +++ b/modutils/modutils.c @@ -71,12 +71,11 @@ char* FAST_FUNC parse_cmdline_module_options(char **argv) 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; } |