From e0217d7b9ec71d18176b85f837c3d47a55ff9779 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Thu, 16 Jul 2020 16:31:00 -0700 Subject: [PATCH] vold: drop local fscrypt UAPI definitions Now that Bionic's copy of has been updated, there's no need for vold to carry its own fscrypt_uapi.h. Test: build Change-Id: I61581ac74f7cf77bc8a835e64d96553a9d0c517a --- KeyUtil.cpp | 3 +-- fscrypt_uapi.h | 27 --------------------------- 2 files changed, 1 insertion(+), 29 deletions(-) delete mode 100644 fscrypt_uapi.h diff --git a/KeyUtil.cpp b/KeyUtil.cpp index acc42db..948e799 100644 --- a/KeyUtil.cpp +++ b/KeyUtil.cpp @@ -30,7 +30,6 @@ #include #include -#include #include "KeyStorage.h" #include "Utils.h" @@ -245,7 +244,7 @@ static bool buildKeySpecifier(fscrypt_key_specifier* spec, const EncryptionPolic // https://www.kernel.org/doc/html/latest/filesystems/fscrypt.html#fs-ioc-add-encryption-key static bool installFsKeyringKey(const std::string& mountpoint, const EncryptionOptions& options, fscrypt_add_key_arg* arg) { - if (options.use_hw_wrapped_key) arg->flags |= FSCRYPT_ADD_KEY_FLAG_WRAPPED; + if (options.use_hw_wrapped_key) arg->__flags |= __FSCRYPT_ADD_KEY_FLAG_HW_WRAPPED; android::base::unique_fd fd(open(mountpoint.c_str(), O_RDONLY | O_DIRECTORY | O_CLOEXEC)); if (fd == -1) { diff --git a/fscrypt_uapi.h b/fscrypt_uapi.h deleted file mode 100644 index 3cda96e..0000000 --- a/fscrypt_uapi.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef _UAPI_LINUX_FSCRYPT_VOLD_H -#define _UAPI_LINUX_FSCRYPT_VOLD_H - -#include -#include - -#define FSCRYPT_ADD_KEY_FLAG_WRAPPED 0x01 - -struct sys_fscrypt_add_key_arg { - struct fscrypt_key_specifier key_spec; - __u32 raw_size; - __u32 key_id; - __u32 __reserved[7]; - __u32 flags; - __u8 raw[]; -}; - -struct sys_fscrypt_provisioning_key_payload { - __u32 type; - __u32 __reserved; - __u8 raw[]; -}; - -#define fscrypt_add_key_arg sys_fscrypt_add_key_arg -#define fscrypt_provisioning_key_payload sys_fscrypt_provisioning_key_payload - -#endif //_UAPI_LINUX_FSCRYPT_VOLD_H