From 1cd0d8600524de01d643db32bc05f4d4d0c30436 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Wed, 25 Aug 2010 18:26:46 +0200 Subject: modutils: explain why we no longer quote params Signed-off-by: Denys Vlasenko --- modutils/modutils.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modutils/modutils.c b/modutils/modutils.c index cc718db..565d0d2 100644 --- a/modutils/modutils.c +++ b/modutils/modutils.c @@ -71,6 +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); } return options; -- cgit v1.1