diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2023-03-07 18:35:26 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2023-03-14 10:02:05 +0100 |
commit | 46c77a411a3042da08d8460eb4f3c22f71b03d20 (patch) | |
tree | 2cae3e773b81237911ae3262c3510ad8e84c59ab /fs | |
parent | da56ee4934aa385453d1c21e6ec14cbc39c0fca7 (diff) | |
download | barebox-46c77a411a3042da08d8460eb4f3c22f71b03d20.tar.gz |
commands: stat: fix UUID print
cdev->uuid is an already formatted string, not a binary UUID.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/fs.c | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -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"); } } |