summaryrefslogtreecommitdiff
path: root/testing/kmod/0001-libkmod-Add-support-for-.-in-module-parameter-on-kcm.patch
blob: 4ef3d2775ccb4f7fe5b15510b5bda6fe82215ac3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
From 66f3228d17d66d7e2dd484427259290fbc82b2f0 Mon Sep 17 00:00:00 2001
From: Lucas De Marchi <lucas.demarchi@profusion.mobi>
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 <selim@alumni.cs.utexas.edu>
---
 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