Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
27 lines
813 B
Diff
27 lines
813 B
Diff
From ca796729722da704e8a9c64c7a201cbe0a9cb9be Mon Sep 17 00:00:00 2001
|
|
From: Randy Eckenrode <randy@largeandhighquality.com>
|
|
Date: Mon, 5 Aug 2024 22:21:47 -0400
|
|
Subject: [PATCH] Conditionally pre-condition
|
|
|
|
---
|
|
wipefs.cpp | 4 +++-
|
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/wipefs.cpp b/wipefs.cpp
|
|
index d8e6339..6cb7963 100644
|
|
--- a/wipefs.cpp
|
|
+++ b/wipefs.cpp
|
|
@@ -391,7 +391,9 @@ wipefs_wipe(wipefs_ctx handle)
|
|
// Since we always issue a a single extent, set the kIOStorageUnmapOptionWhole
|
|
// option flag for drive pre-conditioning.
|
|
//
|
|
- unmap.options = kIOStorageUnmapOptionWhole;
|
|
+ if (__builtin_available(macOS 14.0, *)) {
|
|
+ unmap.options = kIOStorageUnmapOptionWhole;
|
|
+ }
|
|
|
|
//
|
|
// Don't bother to check the return value since this is mostly
|
|
--
|
|
2.44.1
|