]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
disk: Force usage of parted when checking disk format for "bsd"
authorJohn Ferlan <jferlan@redhat.com>
Fri, 7 Apr 2017 13:38:44 +0000 (09:38 -0400)
committerCole Robinson <crobinso@redhat.com>
Wed, 10 May 2017 19:20:12 +0000 (15:20 -0400)
https://bugzilla.redhat.com/show_bug.cgi?id=1439132

Add "bsd" to the list of format types to not checked during blkid
processing even though it supposedly knows the format - for some
(now unknown) reason it's returning partition table not found. So
let's just let PARTED handle "bsd" too.

Signed-off-by: John Ferlan <jferlan@redhat.com>
(cherry picked from commit 98f424d5038b362d1b62549930d0b9253106bdca)

src/storage/storage_util.c

index f2724b652b050cd16659b472fc99c316fe335424..8ee24be474f50aadd31a32b7b3ba58717e3490b0 100644 (file)
@@ -3007,10 +3007,12 @@ virStorageBackendBLKIDFindPart(blkid_probe probe,
 
     /* A blkid_known_pttype on "dvh" and "pc98" returns a failure;
      * however, the blkid_do_probe for "dvh" returns "sgi" and
-     * for "pc98" it returns "dos". So since those will cause problems
+     * for "pc98" it returns "dos". Although "bsd" is recognized,
+     * it seems that the parted created partition table is not being
+     * properly recogized. Since each of these will cause problems
      * with startup comparison, let's just treat them as UNKNOWN causing
      * the caller to fallback to using PARTED */
-    if (STREQ(format, "dvh") || STREQ(format, "pc98"))
+    if (STREQ(format, "dvh") || STREQ(format, "pc98") || STREQ(format, "bsd"))
         return VIR_STORAGE_BLKID_PROBE_UNKNOWN;
 
     /* Make sure we're doing a partitions probe from the start */