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

Commit 057bdc0a authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 4383937 from bf141af6 to oc-mr1-release

Change-Id: Ic2db7a5fa68154ae484472548ec33e00a942a397
parents c1f49116 bf141af6
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -84,8 +84,8 @@ class MountEntry {
          mnt_type_(entry.mnt_type),
          mnt_type_(entry.mnt_type),
          mnt_opts_(entry.mnt_opts) {}
          mnt_opts_(entry.mnt_opts) {}


    bool Umount() {
    bool Umount(bool force) {
        int r = umount2(mnt_dir_.c_str(), 0);
        int r = umount2(mnt_dir_.c_str(), force ? MNT_FORCE : 0);
        if (r == 0) {
        if (r == 0) {
            LOG(INFO) << "umounted " << mnt_fsname_ << ":" << mnt_dir_ << " opts " << mnt_opts_;
            LOG(INFO) << "umounted " << mnt_fsname_ << ":" << mnt_dir_ << " opts " << mnt_opts_;
            return true;
            return true;
@@ -287,11 +287,11 @@ static UmountStat UmountPartitions(std::chrono::milliseconds timeout) {
        }
        }
        if (emulated_devices.size() > 0 &&
        if (emulated_devices.size() > 0 &&
            std::all_of(emulated_devices.begin(), emulated_devices.end(),
            std::all_of(emulated_devices.begin(), emulated_devices.end(),
                        [](auto& entry) { return entry.Umount(); })) {
                        [](auto& entry) { return entry.Umount(false); })) {
            sync();
            sync();
        }
        }
        for (auto& entry : block_devices) {
        for (auto& entry : block_devices) {
            entry.Umount();
            entry.Umount(timeout == 0ms);
        }
        }
        retry++;
        retry++;
        std::this_thread::sleep_for(100ms);
        std::this_thread::sleep_for(100ms);