Loading fs_mgr/fs_mgr.c +5 −3 Original line number Diff line number Diff line Loading @@ -486,7 +486,7 @@ static int handle_encryptable(const struct fstab_rec* rec) * first successful mount. * Returns -1 on error, and FS_MGR_MNTALL_* otherwise. */ int fs_mgr_mount_all(struct fstab *fstab) int fs_mgr_mount_all(struct fstab *fstab, int mount_mode) { int i = 0; int encryptable = FS_MGR_MNTALL_DEV_NOT_ENCRYPTABLE; Loading @@ -500,8 +500,10 @@ int fs_mgr_mount_all(struct fstab *fstab) } for (i = 0; i < fstab->num_entries; i++) { /* Don't mount entries that are managed by vold */ if (fstab->recs[i].fs_mgr_flags & (MF_VOLDMANAGED | MF_RECOVERYONLY)) { /* Don't mount entries that are managed by vold or not for the mount mode*/ if ((fstab->recs[i].fs_mgr_flags & (MF_VOLDMANAGED | MF_RECOVERYONLY)) || ((mount_mode == MOUNT_MODE_LATE) && !fs_mgr_is_latemount(&fstab->recs[i])) || ((mount_mode == MOUNT_MODE_EARLY) && fs_mgr_is_latemount(&fstab->recs[i]))) { continue; } Loading fs_mgr/fs_mgr_fstab.c +6 −0 Original line number Diff line number Diff line Loading @@ -77,6 +77,7 @@ static struct flag_list fs_mgr_flags[] = { { "formattable", MF_FORMATTABLE }, { "slotselect", MF_SLOTSELECT }, { "nofail", MF_NOFAIL }, { "latemount", MF_LATEMOUNT }, { "defaults", 0 }, { 0, 0 }, }; Loading Loading @@ -516,3 +517,8 @@ int fs_mgr_is_nofail(struct fstab_rec *fstab) { return fstab->fs_mgr_flags & MF_NOFAIL; } int fs_mgr_is_latemount(struct fstab_rec *fstab) { return fstab->fs_mgr_flags & MF_LATEMOUNT; } fs_mgr/fs_mgr_main.c +1 −1 Original line number Diff line number Diff line Loading @@ -95,7 +95,7 @@ int main(int argc, char *argv[]) fstab = fs_mgr_read_fstab(fstab_file); if (a_flag) { return fs_mgr_mount_all(fstab); return fs_mgr_mount_all(fstab, MOUNT_MODE_DEFAULT); } else if (n_flag) { return fs_mgr_do_mount(fstab, n_name, n_blk_dev, 0); } else if (u_flag) { Loading fs_mgr/fs_mgr_priv.h +2 −1 Original line number Diff line number Diff line Loading @@ -83,6 +83,7 @@ __BEGIN_DECLS #define MF_FORMATTABLE 0x4000 #define MF_SLOTSELECT 0x8000 #define MF_FORCEFDEORFBE 0x10000 #define MF_LATEMOUNT 0x20000 #define MF_NOFAIL 0x40000 #define DM_BUF_SIZE 4096 Loading fs_mgr/include/fs_mgr.h +9 −1 Original line number Diff line number Diff line Loading @@ -42,6 +42,13 @@ enum verity_mode { VERITY_MODE_DEFAULT = VERITY_MODE_RESTART }; // Mount modes enum mount_mode { MOUNT_MODE_DEFAULT = 0, MOUNT_MODE_EARLY = 1, MOUNT_MODE_LATE = 2 }; /* * The entries must be kept in the same order as they were seen in the fstab. * Unless explicitly requested, a lookup on mount point should always Loading Loading @@ -84,7 +91,7 @@ void fs_mgr_free_fstab(struct fstab *fstab); #define FS_MGR_MNTALL_DEV_NOT_ENCRYPTED 1 #define FS_MGR_MNTALL_DEV_NOT_ENCRYPTABLE 0 #define FS_MGR_MNTALL_FAIL (-1) int fs_mgr_mount_all(struct fstab *fstab); int fs_mgr_mount_all(struct fstab *fstab, int mount_mode); #define FS_MGR_DOMNT_FAILED (-1) #define FS_MGR_DOMNT_BUSY (-2) Loading @@ -110,6 +117,7 @@ int fs_mgr_is_noemulatedsd(const struct fstab_rec *fstab); int fs_mgr_is_notrim(struct fstab_rec *fstab); int fs_mgr_is_formattable(struct fstab_rec *fstab); int fs_mgr_is_nofail(struct fstab_rec *fstab); int fs_mgr_is_latemount(struct fstab_rec *fstab); int fs_mgr_swapon_all(struct fstab *fstab); int fs_mgr_do_format(struct fstab_rec *fstab, bool reserve_footer); Loading Loading
fs_mgr/fs_mgr.c +5 −3 Original line number Diff line number Diff line Loading @@ -486,7 +486,7 @@ static int handle_encryptable(const struct fstab_rec* rec) * first successful mount. * Returns -1 on error, and FS_MGR_MNTALL_* otherwise. */ int fs_mgr_mount_all(struct fstab *fstab) int fs_mgr_mount_all(struct fstab *fstab, int mount_mode) { int i = 0; int encryptable = FS_MGR_MNTALL_DEV_NOT_ENCRYPTABLE; Loading @@ -500,8 +500,10 @@ int fs_mgr_mount_all(struct fstab *fstab) } for (i = 0; i < fstab->num_entries; i++) { /* Don't mount entries that are managed by vold */ if (fstab->recs[i].fs_mgr_flags & (MF_VOLDMANAGED | MF_RECOVERYONLY)) { /* Don't mount entries that are managed by vold or not for the mount mode*/ if ((fstab->recs[i].fs_mgr_flags & (MF_VOLDMANAGED | MF_RECOVERYONLY)) || ((mount_mode == MOUNT_MODE_LATE) && !fs_mgr_is_latemount(&fstab->recs[i])) || ((mount_mode == MOUNT_MODE_EARLY) && fs_mgr_is_latemount(&fstab->recs[i]))) { continue; } Loading
fs_mgr/fs_mgr_fstab.c +6 −0 Original line number Diff line number Diff line Loading @@ -77,6 +77,7 @@ static struct flag_list fs_mgr_flags[] = { { "formattable", MF_FORMATTABLE }, { "slotselect", MF_SLOTSELECT }, { "nofail", MF_NOFAIL }, { "latemount", MF_LATEMOUNT }, { "defaults", 0 }, { 0, 0 }, }; Loading Loading @@ -516,3 +517,8 @@ int fs_mgr_is_nofail(struct fstab_rec *fstab) { return fstab->fs_mgr_flags & MF_NOFAIL; } int fs_mgr_is_latemount(struct fstab_rec *fstab) { return fstab->fs_mgr_flags & MF_LATEMOUNT; }
fs_mgr/fs_mgr_main.c +1 −1 Original line number Diff line number Diff line Loading @@ -95,7 +95,7 @@ int main(int argc, char *argv[]) fstab = fs_mgr_read_fstab(fstab_file); if (a_flag) { return fs_mgr_mount_all(fstab); return fs_mgr_mount_all(fstab, MOUNT_MODE_DEFAULT); } else if (n_flag) { return fs_mgr_do_mount(fstab, n_name, n_blk_dev, 0); } else if (u_flag) { Loading
fs_mgr/fs_mgr_priv.h +2 −1 Original line number Diff line number Diff line Loading @@ -83,6 +83,7 @@ __BEGIN_DECLS #define MF_FORMATTABLE 0x4000 #define MF_SLOTSELECT 0x8000 #define MF_FORCEFDEORFBE 0x10000 #define MF_LATEMOUNT 0x20000 #define MF_NOFAIL 0x40000 #define DM_BUF_SIZE 4096 Loading
fs_mgr/include/fs_mgr.h +9 −1 Original line number Diff line number Diff line Loading @@ -42,6 +42,13 @@ enum verity_mode { VERITY_MODE_DEFAULT = VERITY_MODE_RESTART }; // Mount modes enum mount_mode { MOUNT_MODE_DEFAULT = 0, MOUNT_MODE_EARLY = 1, MOUNT_MODE_LATE = 2 }; /* * The entries must be kept in the same order as they were seen in the fstab. * Unless explicitly requested, a lookup on mount point should always Loading Loading @@ -84,7 +91,7 @@ void fs_mgr_free_fstab(struct fstab *fstab); #define FS_MGR_MNTALL_DEV_NOT_ENCRYPTED 1 #define FS_MGR_MNTALL_DEV_NOT_ENCRYPTABLE 0 #define FS_MGR_MNTALL_FAIL (-1) int fs_mgr_mount_all(struct fstab *fstab); int fs_mgr_mount_all(struct fstab *fstab, int mount_mode); #define FS_MGR_DOMNT_FAILED (-1) #define FS_MGR_DOMNT_BUSY (-2) Loading @@ -110,6 +117,7 @@ int fs_mgr_is_noemulatedsd(const struct fstab_rec *fstab); int fs_mgr_is_notrim(struct fstab_rec *fstab); int fs_mgr_is_formattable(struct fstab_rec *fstab); int fs_mgr_is_nofail(struct fstab_rec *fstab); int fs_mgr_is_latemount(struct fstab_rec *fstab); int fs_mgr_swapon_all(struct fstab *fstab); int fs_mgr_do_format(struct fstab_rec *fstab, bool reserve_footer); Loading