cryptfs: [HACK] reboot if the crypto block dev failed to open
There are cases where the /dev/block/dm-0 fails to open.
This leads to the device not completing the boot up sequence.
Currently, the only way out is to reboot.
Bug: 17898962
Change-Id: If4583ebb1ef1ebdbaf680d69b876459aaec2f4ce
(cherry picked from commit 7fc1de8a44307d6c51826ab90f804702e08d1e6d)
diff --git a/cryptfs.h b/cryptfs.h
index 490bc11..66e0b4c 100644
--- a/cryptfs.h
+++ b/cryptfs.h
@@ -196,6 +196,11 @@
#define CRYPTO_COMPLETE_INCONSISTENT -3
#define CRYPTO_COMPLETE_CORRUPT -4
+/* Return values for cryptfs_enable_inplace*() */
+#define ENABLE_INPLACE_OK 0
+#define ENABLE_INPLACE_ERR_OTHER -1
+#define ENABLE_INPLACE_ERR_DEV -2 /* crypto_blkdev issue */
+
#ifdef __cplusplus
extern "C" {
#endif