aboutsummaryrefslogtreecommitdiffstats
path: root/roots.cpp
diff options
context:
space:
mode:
authorTom Marshall <tdm@cyngn.com>2015-11-06 16:27:01 -0800
committerTom Marshall <tdm@cyngn.com>2015-11-25 15:34:35 -0800
commitacc855f711ae7bce20e4fc896c829e135a6801fc (patch)
treea7be8c1fc394571765cda5e8b27c12c92ec1cc7d /roots.cpp
parente1ba5bc721daf65598feb2b5c46d1c06fac63ec4 (diff)
downloadbootable_recovery-acc855f711ae7bce20e4fc896c829e135a6801fc.zip
bootable_recovery-acc855f711ae7bce20e4fc896c829e135a6801fc.tar.gz
bootable_recovery-acc855f711ae7bce20e4fc896c829e135a6801fc.tar.bz2
recovery: Handle oemunlock command
* Conditionally compile support based on TARGET_HAVE_OEMLOCK. * Use liboemunlock for device specific support. Change-Id: I1cf1fef8e30075b0586bb86625b7df49723974cb
Diffstat (limited to 'roots.cpp')
-rw-r--r--roots.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/roots.cpp b/roots.cpp
index fda8f61..d27a2dd 100644
--- a/roots.cpp
+++ b/roots.cpp
@@ -348,7 +348,7 @@ static int rmtree_except(const char* path, const char* except)
return rc;
}
-int format_volume(const char* volume) {
+int format_volume(const char* volume, bool force) {
if (strcmp(volume, "media") == 0) {
if (!vdc->isEmulatedStorage()) {
return 0;
@@ -378,7 +378,7 @@ int format_volume(const char* volume) {
return -1;
}
- if (strcmp(volume, "/data") == 0 && vdc->isEmulatedStorage()) {
+ if (!force && strcmp(volume, "/data") == 0 && vdc->isEmulatedStorage()) {
if (ensure_path_mounted("/data") == 0) {
// Preserve .layout_version to avoid "nesting bug"
LOGI("Preserving layout version\n");