summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2021-12-03 00:52:08 +0100
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-12-03 00:52:08 +0100
commit999f9ed67e8ff7cd82b36e8f747e387463923896 (patch)
tree98042723be49b0dbdf9de9f2ebf75881e4629bb6
parentMerge "Avoid to format raw disk if metadata encryption is enabled" am: 5bd36e04be am: 744885a27a am: f473d0cef2 am: a639f66445 (diff)
parentMerge "Use metadata_key_dir instead of metadata_encryption" am: 389e5c114d am: 4e6e027086 am: 71fc1fb76e (diff)
downloadandroid_bootable_recovery-999f9ed67e8ff7cd82b36e8f747e387463923896.tar
android_bootable_recovery-999f9ed67e8ff7cd82b36e8f747e387463923896.tar.gz
android_bootable_recovery-999f9ed67e8ff7cd82b36e8f747e387463923896.tar.bz2
android_bootable_recovery-999f9ed67e8ff7cd82b36e8f747e387463923896.tar.lz
android_bootable_recovery-999f9ed67e8ff7cd82b36e8f747e387463923896.tar.xz
android_bootable_recovery-999f9ed67e8ff7cd82b36e8f747e387463923896.tar.zst
android_bootable_recovery-999f9ed67e8ff7cd82b36e8f747e387463923896.zip
-rw-r--r--recovery_utils/roots.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/recovery_utils/roots.cpp b/recovery_utils/roots.cpp
index d761e7525..7fe385b5e 100644
--- a/recovery_utils/roots.cpp
+++ b/recovery_utils/roots.cpp
@@ -182,7 +182,7 @@ int format_volume(const std::string& volume, const std::string& directory) {
// to get any failure in the process. In order to avoid it, let's simply wipe
// the raw disk if we don't reserve any space, which behaves exactly same as booting
// after "fastboot -w".
- if (!v->metadata_encryption.empty() && length == 0) {
+ if (!v->metadata_key_dir.empty() && length == 0) {
android::base::unique_fd fd(open(v->blk_device.c_str(), O_RDWR));
if (fd == -1) {
PLOG(ERROR) << "format_volume: failed to open " << v->blk_device;