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

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