]> xenbits.xensource.com Git - libvirt.git/commitdiff
disk: Resolve issues with disk partition build/start checks
authorJohn Ferlan <jferlan@redhat.com>
Fri, 7 Apr 2017 11:02:40 +0000 (07:02 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Fri, 7 Apr 2017 15:58:36 +0000 (11:58 -0400)
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 <jferlan@redhat.com>
src/storage/storage_util.c

index 8e25984d7515e46894ebea88bf2bd7c3d69de262..b344fdfda5d9a8f83788ee9dcf8f4f74a028fa3b 100644 (file)
@@ -3245,8 +3245,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);