diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2011-02-01 23:24:25 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2011-02-01 23:24:25 +0100 |
commit | 8ae386bf195c6ea53232bacd2eb8cf26676962e4 (patch) | |
tree | d3588803f6aa8e905710466f33ffc8bcc90ec290 | |
parent | 55ae0e9238e1979f0200700ec5dbd0df8d32f7a2 (diff) | |
download | busybox-w32-8ae386bf195c6ea53232bacd2eb8cf26676962e4.tar.gz busybox-w32-8ae386bf195c6ea53232bacd2eb8cf26676962e4.tar.bz2 busybox-w32-8ae386bf195c6ea53232bacd2eb8cf26676962e4.zip |
revert commit 1396221d5a741ef8e1e8abca88836b341a3cab84
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-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 565d0d22f..415dbbe44 100644 --- a/modutils/modutils.c +++ b/modutils/modutils.c | |||
@@ -71,12 +71,11 @@ char* FAST_FUNC parse_cmdline_module_options(char **argv) | |||
71 | optlen = 0; | 71 | optlen = 0; |
72 | while (*++argv) { | 72 | while (*++argv) { |
73 | options = xrealloc(options, optlen + 2 + strlen(*argv) + 2); | 73 | options = xrealloc(options, optlen + 2 + strlen(*argv) + 2); |
74 | /* Older versions were enclosing space-containing *argv in "", | 74 | /* Spaces handled by "" pairs, but no way of escaping quotes */ |
75 | * but both modprobe and insmod from module-init-tools 3.11.1 | 75 | //TODO: module-init-tools version 3.11.1 quotes only value: |
76 | * don't do this anymore. (As to extra trailing space, | 76 | //it generates var="val with spaces", not "var=val with spaces" |
77 | * insmod adds it but modprobe does not. We do in both cases) | 77 | //(and it won't quote var *name* even if it has spaces) |
78 | */ | 78 | optlen += sprintf(options + optlen, (strchr(*argv, ' ') ? "\"%s\" " : "%s "), *argv); |
79 | optlen += sprintf(options + optlen, "%s ", *argv); | ||
80 | } | 79 | } |
81 | return options; | 80 | return options; |
82 | } | 81 | } |