From 66f3228d17d66d7e2dd484427259290fbc82b2f0 Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Mon, 8 Oct 2012 19:04:16 -0300 Subject: [PATCH] libkmod: Add support for '.' in module parameter on kcmdline Otherwise we fail to parse arguments in kernel command line like testmodule.testparam=1.5G Suggested-by: Selim T. Erdogan --- libkmod/libkmod-config.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libkmod/libkmod-config.c b/libkmod/libkmod-config.c index 70044f0..398468e 100644 --- a/libkmod/libkmod-config.c +++ b/libkmod/libkmod-config.c @@ -567,8 +567,10 @@ static int kmod_config_parse_kcmdline(struct kmod_config *config) modname = p + 1; break; case '.': - *p = '\0'; - param = p + 1; + if (param == NULL) { + *p = '\0'; + param = p + 1; + } break; case '=': if (param != NULL) -- 1.7.12.4