From acc1c3c7929fcb6def72cc640ef26b4e9ce1b4b4 Mon Sep 17 00:00:00 2001 From: Bowgo Tsai Date: Wed, 29 Mar 2017 16:19:45 +0800 Subject: [PATCH] fs_mgr: removing fs_mgr_read_fstab_with_dt() Currently there is no client requires fs_mgr_read_fstab_with_dt() so remove this API. Devices with fstab entries in device tree should use fs_mgr_read_fstab_default() to get default fstab, or just use fs_mgr_read_fstab_dt() to get those in device tree. Bug: 35811655 Test: normal boot sailfish Test: run factory data reset in sailfish Test: recovery boot sailfish Test: adb sideload in sailfish Change-Id: I1579d81cea7366cf3867cfe5ad56feb36cbb7246 --- fs_mgr/fs_mgr_fstab.cpp | 18 ++++++------------ fs_mgr/include/fs_mgr.h | 1 - 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/fs_mgr/fs_mgr_fstab.cpp b/fs_mgr/fs_mgr_fstab.cpp index 720ec0315..0406efd28 100644 --- a/fs_mgr/fs_mgr_fstab.cpp +++ b/fs_mgr/fs_mgr_fstab.cpp @@ -625,17 +625,6 @@ struct fstab *fs_mgr_read_fstab_dt() return fstab; } -/* combines fstab entries passed in from device tree with - * the ones found from fstab_path - */ -struct fstab *fs_mgr_read_fstab_with_dt(const char *fstab_path) -{ - struct fstab *fstab_dt = fs_mgr_read_fstab_dt(); - struct fstab *fstab = fs_mgr_read_fstab(fstab_path); - - return in_place_merge(fstab_dt, fstab); -} - /* * tries to load default fstab. file from /odm/etc, /vendor/etc * or /. loads the first one found and also combines fstab entries passed @@ -658,7 +647,12 @@ struct fstab *fs_mgr_read_fstab_default() LWARNING << __FUNCTION__ << "(): failed to find device hardware name"; } - return fs_mgr_read_fstab_with_dt(default_fstab.c_str()); + // combines fstab entries passed in from device tree with + // the ones found from default_fstab file + struct fstab *fstab_dt = fs_mgr_read_fstab_dt(); + struct fstab *fstab = fs_mgr_read_fstab(default_fstab.c_str()); + + return in_place_merge(fstab_dt, fstab); } void fs_mgr_free_fstab(struct fstab *fstab) diff --git a/fs_mgr/include/fs_mgr.h b/fs_mgr/include/fs_mgr.h index e4aeb482a..4b626de4c 100644 --- a/fs_mgr/include/fs_mgr.h +++ b/fs_mgr/include/fs_mgr.h @@ -88,7 +88,6 @@ typedef void (*fs_mgr_verity_state_callback)(struct fstab_rec *fstab, struct fstab *fs_mgr_read_fstab_default(); struct fstab *fs_mgr_read_fstab_dt(); struct fstab *fs_mgr_read_fstab(const char *fstab_path); -struct fstab *fs_mgr_read_fstab_with_dt(const char *fstab_path); void fs_mgr_free_fstab(struct fstab *fstab); #define FS_MGR_MNTALL_DEV_FILE_ENCRYPTED 5