From 83a5ad2731428d2c8217df4fb1ef6c87bdcca67b Mon Sep 17 00:00:00 2001 From: Logan Chien Date: Wed, 2 May 2018 10:57:56 +0800 Subject: [PATCH 1/3] Add linux/types.h to cryptfs.h This commit adds to cryptfs.h because cryptfs.h uses `__le16` and `__le32` which are defined in . The absence of will become an error after we sort the headers in the upcoming commits. Test: cd system/vold && mma Change-Id: I9930105ee86f80a29295b59596b21335c68a8e23 Merged-In: I9930105ee86f80a29295b59596b21335c68a8e23 --- cryptfs.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cryptfs.h b/cryptfs.h index d20d96d..07933e6 100644 --- a/cryptfs.h +++ b/cryptfs.h @@ -26,7 +26,10 @@ * partition. */ +#include #include +#include + #include /* The current cryptfs version */ From 862eef7ace9059b815e640605d3c7fedb05adcc8 Mon Sep 17 00:00:00 2001 From: Logan Chien Date: Wed, 2 May 2018 11:36:45 +0800 Subject: [PATCH 2/3] Reorder the include directives in cryptfs.cpp This commit reorders the include directives in cryptfs.cpp so that upcoming change can be obvious. Test: lunch aosp_walleye-userdebug && cd system/vold && mma Change-Id: I9d2ea66c15b7b68014a67ba7c1420075953459ba Merged-In: I9d2ea66c15b7b68014a67ba7c1420075953459ba --- cryptfs.cpp | 75 ++++++++++++++++++++++++++++------------------------- 1 file changed, 40 insertions(+), 35 deletions(-) diff --git a/cryptfs.cpp b/cryptfs.cpp index 2606959..c152631 100644 --- a/cryptfs.cpp +++ b/cryptfs.cpp @@ -20,49 +20,54 @@ * */ -#include -#include -#include +#define LOG_TAG "Cryptfs" + +#include "cryptfs.h" + +#include "EncryptInplace.h" +#include "Ext4Crypt.h" +#include "Keymaster.h" +#include "Process.h" +#include "ScryptParameters.h" +#include "VoldUtil.h" +#include "VolumeManager.h" +#include "secontext.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include "android-base/properties.h" +#include "cutils/android_reboot.h" +#include "cutils/log.h" +#include "cutils/properties.h" +#include "f2fs_sparseblock.h" +#include "hardware_legacy/power.h" + #include +#include #include #include -#include -#include -#include -#include #include +#include +#include +#include +#include #include -#include #include +#include #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include #include -#include -#include -#include "cryptfs.h" -#include "secontext.h" -#define LOG_TAG "Cryptfs" -#include "cutils/log.h" -#include "cutils/properties.h" -#include "cutils/android_reboot.h" -#include "hardware_legacy/power.h" -#include -#include "ScryptParameters.h" -#include "VolumeManager.h" -#include "VoldUtil.h" -#include "Ext4Crypt.h" -#include "f2fs_sparseblock.h" -#include "EncryptInplace.h" -#include "Process.h" -#include "Keymaster.h" -#include "android-base/properties.h" -#include +#include + extern "C" { #include } From 196d5850f28b23164c024370e9403fe184d2a7b2 Mon Sep 17 00:00:00 2001 From: Logan Chien Date: Wed, 2 May 2018 11:39:03 +0800 Subject: [PATCH 3/3] Replace library headers with angle quotations This commit replaces the double quotations for library headers with angle quotations. Test: cd system/vold && mma Change-Id: I3c14cfcf80f29173669409df548af84c1b39b96d Merged-In: I3c14cfcf80f29173669409df548af84c1b39b96d --- cryptfs.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cryptfs.cpp b/cryptfs.cpp index c152631..e8bf3aa 100644 --- a/cryptfs.cpp +++ b/cryptfs.cpp @@ -33,20 +33,20 @@ #include "VolumeManager.h" #include "secontext.h" +#include #include +#include +#include +#include #include #include +#include #include +#include #include #include #include #include -#include "android-base/properties.h" -#include "cutils/android_reboot.h" -#include "cutils/log.h" -#include "cutils/properties.h" -#include "f2fs_sparseblock.h" -#include "hardware_legacy/power.h" #include #include