From 723c4406d60c22dbd6a6631576d8372a7689e707 Mon Sep 17 00:00:00 2001 From: Yann Dirson Date: Wed, 5 Jul 2023 16:57:26 +0200 Subject: [PATCH] lvutil: use wipefs not dd to clear existing signatures (xapi-project#624) --- drivers/util.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/util.py b/drivers/util.py index 50c9a5a86..5a91e0170 100755 --- a/drivers/util.py +++ b/drivers/util.py @@ -637,6 +637,10 @@ def zeroOut(path, fromByte, bytes): return True +def wipe(blockdev): + "Wipe filesystem signatures from `blockdev`" + + def match_rootdev(s): regex = re.compile("^PRIMARY_DISK") return regex.search(s, 0)