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

Unverified Commit 1e516445 authored by Alessandro Astone's avatar Alessandro Astone Committed by Michael Bestas
Browse files

fs_mgr: mount: don't set the block device as ro for recovery

 * In recovery we need to be able to edit the block device
   after it's been mounted.
   This allows, for example, to wipe system after mounting it

Change-Id: Ie536d275643e9d6063bba789e4cd2fa2671fc8fa
parent 527a7fdf
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -161,6 +161,11 @@ cc_library {
    srcs: [
        ":libfiemap_passthrough_srcs",
    ],
    target: {
        recovery: {
            cflags: ["-DSKIP_SET_BLK_RO"],
        },
    },
}

cc_library {
+2 −0
Original line number Diff line number Diff line
@@ -837,9 +837,11 @@ static int __mount(const std::string& source, const std::string& target, const F
    }
    PINFO << __FUNCTION__ << "(source=" << source << source_missing << ",target=" << target
          << target_missing << ",type=" << entry.fs_type << ")=" << ret;
#ifndef SKIP_SET_BLK_RO
    if ((ret == 0) && (mountflags & MS_RDONLY) != 0) {
        fs_mgr_set_blk_ro(source);
    }
#endif
    android::base::SetProperty("ro.boottime.init.mount." + Basename(target),
                               std::to_string(t.duration().count()));
    errno = save_errno;