* [PATCH] fs: set linux.bootargs.rootopts only when existing
@ 2026-04-20 7:57 Sascha Hauer
2026-04-20 12:15 ` Alexander Shiyan
2026-04-22 8:04 ` Sascha Hauer
0 siblings, 2 replies; 3+ messages in thread
From: Sascha Hauer @ 2026-04-20 7:57 UTC (permalink / raw)
To: Barebox List; +Cc: Alexander Shiyan
Not all filesystems specify rootopts. Only create
linux.bootargs.rootopts when it's non NULL. Otherwise dev_get_param() on
this returns the literal string "<NULL>" which then shows up in the
Linux bootargs.
Reported-by: Alexander Shiyan <eagle.alexander923@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
fs/fs.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/fs/fs.c b/fs/fs.c
index a562fe0fc6..5ca98ec127 100644
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -1244,8 +1244,9 @@ void fsdev_set_linux_root_options(struct fs_device *fsdev, const char *root, con
dev_add_param_fixed(&fsdev->dev, "linux.bootargs.root",
"%s", fsdev->linux_root);
- dev_add_param_fixed(&fsdev->dev, "linux.bootargs.rootopts",
- "%s", fsdev->linux_rootopts);
+ if (rootopts)
+ dev_add_param_fixed(&fsdev->dev, "linux.bootargs.rootopts",
+ "%s", fsdev->linux_rootopts);
}
void fsdev_get_linux_root_options(struct fs_device *fsdev,
--
2.47.3
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] fs: set linux.bootargs.rootopts only when existing
2026-04-20 7:57 [PATCH] fs: set linux.bootargs.rootopts only when existing Sascha Hauer
@ 2026-04-20 12:15 ` Alexander Shiyan
2026-04-22 8:04 ` Sascha Hauer
1 sibling, 0 replies; 3+ messages in thread
From: Alexander Shiyan @ 2026-04-20 12:15 UTC (permalink / raw)
To: Sascha Hauer; +Cc: Barebox List
This version works fine, so
Tested-by: Alexander Shiyan <eagle.alexander923@gmail.com>
пн, 20 апр. 2026 г. в 10:57, Sascha Hauer <s.hauer@pengutronix.de>:
>
> Not all filesystems specify rootopts. Only create
> linux.bootargs.rootopts when it's non NULL. Otherwise dev_get_param() on
> this returns the literal string "<NULL>" which then shows up in the
> Linux bootargs.
>
> Reported-by: Alexander Shiyan <eagle.alexander923@gmail.com>
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
> fs/fs.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/fs/fs.c b/fs/fs.c
> index a562fe0fc6..5ca98ec127 100644
> --- a/fs/fs.c
> +++ b/fs/fs.c
> @@ -1244,8 +1244,9 @@ void fsdev_set_linux_root_options(struct fs_device *fsdev, const char *root, con
>
> dev_add_param_fixed(&fsdev->dev, "linux.bootargs.root",
> "%s", fsdev->linux_root);
> - dev_add_param_fixed(&fsdev->dev, "linux.bootargs.rootopts",
> - "%s", fsdev->linux_rootopts);
> + if (rootopts)
> + dev_add_param_fixed(&fsdev->dev, "linux.bootargs.rootopts",
> + "%s", fsdev->linux_rootopts);
> }
>
> void fsdev_get_linux_root_options(struct fs_device *fsdev,
> --
> 2.47.3
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] fs: set linux.bootargs.rootopts only when existing
2026-04-20 7:57 [PATCH] fs: set linux.bootargs.rootopts only when existing Sascha Hauer
2026-04-20 12:15 ` Alexander Shiyan
@ 2026-04-22 8:04 ` Sascha Hauer
1 sibling, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2026-04-22 8:04 UTC (permalink / raw)
To: Barebox List, Sascha Hauer; +Cc: Alexander Shiyan
On Mon, 20 Apr 2026 09:57:08 +0200, Sascha Hauer wrote:
> Not all filesystems specify rootopts. Only create
> linux.bootargs.rootopts when it's non NULL. Otherwise dev_get_param() on
> this returns the literal string "<NULL>" which then shows up in the
> Linux bootargs.
>
>
Applied, thanks!
[1/1] fs: set linux.bootargs.rootopts only when existing
https://git.pengutronix.de/cgit/barebox/commit/?id=019d102038a6 (link may not be stable)
Best regards,
--
Sascha Hauer <s.hauer@pengutronix.de>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-04-22 8:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-04-20 7:57 [PATCH] fs: set linux.bootargs.rootopts only when existing Sascha Hauer
2026-04-20 12:15 ` Alexander Shiyan
2026-04-22 8:04 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox