[PATCH master 2/2] commands: stat: fix UUID print
Ahmad Fatoum
a.fatoum at pengutronix.de
Tue Mar 14 01:58:05 PDT 2023
cdev->uuid is an already formatted string, not a binary UUID.
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
fs/fs.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/fs/fs.c b/fs/fs.c
index 4837c4b701bc..65e4c661b9ce 100644
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -69,8 +69,6 @@ EXPORT_SYMBOL(mkmodestr);
void cdev_print(const struct cdev *cdev)
{
- bool uuid_set;
-
if (cdev->dev || cdev->master || cdev->partname) {
printf("Origin: %s", dev_name(cdev->dev) ?: "None");
if (cdev->master)
@@ -98,14 +96,13 @@ void cdev_print(const struct cdev *cdev)
}
printf("\n");
- uuid_set = memchr_inv(cdev->uuid, 0x00 ,sizeof(cdev->uuid));
- if (cdev->filetype || cdev->dos_partition_type || uuid_set) {
+ if (cdev->filetype || cdev->dos_partition_type || *cdev->uuid) {
if (cdev->filetype)
printf("Filetype: %s\t", file_type_to_string(cdev->filetype));
if (cdev->dos_partition_type)
printf("DOS parttype: 0x%02x\t", cdev->dos_partition_type);
- if (uuid_set)
- printf("UUID: %pUl", cdev->uuid);
+ if (*cdev->uuid)
+ printf("UUID: %s", cdev->uuid);
printf("\n");
}
}
--
2.30.2
More information about the barebox
mailing list