@@ -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;
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(-)