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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 libkmod/libkmod-config.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

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)
-- 
2.27.0




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux