Blame SOURCES/cryptsetup-2.0.4-update-crypt_repair-API-documentation-for-LUKS2.patch

ad2d76
From 167da99eaa9708289492e8fca2ebe4964cf5baa7 Mon Sep 17 00:00:00 2001
ad2d76
From: Ondrej Kozina <okozina@redhat.com>
ad2d76
Date: Mon, 9 Jul 2018 17:27:55 +0200
ad2d76
Subject: [PATCH 5/6] Update crypt_repair API documentation for LUKS2.
ad2d76
ad2d76
---
ad2d76
 lib/libcryptsetup.h | 10 ++++++----
ad2d76
 1 file changed, 6 insertions(+), 4 deletions(-)
ad2d76
ad2d76
diff --git a/lib/libcryptsetup.h b/lib/libcryptsetup.h
ad2d76
index 0a7ebdb..2d959fa 100644
ad2d76
--- a/lib/libcryptsetup.h
ad2d76
+++ b/lib/libcryptsetup.h
ad2d76
@@ -624,7 +624,7 @@ int crypt_load(struct crypt_device *cd,
ad2d76
 	void *params);
ad2d76
 
ad2d76
 /**
ad2d76
- * Try to repair crypt device LUKS1 on-disk header if invalid.
ad2d76
+ * Try to repair crypt device LUKS on-disk header if invalid.
ad2d76
  *
ad2d76
  * @param cd crypt device handle
ad2d76
  * @param requested_type @link crypt-type @endlink or @e NULL for all known
ad2d76
@@ -632,9 +632,11 @@ int crypt_load(struct crypt_device *cd,
ad2d76
  *
ad2d76
  * @returns 0 on success or negative errno value otherwise.
ad2d76
  *
ad2d76
- * @note Does not support LUKS2 devices explicitly. LUKS2 header is auto-repaired
ad2d76
- *	 (if exactly one header checksum does not match) automatically on
ad2d76
- *	 crypt_load().
ad2d76
+ * @note For LUKS2 device crypt_repair bypass blkid checks and
ad2d76
+ * 	 perform auto-recovery even though there're third party device
ad2d76
+ * 	 signatures found by blkid probes. Currently the crypt_repair on LUKS2
ad2d76
+ * 	 works only if exactly one header checksum does not match or exactly
ad2d76
+ * 	 one header is missing.
ad2d76
  */
ad2d76
 int crypt_repair(struct crypt_device *cd,
ad2d76
 	const char *requested_type,
ad2d76
-- 
ad2d76
1.8.3.1
ad2d76