From: Carmelo AMOROSO Date: Tue, 24 Aug 2010 04:01:13 +0000 (+0200) Subject: insmod: Do not add a pair of "" around the arguments of the module. X-Git-Tag: 1_18_0~308 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=1396221d5a741ef8e1e8abca88836b341a3cab84;p=oweals%2Fbusybox.git insmod: Do not add a pair of "" around the arguments of the module. If there are some spaces in the insmod command line, then this will be splitted in single words as separate elements of argv. It just needs to chain them together in the options string passed to the sys_init_module syscall. Signed-off-by: Carmelo Amoroso Signed-off-by: Denys Vlasenko --- diff --git a/modutils/modutils.c b/modutils/modutils.c index 2608182a1..cc718dbca 100644 --- a/modutils/modutils.c +++ b/modutils/modutils.c @@ -71,8 +71,7 @@ char* FAST_FUNC parse_cmdline_module_options(char **argv) optlen = 0; while (*++argv) { options = xrealloc(options, optlen + 2 + strlen(*argv) + 2); - /* Spaces handled by "" pairs, but no way of escaping quotes */ - optlen += sprintf(options + optlen, (strchr(*argv, ' ') ? "\"%s\" " : "%s "), *argv); + optlen += sprintf(options + optlen, "%s ", *argv); } return options; }