summaryrefslogtreecommitdiff
path: root/Detail.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2008-09-18 16:12:28 +1000
committerNeilBrown <neilb@suse.de>2008-09-18 16:12:28 +1000
commit35ddc76dcbcb7ef5f1ca57e557bfa4c3cdf6a6eb (patch)
tree7469851707ce8fc23c438c10ce6a120d1f7fc5ad /Detail.c
parentff54de6e47163944185f231700e72d3122b58f4c (diff)
Use common code to report MD_UUID for --detail --export
As we need to be able to extract a UUID from any superblock for matching, use that as the MD_UUID as it will probably be used for array matching too.
Diffstat (limited to 'Detail.c')
-rw-r--r--Detail.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/Detail.c b/Detail.c
index ae00bb49..4647360c 100644
--- a/Detail.c
+++ b/Detail.c
@@ -169,9 +169,17 @@ int Detail(char *dev, int brief, int export, int test, char *homehost)
printf("MD_METADATA=%02d.%02d\n",
array.major_version, array.minor_version);
}
+
+ if (st && st->sb) {
+ struct mdinfo info;
+ char nbuf[64];
+ st->ss->getinfo_super(st, &info);
+ fname_from_uuid(st, &info, nbuf, ':');
+ printf("MD_UUID=%s\n", nbuf+5);
- if (st && st->sb)
- st->ss->export_detail_super(st);
+ if (st->ss->export_detail_super)
+ st->ss->export_detail_super(st);
+ }
goto out;
}