From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 2/2] lib: cmdlinepart: support RO both in lower and upper case
Date: Wed, 14 Jan 2026 11:13:02 +0100 [thread overview]
Message-ID: <20260114101304.113538-2-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20260114101304.113538-1-a.fatoum@pengutronix.de>
The help text of the addpart command lists RO as being uppercase,
but the code expects it to be lower-case.
Resolve this by supporting either case.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
lib/cmdlinepart.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/cmdlinepart.c b/lib/cmdlinepart.c
index 3e8c415c7ea6..16fa4605d822 100644
--- a/lib/cmdlinepart.c
+++ b/lib/cmdlinepart.c
@@ -74,7 +74,7 @@ int cmdlinepart_do_parse_one(const char *devname, const char *partstr,
partstr = end;
- if (*partstr == 'r' && *(partstr + 1) == 'o') {
+ if (!strncasecmp(partstr, "ro", 2)) {
flags |= DEVFS_PARTITION_READONLY;
end = (char *)(partstr + 2);
}
--
2.47.3
prev parent reply other threads:[~2026-01-14 10:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-14 10:13 [PATCH 1/2] commands: delpart: return success when no error occurred Ahmad Fatoum
2026-01-14 10:13 ` Ahmad Fatoum [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=20260114101304.113538-2-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
/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