From: hmy <huanglin@uniontech.com>
To: robh+dt@kernel.org
Cc: linux-kernel@vger.kernel.org, hmy <huanglin@uniontech.com>
Subject: [PATCH] of/fdt: extend cmdline is not avail when kernel grub config ends with "--"
Date: Thu, 30 Jun 2022 19:43:10 +0800 [thread overview]
Message-ID: <20220630114310.830-1-huanglin@uniontech.com> (raw)
when boot_command_line = boot-command "--" CONFIG_CMDLINE,
parse_args() will exit and without parsing the contents of CONFIG_CMDLINE
Signed-off-by: hmy <huanglin@uniontech.com>
---
drivers/of/fdt.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index a8f5b6532165..4a71acc172ef 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -1160,6 +1160,7 @@ int __init early_init_dt_scan_chosen(char *cmdline)
{
int l, node;
const char *p;
+ char *q;
const void *rng_seed;
const void *fdt = initial_boot_params;
@@ -1186,6 +1187,9 @@ int __init early_init_dt_scan_chosen(char *cmdline)
*/
#ifdef CONFIG_CMDLINE
#if defined(CONFIG_CMDLINE_EXTEND)
+ q = strstr(cmdline, "--");
+ if (q)
+ *q = '\0';
strlcat(cmdline, " ", COMMAND_LINE_SIZE);
strlcat(cmdline, CONFIG_CMDLINE, COMMAND_LINE_SIZE);
#elif defined(CONFIG_CMDLINE_FORCE)
--
2.20.1
next reply other threads:[~2022-06-30 11:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-30 11:43 hmy [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-07-01 5:38 hmy
2022-06-30 11:28 hmy
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=20220630114310.830-1-huanglin@uniontech.com \
--to=huanglin@uniontech.com \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®