From 27556d089f8496c2acb72182ce7add94938eb749 Mon Sep 17 00:00:00 2001 From: Tianjie Xu Date: Wed, 22 May 2019 14:48:35 -0700 Subject: Some clean ups to the updater Remove some unnecessary includes or forward declarations. And include the correct headers to build host executables. Bug: 131911365 Test: unit tests pass Change-Id: I62e75f60678159fe24619a4bd386b1416f1a5b5d --- updater/blockimg.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'updater/blockimg.cpp') diff --git a/updater/blockimg.cpp b/updater/blockimg.cpp index 55218b023..2d41f610b 100644 --- a/updater/blockimg.cpp +++ b/updater/blockimg.cpp @@ -49,7 +49,6 @@ #include #include #include -#include #include #include @@ -63,10 +62,15 @@ #include "private/commands.h" #include "updater/install.h" -// Set this to 0 to interpret 'erase' transfers to mean do a -// BLKDISCARD ioctl (the normal behavior). Set to 1 to interpret -// erase to mean fill the region with zeroes. +#ifdef __ANDROID__ +#include +// Set this to 0 to interpret 'erase' transfers to mean do a BLKDISCARD ioctl (the normal behavior). +// Set to 1 to interpret erase to mean fill the region with zeroes. #define DEBUG_ERASE 0 +#else +#define DEBUG_ERASE 1 +#define AID_SYSTEM -1 +#endif // __ANDROID__ static constexpr size_t BLOCKSIZE = 4096; static constexpr mode_t STASH_DIRECTORY_MODE = 0700; -- cgit v1.2.3