summaryrefslogtreecommitdiffstats
path: root/updater/blockimg.cpp
diff options
context:
space:
mode:
authorandi34 <skate4life@gmx.de>2015-05-09 19:48:52 +0200
committerMichael Bestas <mkbestas@lineageos.org>2019-03-23 13:39:53 +0100
commit0ef6492518593eb1255e83723aaf9195fb582d6f (patch)
tree95cdff066049916dbc639bdeeec00405542e7dc2 /updater/blockimg.cpp
parentDon't copy local mke2fs.conf for O-MR1 (diff)
downloadandroid_bootable_recovery-0ef6492518593eb1255e83723aaf9195fb582d6f.tar
android_bootable_recovery-0ef6492518593eb1255e83723aaf9195fb582d6f.tar.gz
android_bootable_recovery-0ef6492518593eb1255e83723aaf9195fb582d6f.tar.bz2
android_bootable_recovery-0ef6492518593eb1255e83723aaf9195fb582d6f.tar.lz
android_bootable_recovery-0ef6492518593eb1255e83723aaf9195fb582d6f.tar.xz
android_bootable_recovery-0ef6492518593eb1255e83723aaf9195fb582d6f.tar.zst
android_bootable_recovery-0ef6492518593eb1255e83723aaf9195fb582d6f.zip
Diffstat (limited to '')
-rw-r--r--updater/blockimg.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/updater/blockimg.cpp b/updater/blockimg.cpp
index e93196b27..b44e1a219 100644
--- a/updater/blockimg.cpp
+++ b/updater/blockimg.cpp
@@ -1499,10 +1499,12 @@ static int PerformCommandErase(CommandParameters& params) {
// length in bytes
blocks[1] = (range.second - range.first) * static_cast<uint64_t>(BLOCKSIZE);
+#ifndef SUPPRESS_EMMC_WIPE
if (ioctl(params.fd, BLKDISCARD, &blocks) == -1) {
PLOG(ERROR) << "BLKDISCARD ioctl failed";
return -1;
}
+#endif
}
}