]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libfdisk: use new blkid_wipe_all helper
authorThomas Weißschuh <thomas@t-8ch.de>
Wed, 29 Nov 2023 18:51:49 +0000 (19:51 +0100)
committerThomas Weißschuh <thomas@t-8ch.de>
Wed, 29 Nov 2023 18:59:46 +0000 (19:59 +0100)
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
libfdisk/src/wipe.c

index 53099fd44473e995d7f894a19441805024cc5803..bb5f1bb38bf6e7c5ac1c90a8aedfaebc130de6ad 100644 (file)
@@ -134,17 +134,8 @@ int fdisk_do_wipe(struct fdisk_context *cxt)
                        return rc;
                }
 
-               blkid_probe_enable_superblocks(pr, 1);
-               blkid_probe_set_superblocks_flags(pr, BLKID_SUBLKS_MAGIC |
-                                                     BLKID_SUBLKS_BADCSUM);
-               blkid_probe_enable_partitions(pr, 1);
-               blkid_probe_set_partitions_flags(pr, BLKID_PARTS_MAGIC |
-                                                    BLKID_PARTS_FORCE_GPT);
-
-               while (blkid_do_probe(pr) == 0) {
-                       DBG(WIPE, ul_debugobj(wp, " wiping..."));
-                       blkid_do_wipe(pr, FALSE);
-               }
+               DBG(WIPE, ul_debugobj(wp, " wiping..."));
+               blkid_wipe_all(pr);
        }
 
        blkid_free_probe(pr);