Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit b78bf1f3 authored by LuK1337's avatar LuK1337
Browse files

fixup! recovery_utils: add support for unmounting entire volumes

Change-Id: I0cdb4b16047e9dac3a6d3c55ec8b91f582f24369
parent 5d49ff79
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -88,7 +88,14 @@ static bool EraseVolume(const char* volume, RecoveryUI* ui) {
    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;
  }