diff options
author | NeilBrown <neilb@suse.de> | 2008-09-18 16:11:40 +1000 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2008-09-18 16:11:40 +1000 |
commit | ff54de6e47163944185f231700e72d3122b58f4c (patch) | |
tree | 6d9f2763f38f976811adc9c66d44d1fbe7df03b9 /super-ddf.c | |
parent | d7288ddc3a06a0912f5f0a3f23ccca76a66ff332 (diff) | |
download | mdadm-ff54de6e47163944185f231700e72d3122b58f4c.tar.gz mdadm-ff54de6e47163944185f231700e72d3122b58f4c.tar.xz mdadm-ff54de6e47163944185f231700e72d3122b58f4c.zip |
Report uuid in --detail --brief for ddf and intel
The uuid is slightly fictitious but needed for array matching.
Diffstat (limited to 'super-ddf.c')
-rw-r--r-- | super-ddf.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/super-ddf.c b/super-ddf.c index 77ce46f..ad21e74 100644 --- a/super-ddf.c +++ b/super-ddf.c @@ -1100,20 +1100,18 @@ static void examine_super_ddf(struct supertype *st, char *homehost) examine_pds(sb); } +static void getinfo_super_ddf(struct supertype *st, struct mdinfo *info); + + static void brief_examine_super_ddf(struct supertype *st) { /* We just write a generic DDF ARRAY entry - * The uuid is all hex, 6 groups of 4 bytes */ - struct ddf_super *ddf = st->sb; - int i; - printf("ARRAY /dev/ddf metadata=ddf UUID="); - for (i = 0; i < DDF_GUID_LEN; i++) { - if ((i&3) == 0 && i != 0) - printf(":"); - printf("%02X", 255&ddf->anchor.guid[i]); - } - printf("\n"); + struct mdinfo info; + char nbuf[64]; + getinfo_super_ddf(st, &info); + fname_from_uuid(st, &info, nbuf, ':'); + printf("ARRAY /dev/ddf metadata=ddf UUID=%s\n", nbuf + 5); } static void detail_super_ddf(struct supertype *st, char *homehost) @@ -1132,6 +1130,11 @@ static void brief_detail_super_ddf(struct supertype *st) * Can that be stored in ddf_super?? */ // struct ddf_super *ddf = st->sb; + struct mdinfo info; + char nbuf[64]; + getinfo_super_ddf(st, &info); + fname_from_uuid(st, &info, nbuf,':'); + printf(" UUID=%s", nbuf + 5); } #endif |