summaryrefslogtreecommitdiffstats
path: root/Detail.c
diff options
context:
space:
mode:
authorKinga Stefaniuk <kinga.stefaniuk@intel.com>2024-07-23 15:38:41 +0200
committerMariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>2024-07-24 12:10:22 +0200
commit5be749ce416852e7acbb2415be380be358859612 (patch)
tree52041859d1edc4918620df6af88213d85c94e994 /Detail.c
parentCI: fetch all of the changes in repository (diff)
downloadmdadm-5be749ce416852e7acbb2415be380be358859612.tar.xz
mdadm-5be749ce416852e7acbb2415be380be358859612.zip
Detail: fix --detail --export for uuid_zero
Mentioned commit (see Fixes) causes that devices with UUID equal to uuid_zero was not recognized properly. For few devices the first one was taken always, and the same information was printed. It caused regression, when few containers were created, symlinks were generated only for the first one. Add checking if uuid is uuid_zero and, if yes, use devname to differentiate devices. Fixes: 60c19530dd7c ("Detail: remove duplicated code") Signed-off-by: Kinga Stefaniuk <kinga.stefaniuk@intel.com>
Diffstat (limited to 'Detail.c')
-rw-r--r--Detail.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Detail.c b/Detail.c
index 55a086d3..f8b9e847 100644
--- a/Detail.c
+++ b/Detail.c
@@ -274,7 +274,7 @@ int Detail(char *dev, struct context *c)
array.minor_version);
}
- if (info)
+ if (info && memcmp(info->uuid, uuid_zero, sizeof(int[4])) != 0)
mp = map_by_uuid(&map, info->uuid);
if (!mp)
mp = map_by_devnm(&map, fd2devnm(fd));