Merge "fs_mgr: don't log error messages when missing fstab" am: ace69b2f7b
am: e8493e7045
Change-Id: Ib3aeba78f190f5107bb08adac760035ebbb4d63a
This commit is contained in:
commit
9396edfd2a
1 changed files with 8 additions and 5 deletions
|
|
@ -638,6 +638,7 @@ err:
|
||||||
* frees up memory of the return value without touching a and b. */
|
* frees up memory of the return value without touching a and b. */
|
||||||
static struct fstab *in_place_merge(struct fstab *a, struct fstab *b)
|
static struct fstab *in_place_merge(struct fstab *a, struct fstab *b)
|
||||||
{
|
{
|
||||||
|
if (!a && !b) return nullptr;
|
||||||
if (!a) return b;
|
if (!a) return b;
|
||||||
if (!b) return a;
|
if (!b) return a;
|
||||||
|
|
||||||
|
|
@ -755,15 +756,17 @@ struct fstab *fs_mgr_read_fstab_default()
|
||||||
default_fstab = get_fstab_path();
|
default_fstab = get_fstab_path();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (default_fstab.empty()) {
|
struct fstab* fstab = nullptr;
|
||||||
LWARNING << __FUNCTION__ << "(): failed to find device default fstab";
|
if (!default_fstab.empty()) {
|
||||||
|
fstab = fs_mgr_read_fstab(default_fstab.c_str());
|
||||||
|
} else {
|
||||||
|
LINFO << __FUNCTION__ << "(): failed to find device default fstab";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct fstab* fstab_dt = fs_mgr_read_fstab_dt();
|
||||||
|
|
||||||
// combines fstab entries passed in from device tree with
|
// combines fstab entries passed in from device tree with
|
||||||
// the ones found from default_fstab file
|
// 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);
|
return in_place_merge(fstab_dt, fstab);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue