]> sourceware.org Git - lvm2.git/commitdiff
lvconvert: Treat --repair as an independent case.
authorAlasdair G Kergon <agk@redhat.com>
Tue, 2 Aug 2016 15:21:34 +0000 (16:21 +0100)
committerAlasdair G Kergon <agk@redhat.com>
Tue, 2 Aug 2016 15:22:12 +0000 (16:22 +0100)
tools/lvconvert.c

index 80760c6b48ad2565fbb5ebbe1f83216e0398c638..6c57191d06c500281a44eb093f855761ee957771 100644 (file)
@@ -626,7 +626,7 @@ static int _read_params(struct cmd_context *cmd, int argc, char **argv,
 
        /* We should have caught all these cases already. */
        if (lp->merge + lp->splitsnapshot + lp->splitcache + lp->split + lp->uncache +
-           lp->cache + lp->thin + lp->keep_mimages + lp->snapshot + lp->replace > 1) {
+           lp->cache + lp->thin + lp->keep_mimages + lp->snapshot + lp->replace + lp->repair > 1) {
                log_error(INTERNAL_ERROR "Unexpected combination of incompatible options selected.");
                return 0;
        }
@@ -643,7 +643,8 @@ static int _read_params(struct cmd_context *cmd, int argc, char **argv,
         *   lp->keep_mimages
         *   lp->snapshot
         *   lp->replace
-        *   --type mirror|raid  lp->repair lp->mirrorlog lp->corelog
+        *   lp->repair
+        *   --type mirror|raid  lp->mirrorlog lp->corelog
         *   --type raid0|striped
         */
        if (lp->merge) {        /* Snapshot or mirror merge */
@@ -722,8 +723,10 @@ static int _read_params(struct cmd_context *cmd, int argc, char **argv,
                                                                    tmp_str)))
                                return_0;
                }
-       } else if (_mirror_or_raid_type_requested(cmd, lp->type_str) ||
-                  lp->repair || lp->mirrorlog || lp->corelog) { /* Mirrors (and some RAID functions) */
+       } else if (lp->repair)
+               ;
+       else if (_mirror_or_raid_type_requested(cmd, lp->type_str) ||
+                  lp->mirrorlog || lp->corelog) { /* Mirrors (and some RAID functions) */
                if (arg_is_set(cmd, chunksize_ARG)) {
                        log_error("--chunksize is only available with snapshots or pools.");
                        return 0;
This page took 0.042615 seconds and 5 git commands to generate.