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

Commit 0cd2d5f0 authored by Yifan Hong's avatar Yifan Hong
Browse files

fs_mgr_do_mount_one: allow overriding mount_point

Test: boots
Bug: 118634720
Change-Id: Ie2d05fdead27bfb1c922749272ff648bc7c418d1
parent 8fd4435d
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1179,11 +1179,12 @@ int fs_mgr_mount_all(Fstab* fstab, int mount_mode) {

// wrapper to __mount() and expects a fully prepared fstab_rec,
// unlike fs_mgr_do_mount which does more things with avb / verity etc.
int fs_mgr_do_mount_one(const FstabEntry& entry) {
int fs_mgr_do_mount_one(const FstabEntry& entry, const std::string& mount_point) {
    // Run fsck if needed
    prepare_fs_for_mount(entry.blk_device, entry);

    int ret = __mount(entry.blk_device, entry.mount_point, entry);
    int ret =
            __mount(entry.blk_device, mount_point.empty() ? entry.mount_point : mount_point, entry);
    if (ret) {
      ret = (errno == EBUSY) ? FS_MGR_DOMNT_BUSY : FS_MGR_DOMNT_FAILED;
    }
+1 −1
Original line number Diff line number Diff line
@@ -69,7 +69,7 @@ int fs_mgr_mount_all(Fstab* fstab, int mount_mode);
int fs_mgr_do_mount(fstab* fstab, const char* n_name, char* n_blk_device, char* tmp_mount_point);
int fs_mgr_do_mount(fstab* fstab, const char* n_name, char* n_blk_device, char* tmp_mount_point,
                    bool need_cp);
int fs_mgr_do_mount_one(const FstabEntry& entry);
int fs_mgr_do_mount_one(const FstabEntry& entry, const std::string& mount_point = "");
int fs_mgr_do_mount_one(fstab_rec* rec);
int fs_mgr_do_tmpfs_mount(const char *n_name);
fstab_rec const* fs_mgr_get_crypt_entry(fstab const* fstab);