summaryrefslogtreecommitdiff
path: root/Manage.c
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2008-07-12 20:27:38 +1000
committerNeil Brown <neilb@suse.de>2008-07-12 20:27:38 +1000
commitf7e7067b47d2ca9994f9222dfa5833ac84ce3b22 (patch)
tree9519e435af3001dd2ccb2ee01d114067213aa615 /Manage.c
parent6adfd3affda071d1083497d150a1150ade0e3fdb (diff)
Add subarray field to supertype.
When loading the metadata for a subarray (super_by_fd), we set ->subarray to be the name read from md/metadata_version so that getinfo_super can return info about the correct array. With this we can differentiate between a container and an array within the container by looking at ->subarray[0].
Diffstat (limited to 'Manage.c')
-rw-r--r--Manage.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Manage.c b/Manage.c
index 003d8157..9197eea5 100644
--- a/Manage.c
+++ b/Manage.c
@@ -354,7 +354,7 @@ int Manage_subdevs(char *devname, int fd,
return 1;
case 'a':
/* add the device */
- if (tst == &supertype_container_member) {
+ if (tst->subarray[0]) {
fprintf(stderr, Name ": Cannot add disks to a"
" \'member\' array, perform this"
" operation on the parent container\n");
@@ -551,7 +551,7 @@ int Manage_subdevs(char *devname, int fd,
case 'r':
/* hot remove */
- if (tst == &supertype_container_member) {
+ if (tst->subarray[0]) {
fprintf(stderr, Name ": Cannot remove disks from a"
" \'member\' array, perform this"
" operation on the parent container\n");