summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Kondik <steve@cyngn.com>2015-11-26 02:02:57 -0800
committerSteve Kondik <steve@cyngn.com>2015-11-26 02:02:57 -0800
commit175cc9efdcfb716bb4b55ebeb8481c9984a18fce (patch)
tree631b5a19584265f2fd0e5f0c43bd9720a64c1fdc
parent7cfda80f256a69909c3954b62b86c94a189d9734 (diff)
downloadbootable_recovery-175cc9efdcfb716bb4b55ebeb8481c9984a18fce.zip
bootable_recovery-175cc9efdcfb716bb4b55ebeb8481c9984a18fce.tar.gz
bootable_recovery-175cc9efdcfb716bb4b55ebeb8481c9984a18fce.tar.bz2
sr: Fix build when oemlock plugin is enabled
Change-Id: Ic600231c9883a6e951ad951455b5af426fd4207a
-rw-r--r--recovery.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/recovery.cpp b/recovery.cpp
index e36e7d9..59e35c1 100644
--- a/recovery.cpp
+++ b/recovery.cpp
@@ -1413,9 +1413,10 @@ main(int argc, char **argv) {
#ifdef HAVE_OEMLOCK
if (oem_lock == OEM_LOCK_UNLOCK) {
- if (device->WipeData()) status = INSTALL_ERROR;
+ device->PreWipeData();
if (erase_volume("/data", true)) status = INSTALL_ERROR;
- if (wipe_cache && erase_volume("/cache", true)) status = INSTALL_ERROR;
+ if (should_wipe_cache && erase_volume("/cache", true)) status = INSTALL_ERROR;
+ device->PostWipeData();
if (status != INSTALL_SUCCESS) ui->Print("Data wipe failed.\n");
if (oemlock_set(0)) status = INSTALL_ERROR;
// Force reboot regardless of actual status