diff options
author | Tom Cherry <tomcherry@google.com> | 2019-01-25 17:13:50 -0800 |
---|---|---|
committer | Tom Cherry <tomcherry@google.com> | 2019-01-28 09:06:10 -0800 |
commit | 2f0331d9b69945b98446cafaf2401e0df3d629db (patch) | |
tree | 4b6ba9b99cb11cdb445688c06ee2bf05897ba082 /fs_mgr | |
parent | 561498e357c00f9ae18e06efefc16ec68fb5d439 (diff) | |
download | system_core-2f0331d9b69945b98446cafaf2401e0df3d629db.tar.gz system_core-2f0331d9b69945b98446cafaf2401e0df3d629db.tar.bz2 system_core-2f0331d9b69945b98446cafaf2401e0df3d629db.zip |
fs_mgr: remove old fs_mgr functions that are not currently used
New code should be using the new Fstab class, so remove these older
functions that don't have current users.
Test: build
Change-Id: I3ba2b12b838b4b46979963869939fd4b65264738
Diffstat (limited to 'fs_mgr')
-rw-r--r-- | fs_mgr/fs_mgr_fstab.cpp | 68 | ||||
-rw-r--r-- | fs_mgr/include_fstab/fstab/fstab.h | 11 |
2 files changed, 0 insertions, 79 deletions
diff --git a/fs_mgr/fs_mgr_fstab.cpp b/fs_mgr/fs_mgr_fstab.cpp index 4f6a8cec9..0482f6c2e 100644 --- a/fs_mgr/fs_mgr_fstab.cpp +++ b/fs_mgr/fs_mgr_fstab.cpp @@ -787,35 +787,6 @@ void fs_mgr_free_fstab(struct fstab *fstab) free(fstab); } -/* Add an entry to the fstab, and return 0 on success or -1 on error */ -int fs_mgr_add_entry(struct fstab *fstab, - const char *mount_point, const char *fs_type, - const char *blk_device) -{ - struct fstab_rec *new_fstab_recs; - int n = fstab->num_entries; - - new_fstab_recs = (struct fstab_rec *) - realloc(fstab->recs, sizeof(struct fstab_rec) * (n + 1)); - - if (!new_fstab_recs) { - return -1; - } - - /* A new entry was added, so initialize it */ - memset(&new_fstab_recs[n], 0, sizeof(struct fstab_rec)); - new_fstab_recs[n].mount_point = strdup(mount_point); - new_fstab_recs[n].fs_type = strdup(fs_type); - new_fstab_recs[n].blk_device = strdup(blk_device); - new_fstab_recs[n].length = 0; - - /* Update the fstab struct */ - fstab->recs = new_fstab_recs; - fstab->num_entries++; - - return 0; -} - /* * Returns the fstab_rec* whose mount_point is path. * Returns nullptr if not found. @@ -943,26 +914,11 @@ int fs_mgr_is_verified(const struct fstab_rec *fstab) return fstab->fs_mgr_flags & MF_VERIFY; } -int fs_mgr_is_avb(const struct fstab_rec *fstab) -{ - return fstab->fs_mgr_flags & MF_AVB; -} - -int fs_mgr_is_verifyatboot(const struct fstab_rec *fstab) -{ - return fstab->fs_mgr_flags & MF_VERIFYATBOOT; -} - int fs_mgr_is_encryptable(const struct fstab_rec *fstab) { return fstab->fs_mgr_flags & (MF_CRYPT | MF_FORCECRYPT | MF_FORCEFDEORFBE); } -int fs_mgr_is_file_encrypted(const struct fstab_rec *fstab) -{ - return fstab->fs_mgr_flags & MF_FILEENCRYPTION; -} - void fs_mgr_get_file_encryption_modes(const struct fstab_rec* fstab, const char** contents_mode_ret, const char** filenames_mode_ret) { *contents_mode_ret = fstab->file_contents_mode; @@ -983,26 +939,6 @@ int fs_mgr_is_notrim(const struct fstab_rec* fstab) { return fstab->fs_mgr_flags & MF_NOTRIM; } -int fs_mgr_is_formattable(const struct fstab_rec* fstab) { - return fstab->fs_mgr_flags & (MF_FORMATTABLE); -} - -int fs_mgr_is_slotselect(const struct fstab_rec* fstab) { - return fstab->fs_mgr_flags & MF_SLOTSELECT; -} - -int fs_mgr_is_nofail(const struct fstab_rec* fstab) { - return fstab->fs_mgr_flags & MF_NOFAIL; -} - -int fs_mgr_is_first_stage_mount(const struct fstab_rec* fstab) { - return fstab->fs_mgr_flags & MF_FIRST_STAGE_MOUNT; -} - -int fs_mgr_is_latemount(const struct fstab_rec* fstab) { - return fstab->fs_mgr_flags & MF_LATEMOUNT; -} - int fs_mgr_is_quota(const struct fstab_rec* fstab) { return fstab->fs_mgr_flags & MF_QUOTA; } @@ -1028,10 +964,6 @@ int fs_mgr_is_checkpoint_blk(const struct fstab_rec* fstab) { return fstab->fs_mgr_flags & MF_CHECKPOINT_BLK; } -int fs_mgr_is_fs_verity(const struct fstab_rec* fstab) { - return fstab->fs_mgr_flags & MF_FS_VERITY; -} - FstabEntry BuildGsiSystemFstabEntry() { FstabEntry system = { .blk_device = "system_gsi", diff --git a/fs_mgr/include_fstab/fstab/fstab.h b/fs_mgr/include_fstab/fstab/fstab.h index 88ecec0d2..100e076f2 100644 --- a/fs_mgr/include_fstab/fstab/fstab.h +++ b/fs_mgr/include_fstab/fstab/fstab.h @@ -69,33 +69,22 @@ struct fstab* fs_mgr_read_fstab_dt(); struct fstab* fs_mgr_read_fstab(const char* fstab_path); void fs_mgr_free_fstab(struct fstab* fstab); -int fs_mgr_add_entry(struct fstab* fstab, const char* mount_point, const char* fs_type, - const char* blk_device); struct fstab_rec* fs_mgr_get_entry_for_mount_point(struct fstab* fstab, const std::string& path); int fs_mgr_is_voldmanaged(const struct fstab_rec* fstab); int fs_mgr_is_nonremovable(const struct fstab_rec* fstab); int fs_mgr_is_verified(const struct fstab_rec* fstab); -int fs_mgr_is_verifyatboot(const struct fstab_rec* fstab); -int fs_mgr_is_avb(const struct fstab_rec* fstab); int fs_mgr_is_encryptable(const struct fstab_rec* fstab); -int fs_mgr_is_file_encrypted(const struct fstab_rec* fstab); void fs_mgr_get_file_encryption_modes(const struct fstab_rec* fstab, const char** contents_mode_ret, const char** filenames_mode_ret); 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(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_first_stage_mount(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); int fs_mgr_is_logical(const struct fstab_rec* fstab); int fs_mgr_is_checkpoint(const struct fstab_rec* fstab); int fs_mgr_is_checkpoint_fs(const struct fstab_rec* fstab); int fs_mgr_is_checkpoint_blk(const struct fstab_rec* fstab); int fs_mgr_has_sysfs_path(const struct fstab_rec* fstab); -int fs_mgr_is_fs_verity(const struct fstab_rec* fstab); std::string fs_mgr_get_slot_suffix(); std::string fs_mgr_get_other_slot_suffix(); |