Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
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;