]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - Assemble.c
Central calls to ioctl BLKGETSIZE
[thirdparty/mdadm.git] / Assemble.c
index c731105dfab28351ff2718df5066616a30106850..5e4e3941ac735592abcdd1f573140a0867b9bdbe 100644 (file)
@@ -951,8 +951,8 @@ int Assemble(struct supertype *st, char *mddev, int mdfd,
                                        while (usecs < 1000) {
                                                mdfd = open(mddev, O_RDONLY);
                                                if (mdfd >= 0) {
-                                                       unsigned long size;
-                                                       if (ioctl(mdfd, BLKGETSIZE, &size) == 0 &&
+                                                       unsigned long long size;
+                                                       if (get_dev_size(mdfd, NULL, &size) &&
                                                            size > 0)
                                                                break;
                                                        close(mdfd);