Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.busybox.net/busybox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarmelo AMOROSO <carmelo.amoroso@st.com>2010-08-24 08:01:13 +0400
committerDenys Vlasenko <dvlasenk@redhat.com>2010-08-25 20:19:22 +0400
commit1396221d5a741ef8e1e8abca88836b341a3cab84 (patch)
tree47b26d4fdbe7766b0a68942675955dc602a84d7d /modutils/modutils.c
parent6f32ea4039535c48759a217fd6352193846a393c (diff)
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 <carmelo.amoroso@st.com> Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'modutils/modutils.c')
-rw-r--r--modutils/modutils.c3
1 files changed, 1 insertions, 2 deletions
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;
}