[PATCH 2/2] fs: devfs-core: do a case-insensitive compare of partuuids

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
---
 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@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux