Linux-Modules Archive on lore.kernel.org
 help / color / Atom feed
From: Lucas De Marchi <lucas.demarchi@intel.com>
To: linux-modules@vger.kernel.org
Cc: joao.moreira@intel.com, leandro.maciel.dorileo@intel.com,
	Lucas De Marchi <lucas.demarchi@intel.com>
Subject: [PATCH 1/2] libkmod: ignore kcmdline option if we fail to parse modname
Date: Tue, 10 Mar 2020 01:23:07 -0700
Message-ID: <20200310082308.14318-1-lucas.demarchi@intel.com> (raw)

The error message is saying we are ignoring the option on the kernel
command line, so just do it.
---
 libkmod/libkmod-config.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libkmod/libkmod-config.c b/libkmod/libkmod-config.c
index 7b62367..971f20b 100644
--- a/libkmod/libkmod-config.c
+++ b/libkmod/libkmod-config.c
@@ -488,8 +488,9 @@ static void kcmdline_parse_result(struct kmod_config *config, char *modname,
 		if (underscores(modname) < 0) {
 			ERR(config->ctx, "Ignoring bad option on kernel command line while parsing module name: '%s'\n",
 			    modname);
+		} else {
+			kmod_config_add_options(config, modname, param);
 		}
-		kmod_config_add_options(config, modname, param);
 	}
 }
 
-- 
2.25.1


             reply index

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-10  8:23 Lucas De Marchi [this message]
2020-03-10  8:23 ` [PATCH 2/2] testsuite: check for ill-formed kcmdline Lucas De Marchi
2020-03-23 19:29 ` [PATCH 1/2] libkmod: ignore kcmdline option if we fail to parse modname 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=20200310082308.14318-1-lucas.demarchi@intel.com \
    --to=lucas.demarchi@intel.com \
    --cc=joao.moreira@intel.com \
    --cc=leandro.maciel.dorileo@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

Linux-Modules Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-modules/0 linux-modules/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-modules linux-modules/ https://lore.kernel.org/linux-modules \
		linux-modules@vger.kernel.org
	public-inbox-index linux-modules

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-modules


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git