Merge "fs_mgr: remove some unused functions"

This commit is contained in:
Tom Cherry 2018-06-08 02:27:03 +00:00 committed by Gerrit Code Review
commit 158dd05b8a
4 changed files with 1 additions and 30 deletions

View File

@ -1190,27 +1190,6 @@ int fs_mgr_do_tmpfs_mount(const char *n_name)
return 0;
}
int fs_mgr_unmount_all(struct fstab *fstab)
{
int i = 0;
int ret = 0;
if (!fstab) {
return -1;
}
while (fstab->recs[i].blk_device) {
if (umount(fstab->recs[i].mount_point)) {
LERROR << "Cannot unmount filesystem at "
<< fstab->recs[i].mount_point;
ret = -1;
}
i++;
}
return ret;
}
/* This must be called after mount_all, because the mkswap command needs to be
* available.
*/

View File

@ -679,7 +679,6 @@ static struct fstab *in_place_merge(struct fstab *a, struct fstab *b)
// We can't call fs_mgr_free_fstab because a->recs still references the
// memory allocated by strdup.
free(b->recs);
free(b->fstab_filename);
free(b);
a->num_entries = total_entries;
@ -741,9 +740,7 @@ struct fstab *fs_mgr_read_fstab(const char *fstab_path)
}
fstab = fs_mgr_read_fstab_file(fstab_file);
if (fstab) {
fstab->fstab_filename = strdup(fstab_path);
} else {
if (!fstab) {
LERROR << __FUNCTION__ << "(): failed to load fstab from : '" << fstab_path << "'";
}
@ -854,9 +851,6 @@ void fs_mgr_free_fstab(struct fstab *fstab)
/* Free the fstab_recs array created by calloc(3) */
free(fstab->recs);
/* Free the fstab filename */
free(fstab->fstab_filename);
/* Free fstab */
free(fstab);
}

View File

@ -70,7 +70,6 @@ int fs_mgr_do_mount(struct fstab *fstab, const char *n_name, char *n_blk_device,
char *tmp_mount_point);
int fs_mgr_do_mount_one(struct fstab_rec *rec);
int fs_mgr_do_tmpfs_mount(const char *n_name);
int fs_mgr_unmount_all(struct fstab *fstab);
struct fstab_rec const* fs_mgr_get_crypt_entry(struct fstab const* fstab);
void fs_mgr_get_crypt_info(struct fstab* fstab, char* key_loc, char* real_blk_device, size_t size);
bool fs_mgr_load_verity_state(int* mode);

View File

@ -33,7 +33,6 @@
struct fstab {
int num_entries;
struct fstab_rec* recs;
char* fstab_filename;
};
struct fstab_rec {