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 /Detail.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 'Detail.c')
-rw-r--r-- | Detail.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -128,7 +128,8 @@ int Detail(char *dev, int brief, int export, int test, char *homehost) continue; if ((dv=map_dev(disk.major, disk.minor, 1))) { if ((!st || !st->sb) && - (disk.state & (1<<MD_DISK_ACTIVE))) { + (array.raid_disks == 0 || + (disk.state & (1<<MD_DISK_ACTIVE)))) { /* try to read the superblock from this device * to get more info */ @@ -136,8 +137,9 @@ int Detail(char *dev, int brief, int export, int test, char *homehost) if (fd2 >=0 && st && st->ss->load_super(st, fd2, NULL) == 0) { st->ss->getinfo_super(st, &info); - if (info.array.ctime != array.ctime || - info.array.level != array.level) + if (array.raid_disks != 0 && /* container */ + (info.array.ctime != array.ctime || + info.array.level != array.level)) st->ss->free_super(st); } if (fd2 >= 0) close(fd2); |