summaryrefslogtreecommitdiff
path: root/libfscrypt
diff options
context:
space:
mode:
authorPaul Crowley <paulcrowley@google.com>2019-10-29 14:16:57 -0700
committerPaul Crowley <paulcrowley@google.com>2019-10-29 16:24:10 -0700
commitb11b8159e91a33831b8032cc9182f8c03ab09553 (patch)
tree79f326970babc053931bf79200e387c3153ee436 /libfscrypt
parent925804c49b755f53552ffa29c2ca563973432e9c (diff)
downloadextras-b11b8159e91a33831b8032cc9182f8c03ab09553.tar.gz
libfscrypt: Export FSCRYPT_POLICY_FLAG_IV_INO_LBLK_64
We need to test for this flag when deciding whether to set stable_inodes. Bug: 143307095 Test: Set inlinecrypt_optimized, check that stable_inodes is set Change-Id: Ic3245466eccd88ed2784ff4b2a348ca65085e2a4
Diffstat (limited to 'libfscrypt')
-rw-r--r--libfscrypt/fscrypt.cpp3
-rw-r--r--libfscrypt/include/fscrypt/fscrypt.h3
-rw-r--r--libfscrypt/tests/fscrypt_test.cpp3
3 files changed, 3 insertions, 6 deletions
diff --git a/libfscrypt/fscrypt.cpp b/libfscrypt/fscrypt.cpp
index b0c9ed6e..b76f0b17 100644
--- a/libfscrypt/fscrypt.cpp
+++ b/libfscrypt/fscrypt.cpp
@@ -66,9 +66,6 @@ struct fscrypt_policy_v2 {
#endif /* FSCRYPT_POLICY_V1 */
-// TODO: switch to <linux/fscrypt.h> once it's in Bionic
-#define FSCRYPT_POLICY_FLAG_IV_INO_LBLK_64 0x08
-
/* modes not supported by upstream kernel, so not in <linux/fs.h> */
#define FS_ENCRYPTION_MODE_AES_256_HEH 126
#define FS_ENCRYPTION_MODE_PRIVATE 127
diff --git a/libfscrypt/include/fscrypt/fscrypt.h b/libfscrypt/include/fscrypt/fscrypt.h
index ca051f4a..2b809866 100644
--- a/libfscrypt/include/fscrypt/fscrypt.h
+++ b/libfscrypt/include/fscrypt/fscrypt.h
@@ -19,6 +19,9 @@
#include <string>
+// TODO: switch to <linux/fscrypt.h> once it's in Bionic
+#define FSCRYPT_POLICY_FLAG_IV_INO_LBLK_64 0x08
+
bool fscrypt_is_native();
static const char* fscrypt_unencrypted_folder = "/unencrypted";
diff --git a/libfscrypt/tests/fscrypt_test.cpp b/libfscrypt/tests/fscrypt_test.cpp
index eedcc34d..677f0f22 100644
--- a/libfscrypt/tests/fscrypt_test.cpp
+++ b/libfscrypt/tests/fscrypt_test.cpp
@@ -22,9 +22,6 @@
using namespace android::fscrypt;
-// TODO: switch to <linux/fscrypt.h> once it's in Bionic
-#define FSCRYPT_POLICY_FLAG_IV_INO_LBLK_64 0x08
-
/* modes not supported by upstream kernel, so not in <linux/fs.h> */
#define FS_ENCRYPTION_MODE_AES_256_HEH 126
#define FS_ENCRYPTION_MODE_PRIVATE 127