diff options
author | Eric Biggers <ebiggers@google.com> | 2022-06-15 18:52:58 +0000 |
---|---|---|
committer | Eric Biggers <ebiggers@google.com> | 2022-06-15 18:52:58 +0000 |
commit | b12e16054623b5a01b31d169480712d57e589e12 (patch) | |
tree | 283cda86d6e631d3b23618b8b52c3d538e86e9c3 /libfscrypt | |
parent | 0695b96133fd0e2d16b02e4680e2096753a24e8e (diff) | |
download | extras-b12e16054623b5a01b31d169480712d57e589e12.tar.gz |
Rename fscrypt_is_native() to IsFbeEnabled()
Now that emulated FBE is no longer supported, there is no longer any
distinction between native FBE and emulated FBE. There is just FBE.
Referring to FBE as "fscrypt" is also poor practice, as fscrypt (the
Linux kernel support for filesystem-level encryption) is just one part
of FBE, the Android feature.
Therefore, rename fscrypt_is_native() to IsFbeEnabled().
Bug: 232458753
Change-Id: I6e004b0116d3aee491da553b178c33af0cba2ac6
Diffstat (limited to 'libfscrypt')
-rw-r--r-- | libfscrypt/fscrypt.cpp | 3 | ||||
-rw-r--r-- | libfscrypt/include/fscrypt/fscrypt.h | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/libfscrypt/fscrypt.cpp b/libfscrypt/fscrypt.cpp index f6e97f11..f8a912fe 100644 --- a/libfscrypt/fscrypt.cpp +++ b/libfscrypt/fscrypt.cpp @@ -85,7 +85,8 @@ static bool LookupModeById(const std::vector<struct ModeLookupEntry>& modes, int return false; } -bool fscrypt_is_native() { +// Returns true if FBE (File Based Encryption) is enabled. +bool IsFbeEnabled() { char value[PROPERTY_VALUE_MAX]; property_get("ro.crypto.type", value, "none"); return !strcmp(value, "file"); diff --git a/libfscrypt/include/fscrypt/fscrypt.h b/libfscrypt/include/fscrypt/fscrypt.h index f3779d00..11f37119 100644 --- a/libfscrypt/include/fscrypt/fscrypt.h +++ b/libfscrypt/include/fscrypt/fscrypt.h @@ -19,7 +19,7 @@ #include <string> -bool fscrypt_is_native(); +bool IsFbeEnabled(); static const char* fscrypt_unencrypted_folder = "/unencrypted"; static const char* fscrypt_key_ref = "/unencrypted/ref"; |