From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Cc: Alexander Shiyan <eagle.alexander923@gmail.com>
Subject: Re: [PATCH] fs: avoid setting root or rootopts to literal string "<NULL>"
Date: Mon, 20 Apr 2026 09:45:09 +0200 [thread overview]
Message-ID: <aeXZhavfJQ2OGz34@pengutronix.de> (raw)
In-Reply-To: <20260417084414.137087-1-s.hauer@pengutronix.de>
On Fri, Apr 17, 2026 at 10:44:14AM +0200, Sascha Hauer wrote:
> linux.bootargs.root and linux.bootards.rootopts might be unspecified in
> which case dev_get_param() returns a literal "<NULL>" string. Avoid
> setting root and rootopts to that string.
>
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
> fs/fs.c | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/fs/fs.c b/fs/fs.c
> index 6a73a5baa2..0c53881a92 100644
> --- a/fs/fs.c
> +++ b/fs/fs.c
> @@ -1251,8 +1251,14 @@ void fsdev_get_linux_root_options(struct fs_device *fsdev,
> const char **root, const char **rootopts)
> {
> if (fsdev) {
> - *root = dev_get_param(&fsdev->dev, "linux.bootargs.root");
> - *rootopts = dev_get_param(&fsdev->dev, "linux.bootargs.rootopts");
> + const char *s;
> +
> + s = dev_get_param(&fsdev->dev, "linux.bootargs.root");
> + if (s)
> + *root = s;
This can't work. I said in the commit message dev_get_param returns a
literal "<NULL>" string, so testing for non NULL here makes no
difference.
Sascha
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
prev parent reply other threads:[~2026-04-20 7:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-17 8:44 [PATCH] fs: avoid setting root or rootopts to literal string "<NULL>" Sascha Hauer
2026-04-20 7:45 ` Sascha Hauer [this message]
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=aeXZhavfJQ2OGz34@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.