summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2023-03-07 18:35:26 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2023-03-14 10:02:05 +0100
commit46c77a411a3042da08d8460eb4f3c22f71b03d20 (patch)
tree2cae3e773b81237911ae3262c3510ad8e84c59ab /fs
parentda56ee4934aa385453d1c21e6ec14cbc39c0fca7 (diff)
downloadbarebox-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.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/fs.c b/fs/fs.c
index 4837c4b701..65e4c661b9 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");
}
}