summaryrefslogtreecommitdiff
path: root/super0.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2010-11-22 19:35:26 +1100
committerNeilBrown <neilb@suse.de>2010-11-22 19:35:26 +1100
commit00bbdbdac69e6d90fc71b8a2bfe574928ec66da3 (patch)
treeae9c3a9478cee36dcef0ab1c85fc75bd2a5f2062 /super0.c
parentca145a1e4c9ec2c95f95f6283a3ce290f3d4da0d (diff)
Add subarray arg to container_content.
This allows the info for a single array to be extracted, so we don't have to write it into st->subarray. For consistency, implement container_content for super0 and super1, to just return the mdinfo for the single array. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'super0.c')
-rw-r--r--super0.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/super0.c b/super0.c
index b9d149eb..3e17b803 100644
--- a/super0.c
+++ b/super0.c
@@ -401,6 +401,17 @@ static void getinfo_super0(struct supertype *st, struct mdinfo *info, char *map)
info->array.working_disks = working;
}
+static struct mdinfo *container_content0(struct supertype *st, char *subarray)
+{
+ struct mdinfo *info;
+
+ if (subarray)
+ return NULL;
+
+ info = malloc(sizeof(*info));
+ getinfo_super0(st, info, NULL);
+ return info;
+}
static int update_super0(struct supertype *st, struct mdinfo *info,
char *update,
@@ -1136,6 +1147,7 @@ struct superswitch super0 = {
.match_home = match_home0,
.uuid_from_super = uuid_from_super0,
.getinfo_super = getinfo_super0,
+ .container_content = container_content0,
.update_super = update_super0,
.init_super = init_super0,
.store_super = store_super0,