From d8032c3b8b7bfb58e0c71ba6f4dde56a0c306a6c Mon Sep 17 00:00:00 2001 From: David Sterba Date: Wed, 18 Oct 2023 01:42:04 +0200 Subject: [PATCH] btrfs-progs: mkfs: print device uuid if set from command line Print the device uuid in the summary in case it's specified on the command line, not always as it would be confusing and is not usually needed. Can be found in 'btrfs inspect-internal dump-super' as device_item.uuid . Signed-off-by: David Sterba --- mkfs/main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mkfs/main.c b/mkfs/main.c index 26116fc7..66cda4a8 100644 --- a/mkfs/main.c +++ b/mkfs/main.c @@ -1964,6 +1964,8 @@ raid_groups: update_chunk_allocation(fs_info, &allocation); printf("Label: %s\n", label); printf("UUID: %s\n", mkfs_cfg.fs_uuid); + if (dev_uuid[0] != 0) + printf("Device UUID: %s\n", mkfs_cfg.dev_uuid); printf("Node size: %u\n", nodesize); printf("Sector size: %u\n", sectorsize); printf("Filesystem size: %s\n",