aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLucas De Marchi <lucas.demarchi@intel.com>2021-03-10 08:33:01 -0800
committerLucas De Marchi <lucas.demarchi@intel.com>2021-03-10 08:33:01 -0800
commit8742be0aa5ed14d28980eb706b08e8bdf650f21c (patch)
treeed5a85f2474364742de254d21aa2d32145570cf5
parentd8b31c34a6b487123ee935762bbd3c7046607249 (diff)
downloadkmod-8742be0aa5ed14d28980eb706b08e8bdf650f21c.tar.gz
libkmod-config: more chars allowed as space
Recently in a discussion I noticed that kernel allows more chars to be considered as space in the kernel command line. Switch to the equivalent of isspace() instead of considering only ' '.
-rw-r--r--libkmod/libkmod-config.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libkmod/libkmod-config.c b/libkmod/libkmod-config.c
index 2873f06..4fdd40f 100644
--- a/libkmod/libkmod-config.c
+++ b/libkmod/libkmod-config.c
@@ -543,11 +543,14 @@ static int kmod_config_parse_kcmdline(struct kmod_config *config)
break;
case '\0':
- case '\n':
- /* Stop iterating on new chars */
iter = false;
/* fall-through */
case ' ':
+ case '\n':
+ case '\t':
+ case '\v':
+ case '\f':
+ case '\r':
if (is_quoted && state == STATE_VALUE) {
/* no state change*/;
} else if (is_quoted) {