]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - Kill.c
Convert 'quiet' to 'not verbose' in various places.
[thirdparty/mdadm.git] / Kill.c
diff --git a/Kill.c b/Kill.c
index a271b65c0a15743db5e22f45625846a029bfa690..6e426c0e3c6661f5d5eaf2963a963f1c5c2bd954 100644 (file)
--- a/Kill.c
+++ b/Kill.c
@@ -29,7 +29,7 @@
 #include       "md_u.h"
 #include       "md_p.h"
 
-int Kill(char *dev, struct supertype *st, int force, int quiet, int noexcl)
+int Kill(char *dev, struct supertype *st, int force, int verbose, int noexcl)
 {
        /*
         * Nothing fancy about Kill.  It just zeroes out a superblock
@@ -46,7 +46,7 @@ int Kill(char *dev, struct supertype *st, int force, int quiet, int noexcl)
                noexcl = 1;
        fd = open(dev, O_RDWR|(noexcl ? 0 : O_EXCL));
        if (fd < 0) {
-               if (!quiet)
+               if (verbose >= 0)
                        pr_err("Couldn't open %s for write - not zeroing\n",
                                dev);
                return 2;
@@ -54,7 +54,7 @@ int Kill(char *dev, struct supertype *st, int force, int quiet, int noexcl)
        if (st == NULL)
                st = guess_super(fd);
        if (st == NULL || st->ss->init_super == NULL) {
-               if (!quiet)
+               if (verbose >= 0)
                        pr_err("Unrecognised md component device - %s\n", dev);
                close(fd);
                return 2;
@@ -65,12 +65,12 @@ int Kill(char *dev, struct supertype *st, int force, int quiet, int noexcl)
                st->ss->free_super(st);
                st->ss->init_super(st, NULL, 0, "", NULL, NULL);
                if (st->ss->store_super(st, fd)) {
-                       if (!quiet)
+                       if (verbose >= 0)
                                pr_err("Could not zero superblock on %s\n",
                                        dev);
                        rv = 1;
                } else if (rv) {
-                       if (!quiet)
+                       if (verbose >= 0)
                                pr_err("superblock zeroed anyway\n");
                        rv = 0;
                }
@@ -79,7 +79,7 @@ int Kill(char *dev, struct supertype *st, int force, int quiet, int noexcl)
        return rv;
 }
 
-int Kill_subarray(char *dev, char *subarray, int quiet)
+int Kill_subarray(char *dev, char *subarray, int verbose)
 {
        /* Delete a subarray out of a container, the subarry must be
         * inactive.  The subarray string must be a subarray index
@@ -95,19 +95,19 @@ int Kill_subarray(char *dev, char *subarray, int quiet)
 
        memset(st, 0, sizeof(*st));
 
-       fd = open_subarray(dev, subarray, st, quiet);
+       fd = open_subarray(dev, subarray, st, verbose < 0);
        if (fd < 0)
                return 2;
 
        if (!st->ss->kill_subarray) {
-               if (!quiet)
+               if (verbose >= 0)
                        pr_err("Operation not supported for %s metadata\n",
                               st->ss->name);
                goto free_super;
        }
 
        if (is_subarray_active(subarray, st->devname)) {
-               if (!quiet)
+               if (verbose >= 0)
                        pr_err("Subarray-%s still active, aborting\n",
                               subarray);
                goto free_super;
@@ -119,7 +119,7 @@ int Kill_subarray(char *dev, char *subarray, int quiet)
        /* ok we've found our victim, drop the axe */
        rv = st->ss->kill_subarray(st);
        if (rv) {
-               if (!quiet)
+               if (verbose >= 0)
                        pr_err("Failed to delete subarray-%s from %s\n",
                               subarray, dev);
                goto free_super;
@@ -131,7 +131,7 @@ int Kill_subarray(char *dev, char *subarray, int quiet)
        else
                st->ss->sync_metadata(st);
 
-       if (!quiet)
+       if (verbose >= 0)
                pr_err("Deleted subarray-%s from %s, UUIDs may have changed\n",
                       subarray, dev);