]> git.ipfire.org Git - thirdparty/kmod.git/commitdiff
libkmod: Add support for '.' in module parameter on kcmdline
authorLucas De Marchi <lucas.demarchi@profusion.mobi>
Mon, 8 Oct 2012 22:04:16 +0000 (19:04 -0300)
committerLucas De Marchi <lucas.demarchi@profusion.mobi>
Tue, 9 Oct 2012 12:56:50 +0000 (09:56 -0300)
Otherwise we fail to parse arguments in kernel command line like
testmodule.testparam=1.5G

Suggested-by: Selim T. Erdogan <selim@alumni.cs.utexas.edu>
libkmod/libkmod-config.c

index 70044f038f2e4f540bf9af1fe5b9ccbfb5cbd353..398468e491cf7b0dbf5392fc3db63bb450b977b9 100644 (file)
@@ -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)