render / rpms / libvirt

Forked from rpms/libvirt 9 months ago
Clone
3e5111
From 5c1a822cfa7993b1f55f90b75b66c86787a063d1 Mon Sep 17 00:00:00 2001
3e5111
Message-Id: <5c1a822cfa7993b1f55f90b75b66c86787a063d1@dist-git>
3e5111
From: John Ferlan <jferlan@redhat.com>
3e5111
Date: Wed, 26 Apr 2017 08:41:08 -0400
3e5111
Subject: [PATCH] disk: Resolve issues with disk partition build/start checks
3e5111
3e5111
https://bugzilla.redhat.com/show_bug.cgi?id=1439132
3e5111
3e5111
Commit id 'a48c674fb' added a check for format types "dvh" and "pc98"
3e5111
to use the parted print processing instead of using blkid processing
3e5111
in order to validate the label on the disk was what is expected for
3e5111
disk pool startup. However, commit id 'a4cb4a74f' really messed things
3e5111
up by missing an else condition causing PARTEDFindLabel to always
3e5111
return DIFFERENT.
3e5111
3e5111
Signed-off-by: John Ferlan <jferlan@redhat.com>
3e5111
(cherry picked from commit f2a123203105b4fe010aea866e87f8bcf5f31193)
3e5111
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
3e5111
---
3e5111
 src/storage/storage_util.c | 4 ++--
3e5111
 1 file changed, 2 insertions(+), 2 deletions(-)
3e5111
3e5111
diff --git a/src/storage/storage_util.c b/src/storage/storage_util.c
3e5111
index 0ceaab6b9..7a458b828 100644
3e5111
--- a/src/storage/storage_util.c
3e5111
+++ b/src/storage/storage_util.c
3e5111
@@ -3213,8 +3213,8 @@ virStorageBackendPARTEDFindLabel(const char *device,
3e5111
     /*  Does the on disk match what the pool desired? */
3e5111
     if (STREQ(start, format))
3e5111
         ret = VIR_STORAGE_PARTED_MATCH;
3e5111
-
3e5111
-    ret = VIR_STORAGE_PARTED_DIFFERENT;
3e5111
+    else
3e5111
+        ret = VIR_STORAGE_PARTED_DIFFERENT;
3e5111
 
3e5111
  cleanup:
3e5111
     virCommandFree(cmd);
3e5111
-- 
3e5111
2.12.2
3e5111