mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Cc: Alexander Shiyan <eagle.alexander923@gmail.com>
Subject: [PATCH] fs: set linux.bootargs.rootopts only when existing
Date: Mon, 20 Apr 2026 09:57:08 +0200	[thread overview]
Message-ID: <20260420075708.4090183-1-s.hauer@pengutronix.de> (raw)

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




             reply	other threads:[~2026-04-20  7:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-20  7:57 Sascha Hauer [this message]
2026-04-20 12:15 ` Alexander Shiyan
2026-04-22  8:04 ` Sascha Hauer

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=20260420075708.4090183-1-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=eagle.alexander923@gmail.com \
    /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