summaryrefslogtreecommitdiffstats
path: root/updater/blockimg.cpp
diff options
context:
space:
mode:
authorTianjie Xu <xunchang@google.com>2019-05-24 06:45:43 +0200
committerGerrit Code Review <noreply-gerritcodereview@google.com>2019-05-24 06:45:43 +0200
commit52e61f699514dde119e8d4b1b4d2a3d7a9f7869c (patch)
treeb5d3c52ae588e83c2b26a762f01a796da2b5c73f /updater/blockimg.cpp
parentMerge "Move off the Next ZipString overload." (diff)
parentSome clean ups to the updater (diff)
downloadandroid_bootable_recovery-52e61f699514dde119e8d4b1b4d2a3d7a9f7869c.tar
android_bootable_recovery-52e61f699514dde119e8d4b1b4d2a3d7a9f7869c.tar.gz
android_bootable_recovery-52e61f699514dde119e8d4b1b4d2a3d7a9f7869c.tar.bz2
android_bootable_recovery-52e61f699514dde119e8d4b1b4d2a3d7a9f7869c.tar.lz
android_bootable_recovery-52e61f699514dde119e8d4b1b4d2a3d7a9f7869c.tar.xz
android_bootable_recovery-52e61f699514dde119e8d4b1b4d2a3d7a9f7869c.tar.zst
android_bootable_recovery-52e61f699514dde119e8d4b1b4d2a3d7a9f7869c.zip
Diffstat (limited to 'updater/blockimg.cpp')
-rw-r--r--updater/blockimg.cpp12
1 files changed, 8 insertions, 4 deletions
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 <brotli/decode.h>
#include <fec/io.h>
#include <openssl/sha.h>
-#include <private/android_filesystem_config.h>
#include <verity/hash_tree_builder.h>
#include <ziparchive/zip_archive.h>
@@ -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 <private/android_filesystem_config.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.
#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;