]> git.ipfire.org Git - thirdparty/kmod.git/commitdiff
kmod_config: fix kcmd line parser with dots after =
authorLucas De Marchi <lucas.demarchi@profusion.mobi>
Tue, 20 Dec 2011 15:25:24 +0000 (13:25 -0200)
committerLucas De Marchi <lucas.demarchi@profusion.mobi>
Tue, 20 Dec 2011 15:25:24 +0000 (13:25 -0200)
Check if '=' appeared before the dot. In this case, it's not a valid
module option in kernel command line.

The command line that was failing is:

"root=/dev/sda3 ro pcie_aspm=force init=/sbin/bootchartd
initrd=../initramfs-linux.img BOOT_IMAGE=../vmlinuz-linux"

libkmod/libkmod-config.c

index 170d1338882d041f8f6293011395c4997a70d1f4..dd83c859c044285811e611370c45d709d84fdf02 100644 (file)
@@ -460,7 +460,8 @@ static int kmod_config_parse_kcmdline(struct kmod_config *config)
                        param = p + 1;
                        break;
                case '=':
-                       value = p + 1;
+                       if (param != NULL)
+                               value = p + 1;
                        break;
                }
        }