* [PATCH] of/fdt: extend cmdline is not avail when kernel grub config ends with "--"
@ 2022-06-30 11:43 hmy
0 siblings, 0 replies; 3+ messages in thread
From: hmy @ 2022-06-30 11:43 UTC (permalink / raw)
To: robh+dt; +Cc: linux-kernel, hmy
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
^ permalink raw reply [flat|nested] 3+ messages in thread* [PATCH] of/fdt: extend cmdline is not avail when kernel grub config ends with "--"
@ 2022-07-01 5:38 hmy
0 siblings, 0 replies; 3+ messages in thread
From: hmy @ 2022-07-01 5:38 UTC (permalink / raw)
To: robh+dt; +Cc: linux-kernel, hmy
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..5a289712c8fb 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -1162,6 +1162,7 @@ int __init early_init_dt_scan_chosen(char *cmdline)
const char *p;
const void *rng_seed;
const void *fdt = initial_boot_params;
+ char *q __maybe_unused;
node = fdt_path_offset(fdt, "/chosen");
if (node < 0)
@@ -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
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] of/fdt: extend cmdline is not avail when kernel grub config ends with "--"
@ 2022-06-30 11:28 hmy
0 siblings, 0 replies; 3+ messages in thread
From: hmy @ 2022-06-30 11:28 UTC (permalink / raw)
To: robh+dt; +Cc: linux-kernel, 3127791
From: "3127791@qq.com" <3127791@qq.com>
when boot_command_line = boot-command "--" CONFIG_CMDLINE,
parse_args() will exit and without parsing the contents of CONFIG_CMDLINE
Signed-off-by: 3127791@qq.com <3127791@qq.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..6f46dc94766d 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(data, "--");
+ if (q)
+ *q = '\0';
strlcat(cmdline, " ", COMMAND_LINE_SIZE);
strlcat(cmdline, CONFIG_CMDLINE, COMMAND_LINE_SIZE);
#elif defined(CONFIG_CMDLINE_FORCE)
--
2.25.1
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-07-01 5:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-30 11:43 [PATCH] of/fdt: extend cmdline is not avail when kernel grub config ends with "--" hmy
-- strict thread matches above, loose matches on Subject: below --
2022-07-01 5:38 hmy
2022-06-30 11:28 hmy
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®