summaryrefslogtreecommitdiff
path: root/Detail.c
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2010-11-23 15:31:18 +1100
committerNeilBrown <neilb@suse.de>2010-11-23 15:31:18 +1100
commit5f7e44b29fe3fd9bf77c27e375c92046bf00d0c4 (patch)
tree2f9f54ffd3b0c96d7ad5adbb31bf9ce1e5a2190b /Detail.c
parent30f58b2208778245963ee5562f4b2efbde3188cf (diff)
Initialize st->devnum and st->container_dev in super_by_fd
Precludes needing to deduce this information later, like in Detail.c and soon in Grow.c. Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'Detail.c')
-rw-r--r--Detail.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/Detail.c b/Detail.c
index 2cd4e9d3..94156288 100644
--- a/Detail.c
+++ b/Detail.c
@@ -98,16 +98,13 @@ int Detail(char *dev, int brief, int export, int test, char *homehost)
if (st)
max_disks = st->max_devs;
- if (sra && is_subarray(sra->text_version) &&
- strchr(sra->text_version+1, '/')) {
+ if (subarray) {
/* This is a subarray of some container.
* We want the name of the container, and the member
*/
- char *s = strchr(sra->text_version+1, '/');
- int dn;
- *s++ = '\0';
- member = s;
- dn = devname2devnum(sra->text_version+1);
+ int dn = st->container_dev;
+
+ member = subarray;
container = map_dev(dev2major(dn), dev2minor(dn), 1);
}