mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [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

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