From: Denys Vlasenko Date: Tue, 1 Feb 2011 22:24:25 +0000 (+0100) Subject: revert commit 1396221d5a741ef8e1e8abca88836b341a3cab84 X-Git-Tag: 1_19_0~354 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8ae386bf195c6ea53232bacd2eb8cf26676962e4;p=platform%2Fupstream%2Fbusybox.git revert commit 1396221d5a741ef8e1e8abca88836b341a3cab84 Signed-off-by: Denys Vlasenko --- 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; }