From: John Ferlan Date: Fri, 7 Apr 2017 11:02:40 +0000 (-0400) Subject: disk: Resolve issues with disk partition build/start checks X-Git-Tag: v3.2.1~50 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=facbb1f0dfcb3a0aa15cbeb763452a00a5752960;p=thirdparty%2Flibvirt.git disk: Resolve issues with disk partition build/start checks https://bugzilla.redhat.com/show_bug.cgi?id=1439132 Commit id 'a48c674fb' added a check for format types "dvh" and "pc98" to use the parted print processing instead of using blkid processing in order to validate the label on the disk was what is expected for disk pool startup. However, commit id 'a4cb4a74f' really messed things up by missing an else condition causing PARTEDFindLabel to always return DIFFERENT. Signed-off-by: John Ferlan (cherry picked from commit f2a123203105b4fe010aea866e87f8bcf5f31193) --- diff --git a/src/storage/storage_util.c b/src/storage/storage_util.c index 715361923f..f2724b652b 100644 --- a/src/storage/storage_util.c +++ b/src/storage/storage_util.c @@ -3218,8 +3218,8 @@ virStorageBackendPARTEDFindLabel(const char *device, /* Does the on disk match what the pool desired? */ if (STREQ(start, format)) ret = VIR_STORAGE_PARTED_MATCH; - - ret = VIR_STORAGE_PARTED_DIFFERENT; + else + ret = VIR_STORAGE_PARTED_DIFFERENT; cleanup: virCommandFree(cmd);