diff mbox series

[v2,3/3] Continue temporary support for Blacklist command

Message ID 20210518150319.60941-4-rvarghes@redhat.com (mailing list archive)
State New
Headers show
Series Introduce inclusive language in kmod | expand

Commit Message

Reuben Varghese May 18, 2021, 3:03 p.m. UTC
Since refactoring blacklist to blocklist without notice will surely
result in a lot of broken systems, temporary support for the blacklist
command is added.

Signed-off-by: Reuben Varghese <rvarghes@redhat.com>
---
 libkmod/libkmod-config.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/libkmod/libkmod-config.c b/libkmod/libkmod-config.c
index ec148c6..a4435ca 100644
--- a/libkmod/libkmod-config.c
+++ b/libkmod/libkmod-config.c
@@ -476,7 +476,8 @@  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))) {
 		for (;;) {
 			char *t = strsep(&value, ",");
 			if (t == NULL)
@@ -662,7 +663,7 @@  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 (underscores(modname) < 0)