]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - Manage.c
Add subarray field to supertype.
[thirdparty/mdadm.git] / Manage.c
index 003d81573fff87ce3c498a87bfa54badbe5fe4d0..9197eea5358970fffc196b8cc729b68ba17aa1ab 100644 (file)
--- 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");