summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLucas De Marchi <lucas.demarchi@intel.com>2020-03-10 01:06:39 -0700
committerSeung-Woo Kim <sw0312.kim@samsung.com>2020-10-13 10:50:31 +0900
commit7f2cb8ae2988e64ab48a50f5f041d15c195839d2 (patch)
tree062cf66a1eed526502801c8d315fd50f3dfeaee6
parenta45a0bba3c7d2a31d0c4d3018d9c2b454a53c2c3 (diff)
downloadkmod-7f2cb8ae2988e64ab48a50f5f041d15c195839d2.tar.gz
kmod-7f2cb8ae2988e64ab48a50f5f041d15c195839d2.tar.bz2
kmod-7f2cb8ae2988e64ab48a50f5f041d15c195839d2.zip
libkmod: ignore kcmdline option if we fail to parse modname
The error message is saying we are ignoring the option on the kernel command line, so just do it. [sw0312.kim: cherry-pick mainline commit 0262531556a3 to ignore wrong kcmdline] Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Change-Id: I5723dfd7f78118b0ee38e4610308c7574145de94
-rw-r--r--libkmod/libkmod-config.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libkmod/libkmod-config.c b/libkmod/libkmod-config.c
index 7b62367..971f20b 100644
--- a/libkmod/libkmod-config.c
+++ b/libkmod/libkmod-config.c
@@ -488,8 +488,9 @@ static void kcmdline_parse_result(struct kmod_config *config, char *modname,
if (underscores(modname) < 0) {
ERR(config->ctx, "Ignoring bad option on kernel command line while parsing module name: '%s'\n",
modname);
+ } else {
+ kmod_config_add_options(config, modname, param);
}
- kmod_config_add_options(config, modname, param);
}
}