]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
wipefs: force GPT detection
authorKarel Zak <kzak@redhat.com>
Wed, 13 Apr 2016 12:41:47 +0000 (14:41 +0200)
committerKarel Zak <kzak@redhat.com>
Fri, 15 Apr 2016 14:28:30 +0000 (16:28 +0200)
The library libblkid (as well as fdisks) requires protective MBR when
probe for GPT by default.  This is unnecessary for wipefs where we're
more promiscuous and we want to delete as much as possible. This patch
enables BLKID_PARTS_FORCE_GPT for wipefs.

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1326474
Signed-off-by: Karel Zak <kzak@redhat.com>
misc-utils/wipefs.c

index 9cd29ad98ee05e0c243819349e52530741241950..0021e76e60c86f6ba0cc5229af97e8be6b7b8dea 100644 (file)
@@ -261,8 +261,8 @@ new_probe(const char *devname, int mode)
                        BLKID_SUBLKS_BADCSUM);  /* accept bad checksums */
 
        blkid_probe_enable_partitions(pr, 1);
-       blkid_probe_set_partitions_flags(pr, BLKID_PARTS_MAGIC);
-
+       blkid_probe_set_partitions_flags(pr, BLKID_PARTS_MAGIC |
+                                            BLKID_PARTS_FORCE_GPT);
        return pr;
 error:
        blkid_free_probe(pr);