From b771faef931c798a4553db0a8c1366aff90079c6 Mon Sep 17 00:00:00 2001 From: Blazej Kucman Date: Fri, 29 Nov 2019 15:21:08 +0100 Subject: imsm: return correct uuid for volume in detail Fixes the side effect of the patch b6180160f ("imsm: save current_vol number") - wrong UUID is printed in detail for each volume. New parameter "subarray" is added to determine what info should be extracted from metadata (subarray or container). The parameter affects only IMSM metadata. Signed-off-by: Blazej Kucman Signed-off-by: Jes Sorensen --- super-ddf.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'super-ddf.c') diff --git a/super-ddf.c b/super-ddf.c index c095e8a2..78020634 100644 --- a/super-ddf.c +++ b/super-ddf.c @@ -1730,7 +1730,8 @@ err: return 1; } -static void detail_super_ddf(struct supertype *st, char *homehost) +static void detail_super_ddf(struct supertype *st, char *homehost, + char *subarray) { struct ddf_super *sb = st->sb; int cnt = be16_to_cpu(sb->virt->populated_vdes); @@ -1787,7 +1788,7 @@ static void uuid_of_ddf_subarray(const struct ddf_super *ddf, memcpy(uuid, sha, 4*4); } -static void brief_detail_super_ddf(struct supertype *st) +static void brief_detail_super_ddf(struct supertype *st, char *subarray) { struct mdinfo info; char nbuf[64]; -- cgit v1.2.3