fixup! recovery_utils: add support for unmounting entire volumes
Change-Id: I0cdb4b16047e9dac3a6d3c55ec8b91f582f24369
diff --git a/install/wipe_data.cpp b/install/wipe_data.cpp
index 6357aac..56d3674 100644
--- a/install/wipe_data.cpp
+++ b/install/wipe_data.cpp
@@ -93,7 +93,14 @@
close(fd);
}
- if (ensure_volume_unmounted(vol->blk_device) == -1) {
+ std::string blk_device;
+
+ if (!android::base::Realpath(vol->blk_device, &blk_device)) {
+ PLOG(ERROR) << "Failed to convert \"" << vol->blk_device << "\" to absolute path";
+ return false;
+ }
+
+ if (ensure_volume_unmounted(blk_device) == -1) {
PLOG(ERROR) << "Failed to unmount volume!";
return false;
}