]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - Query.c
Move xmalloc et al into their own file
[thirdparty/mdadm.git] / Query.c
diff --git a/Query.c b/Query.c
index f9857d6d9e2ddadd86726db70046324bf4b0ee7d..b9c209f7993a39513592fdbbc28eb5740504dec6 100644 (file)
--- a/Query.c
+++ b/Query.c
@@ -35,7 +35,7 @@ int Query(char *dev)
        int fd = open(dev, O_RDONLY);
        int vers;
        int ioctlerr;
-       int superror, superrno;
+       int superror;
        struct mdinfo info;
        mdu_array_info_t array;
        struct supertype *st = NULL;
@@ -47,7 +47,7 @@ int Query(char *dev)
        char *activity;
 
        if (fd < 0){
-               fprintf(stderr, Name ": cannot open %s: %s\n",
+               pr_err("cannot open %s: %s\n",
                        dev, strerror(errno));
                return 1;
        }
@@ -82,10 +82,9 @@ int Query(char *dev)
                       array.spare_disks, array.spare_disks==1?"":"s");
        }
        st = guess_super(fd);
-       if (st) {
+       if (st)
                superror = st->ss->load_super(st, fd, dev);
-               superrno = errno;
-       } else
+       else
                superror = -1;
        close(fd);
        if (superror == 0) {