summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Lawrence <paullawrence@google.com>2016-02-25 22:45:00 +0100
committerandroid-build-merger <android-build-merger@google.com>2016-02-25 22:45:00 +0100
commite048f0ba7fb5a8fdd0d683aa58d4fb12715fcf5d (patch)
treed12d57be4447c3b4ec74d742ca7f1c770ded90fa
parentMerge "minadbd: update for adb_thread_create signature change." into nyc-dev am: 0757a093c1 (diff)
parentMove recovery\'s convert_fbe folder to /tmp (diff)
downloadandroid_bootable_recovery-e048f0ba7fb5a8fdd0d683aa58d4fb12715fcf5d.tar
android_bootable_recovery-e048f0ba7fb5a8fdd0d683aa58d4fb12715fcf5d.tar.gz
android_bootable_recovery-e048f0ba7fb5a8fdd0d683aa58d4fb12715fcf5d.tar.bz2
android_bootable_recovery-e048f0ba7fb5a8fdd0d683aa58d4fb12715fcf5d.tar.lz
android_bootable_recovery-e048f0ba7fb5a8fdd0d683aa58d4fb12715fcf5d.tar.xz
android_bootable_recovery-e048f0ba7fb5a8fdd0d683aa58d4fb12715fcf5d.tar.zst
android_bootable_recovery-e048f0ba7fb5a8fdd0d683aa58d4fb12715fcf5d.zip
-rw-r--r--recovery.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/recovery.cpp b/recovery.cpp
index 593d0945f..4ae685f6a 100644
--- a/recovery.cpp
+++ b/recovery.cpp
@@ -79,8 +79,8 @@ static const char *INTENT_FILE = "/cache/recovery/intent";
static const char *LOG_FILE = "/cache/recovery/log";
static const char *LAST_INSTALL_FILE = "/cache/recovery/last_install";
static const char *LOCALE_FILE = "/cache/recovery/last_locale";
-static const char *CONVERT_FBE_DIR = "/cache/recovery/convert_fbe";
-static const char *CONVERT_FBE_FILE = "/cache/recovery/convert_fbe/convert_fbe";
+static const char *CONVERT_FBE_DIR = "/tmp/convert_fbe";
+static const char *CONVERT_FBE_FILE = "/tmp/convert_fbe/convert_fbe";
static const char *CACHE_ROOT = "/cache";
static const char *DATA_ROOT = "/data";
static const char *SDCARD_ROOT = "/sdcard";
@@ -576,10 +576,13 @@ static bool erase_volume(const char* volume) {
if (is_data && reason && strcmp(reason, "convert_fbe") == 0) {
// Create convert_fbe breadcrumb file to signal to init
// to convert to file based encryption, not full disk encryption
- mkdir(CONVERT_FBE_DIR, 0700);
+ if (mkdir(CONVERT_FBE_DIR, 0700) != 0) {
+ ui->Print("Failed to make convert_fbe dir %s\n", strerror(errno));
+ return true;
+ }
FILE* f = fopen(CONVERT_FBE_FILE, "wb");
if (!f) {
- ui->Print("Failed to convert to file encryption\n");
+ ui->Print("Failed to convert to file encryption %s\n", strerror(errno));
return true;
}
fclose(f);