From: Reuben Varghese <rvarghes@redhat.com>
To: linux-modules@vger.kernel.org
Cc: lucas.de.marchi@gmail.com, yauheni.kaliuta@redhat.com,
Reuben Varghese <rvarghes@redhat.com>
Subject: [PATCH 2/2] Continue temporary support for Blacklist command with warnings
Date: Mon, 3 May 2021 03:53:47 -0700 [thread overview]
Message-ID: <20210503105347.979635-3-rvarghes@redhat.com> (raw)
In-Reply-To: <20210503105347.979635-1-rvarghes@redhat.com>
Since refactoring blacklist to blocklist without notice will surely
result in a lot of broken systems, temporary support with a warning
that the blacklist command is being deprecated and has been refactored
to blocklist is added.
Signed-off-by: Reuben Varghese <rvarghes@redhat.com>
---
libkmod/libkmod-config.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/libkmod/libkmod-config.c b/libkmod/libkmod-config.c
index c2ce4cc..084947d 100644
--- a/libkmod/libkmod-config.c
+++ b/libkmod/libkmod-config.c
@@ -476,7 +476,11 @@ static void kcmdline_parse_result(struct kmod_config *config, char *modname,
DBG(config->ctx, "%s %s\n", modname, param);
- if (streq(modname, "modprobe") && !strncmp(param, "blocklist=", 10)) {
+ if (streq(modname, "modprobe") && (!strncmp(param, "blocklist=", 10) ||
+ !strncmp(param, "blacklist=", 10))) {
+ if (!strncmp(param, "blacklist=", 10)) {
+ DBG(config->ctx, "Warning: Blacklist command is now deprecated and has been refactored to blocklist\n");
+ }
for (;;) {
char *t = strsep(&value, ",");
if (t == NULL)
@@ -662,9 +666,13 @@ static int kmod_config_parse(struct kmod_config *config, int fd,
goto syntax_error;
kmod_config_add_alias(config, alias, modname);
- } else if (streq(cmd, "blocklist")) {
+ } else if (streq(cmd, "blacklist") || streq(cmd, "blocklist")) {
char *modname = strtok_r(NULL, "\t ", &saveptr);
+ if (streq(cmd, "blacklist"))
+ DBG(config->ctx,
+ "Blacklist command is now deprecated and has been refactored to blocklist. Please edit your config file to reflect this change\n");
+
if (underscores(modname) < 0)
goto syntax_error;
--
2.27.0
next prev parent reply other threads:[~2021-05-03 10:54 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-03 10:53 [PATCH 0/2] Introduce inclusive language in kmod Reuben Varghese
2021-05-03 10:53 ` [PATCH 1/2] Refactor all instances of blacklist to blocklist and update documentation Reuben Varghese
2021-05-03 10:53 ` Reuben Varghese [this message]
2021-05-15 22:31 ` [PATCH 0/2] Introduce inclusive language in kmod Lucas De Marchi
2021-05-18 15:03 ` [PATCH v2 0/3] " Reuben Varghese
2021-05-18 15:03 ` [PATCH v2 1/3] Refactor all instances of blacklist to blocklist Reuben Varghese
2021-05-21 21:42 ` Lucas De Marchi
2021-05-18 15:03 ` [PATCH v2 2/3] Update documentation reflecting change from " Reuben Varghese
2021-05-18 15:03 ` [PATCH v2 3/3] Continue temporary support for Blacklist command Reuben Varghese
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=20210503105347.979635-3-rvarghes@redhat.com \
--to=rvarghes@redhat.com \
--cc=linux-modules@vger.kernel.org \
--cc=lucas.de.marchi@gmail.com \
--cc=yauheni.kaliuta@redhat.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.