From 8d3bcd4b6a3bdf2fd1302bd6e89413ff57168e0d Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Wed, 5 Jul 2017 12:21:15 -0700 Subject: fs_mgr: refactor pre-mount logic into prepare_fs_for_mount() There were several duplications in the code that runs before a filesystem is mounted. This made it difficult to start running tune2fs to set the encryption feature flag. Refactor to deduplicate the logic, and improve the log messages. Bug: 36231741 Change-Id: I90846dad9c5ec85b3c5460615dec4cc19cb7e198 --- fs_mgr/include_fstab/fstab/fstab.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'fs_mgr/include_fstab') diff --git a/fs_mgr/include_fstab/fstab/fstab.h b/fs_mgr/include_fstab/fstab/fstab.h index 3ea4e038e..17e1fb176 100644 --- a/fs_mgr/include_fstab/fstab/fstab.h +++ b/fs_mgr/include_fstab/fstab/fstab.h @@ -80,12 +80,12 @@ int fs_mgr_is_file_encrypted(const struct fstab_rec* fstab); const char* fs_mgr_get_file_encryption_mode(const struct fstab_rec* fstab); int fs_mgr_is_convertible_to_fbe(const struct fstab_rec* fstab); 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_slotselect(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_is_quota(struct fstab_rec* fstab); +int fs_mgr_is_notrim(const struct fstab_rec* fstab); +int fs_mgr_is_formattable(const struct fstab_rec* fstab); +int fs_mgr_is_slotselect(const struct fstab_rec* fstab); +int fs_mgr_is_nofail(const struct fstab_rec* fstab); +int fs_mgr_is_latemount(const struct fstab_rec* fstab); +int fs_mgr_is_quota(const struct fstab_rec* fstab); __END_DECLS -- cgit v1.2.3