]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - Manage.c
Make hot-add work with v 1.0.1 superblocks
[thirdparty/mdadm.git] / Manage.c
index ba2ea3f5a2219c3010f919f4fe55604edcd6aa5f..6f6f501bbefe1b7b02e410d277b51fb067ee2add 100644 (file)
--- a/Manage.c
+++ b/Manage.c
@@ -204,11 +204,8 @@ int Manage_subdevs(char *devname, int fd,
                                return 1;
                        }
                        close(tfd);
-#if 0
-                       if (array.major_version == 0) {
-#else
-                               if (md_get_version(fd)%100 < 2) {
-#endif
+                       if (array.major_version == 0 &&
+                           md_get_version(fd)%100 < 2) {
                                if (ioctl(fd, HOT_ADD_DISK,
                                          (unsigned long)stb.st_rdev)==0) {
                                        fprintf(stderr, Name ": hot added %s\n",