mirror of
https://git.busybox.net/busybox
synced 2026-01-31 16:43:21 +00:00
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>
This commit is contained in:
parent
6f32ea4039
commit
1396221d5a
1 changed files with 1 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue