diff options
author | NeilBrown <neilb@suse.de> | 2008-11-04 20:50:39 +1100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2008-11-04 20:50:39 +1100 |
commit | 7e6c6cb26790e4b0de2e8694cca655db26bee11a (patch) | |
tree | f6b92a7c7ed441c9768698c407da7b769907c6f4 /Detail.c | |
parent | 4ccad7b163fd5f210883d10b2fd36dcc90436b71 (diff) |
Detail: support MD_DEVNAME in --export for metadata-less devices.
If there is no metadata (--build was used) then we need to lookup
by devnum, not by uuid, to get the map entry.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'Detail.c')
-rw-r--r-- | Detail.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -184,6 +184,12 @@ int Detail(char *dev, int brief, int export, int test, char *homehost) if (st->ss->export_detail_super) st->ss->export_detail_super(st); + } else { + struct map_ent *mp, *map = NULL; + mp = map_by_devnum(&map, fd2devnum(fd)); + if (mp && mp->path && + strncmp(mp->path, "/dev/md/", 8) == 0) + printf("MD_DEVNAME=%s\n", mp->path+8); } goto out; } |