From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 2/2] fs: devfs-core: do a case-insensitive compare of partuuids
Date: Mon, 21 Oct 2019 19:00:44 +0200 [thread overview]
Message-ID: <20191021170044.21036-2-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20191021170044.21036-1-a.fatoum@pengutronix.de>
partuuids are represented as hexadecimal strings, where case doesn't
matter. barebox formats them as lower case internally, forcing the
partuuid device tree property to be lower case too. Use strcasecmp to
be case-insensitive.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
fs/devfs-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/devfs-core.c b/fs/devfs-core.c
index 2b93a951f269..e2cefb6d4e21 100644
--- a/fs/devfs-core.c
+++ b/fs/devfs-core.c
@@ -104,7 +104,7 @@ struct cdev *cdev_by_partuuid(const char *partuuid)
return NULL;
list_for_each_entry(cdev, &cdev_list, list) {
- if (!strcmp(cdev->partuuid, partuuid))
+ if (!strcasecmp(cdev->partuuid, partuuid))
return cdev;
}
return NULL;
--
2.23.0
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2019-10-21 17:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-21 17:00 [PATCH 1/2] partition: include partuuid string in debug string Ahmad Fatoum
2019-10-21 17:00 ` Ahmad Fatoum [this message]
2019-10-23 7:10 ` 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=20191021170044.21036-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