]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - Query.c
Change MAJOR() etc to major() etc
[thirdparty/mdadm.git] / Query.c
diff --git a/Query.c b/Query.c
index c65d83a03e732f8bebea3ba4b2a7c5a3c43dbc4a..3f58c8b8150570206d752a11d2e3504673f50794 100644 (file)
--- a/Query.c
+++ b/Query.c
@@ -71,9 +71,10 @@ int Query(char *dev)
                        ;
                else
 #endif
-                       if (ioctl(fd, BLKGETSIZE, &array_size)==0)
-                               larray_size = array_size<<9;
-                       else larray_size = 0;
+                       if (ioctl(fd, BLKGETSIZE, &array_size)==0) {
+                               larray_size = array_size;
+                               larray_size <<= 9;
+                       } else larray_size = 0;
        }
        close(fd);
 
@@ -100,7 +101,7 @@ int Query(char *dev)
                       dev, strerror(superrno));
                break;
        case 2:
-               printf("%s: is too small to be an md componenet.\n",
+               printf("%s: is too small to be an md component.\n",
                       dev);
                break;
        case 3:
@@ -128,7 +129,7 @@ int Query(char *dev)
                        if (md_get_version(fd) >= 9000 &&       
                            ioctl(fd, GET_ARRAY_INFO, &array)>= 0) {
                                if (ioctl(fd, GET_DISK_INFO, &disc) >= 0 &&
-                                   MKDEV(disc.major,disc.minor) == stb.st_rdev)
+                                   makedev((unsigned)disc.major,(unsigned)disc.minor) == stb.st_rdev)
                                        activity = "active";
                                else
                                        activity = "mismatch";