For BitLocker disks cryptsetup does not (yet? ever?) support reading
UUIDs and this function will fail.  This does not matter here so just
ignore the error.

Updates commit bb4a2dc17a78b53437896d4215ae82df8e11b788.
---
 options/decrypt.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/options/decrypt.c b/options/decrypt.c
index 58f8df9..069a83f 100644
--- a/options/decrypt.c
+++ b/options/decrypt.c
@@ -83,7 +83,11 @@ inspect_do_decrypt (guestfs_h *g, struct key_store *ks)
       CLEANUP_FREE char *mapname = make_mapname (partitions[i]);
 
 #ifdef GUESTFS_HAVE_LUKS_UUID
-      CLEANUP_FREE char *uuid = guestfs_luks_uuid (g, partitions[i]);
+      /* This may fail for Windows BitLocker disks, so hide errors. */
+      CLEANUP_FREE char *uuid;
+      guestfs_push_error_handler (g, NULL, NULL);
+      uuid = guestfs_luks_uuid (g, partitions[i]);
+      guestfs_pop_error_handler (g);
 #else
       const char *uuid = NULL;
 #endif
-- 
2.25.0

_______________________________________________
Libguestfs mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/libguestfs

Reply via email to