From: Lucas De Marchi <lucas.demarchi@intel.com>
To: linux-modules@vger.kernel.org
Subject: [PATCH] libkmod-config: more chars allowed as space
Date: Wed, 10 Mar 2021 09:26:52 -0800 [thread overview]
Message-ID: <20210310172652.13638-1-lucas.demarchi@intel.com> (raw)
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 ' '.
---
libkmod/libkmod-config.c | 7 +++++--
1 file 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) {
--
2.30.1
next reply other threads:[~2021-03-10 17:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-10 17:26 Lucas De Marchi [this message]
2021-03-15 20:25 ` [PATCH] libkmod-config: more chars allowed as space Lucas De Marchi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210310172652.13638-1-lucas.demarchi@intel.com \
--to=lucas.demarchi@intel.com \
--cc=linux-modules@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox