From 4a2e799263de5acabc1881e5330cf87b1aee7451 Mon Sep 17 00:00:00 2001 From: Ahmad Fatoum Date: Mon, 21 Oct 2019 19:00:44 +0200 Subject: fs: devfs-core: do a case-insensitive compare of partuuids 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 Signed-off-by: Sascha Hauer --- fs/devfs-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs') diff --git a/fs/devfs-core.c b/fs/devfs-core.c index 258bb2dbaa..5341e39e67 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; -- cgit v1.2.3 From 5c06691a321c9f0d9e143c52b143366d0428391b Mon Sep 17 00:00:00 2001 From: Lucas Stach Date: Wed, 30 Oct 2019 12:11:49 +0100 Subject: fs: ubootvarfs: use correct format specifier for pointer diff The difference between two pointers is represented as a ptrdiff_t, use the correct format specifier when printing to get rid of the following warning in a 64bit build: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'long int' [-Wformat=] Signed-off-by: Lucas Stach Signed-off-by: Sascha Hauer --- fs/ubootvarfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs') diff --git a/fs/ubootvarfs.c b/fs/ubootvarfs.c index 81ec05d5ef..475e4b7a79 100644 --- a/fs/ubootvarfs.c +++ b/fs/ubootvarfs.c @@ -409,7 +409,7 @@ static void ubootvarfs_parse(struct ubootvarfs_data *data, char *blob, list_add_tail(&var->list, &data->var_list); } else { - pr_err("No separator in data @ 0x%08x. Skipped.", + pr_err("No separator in data @ 0x%08tx. Skipped.", blob - start); free(var); } -- cgit v1.2.3