diff options
author | Bowgo Tsai <bowgotsai@google.com> | 2017-03-10 19:20:54 +0800 |
---|---|---|
committer | Bowgo Tsai <bowgotsai@google.com> | 2017-03-10 19:22:24 +0800 |
commit | 78c746940ea8b156154a70985cd04192f303302b (patch) | |
tree | 407ba50c5487b492fb1210f1c71cdf4d227682f0 /boot_control_copy | |
parent | b7b92040c23387a14473cf261c65d13d4e80af85 (diff) | |
download | extras-78c746940ea8b156154a70985cd04192f303302b.tar.gz |
Replacing fs_mgr_read_fstab() with new fs_mgr APIs
The fstab settings of early-mounted partitions (e.g., /vendor)
will be in kernel device tree. Switch to the new API to get the
whole settings with those in device tree:
fs_mgr_read_fstab_with_dt("/fstab.device")
The original default /fstab.{ro.hardware} might be moved to
/vendor/etc/. or /odm/etc/. Use another new API to get the default
fstab instead of using the hard-coded /fstab.{ro.hardware}.
This API also includes the settings from device tree:
fs_mgr_read_fstab_default()
Bug: 35811655
Test: build pass
Change-Id: I14bee88b9f599b7bbc2be56042684709e5946de2
Diffstat (limited to 'boot_control_copy')
-rw-r--r-- | boot_control_copy/bootinfo.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/boot_control_copy/bootinfo.c b/boot_control_copy/bootinfo.c index 82a134fa..66ccba25 100644 --- a/boot_control_copy/bootinfo.c +++ b/boot_control_copy/bootinfo.c @@ -39,17 +39,11 @@ // that's what's being used. static struct fstab *open_fstab(void) { - char propbuf[PROPERTY_VALUE_MAX]; - char fstab_name[PROPERTY_VALUE_MAX + 32]; - struct fstab *fstab; - - property_get("ro.hardware", propbuf, ""); - snprintf(fstab_name, sizeof(fstab_name), "/fstab.%s", propbuf); - fstab = fs_mgr_read_fstab(fstab_name); + struct fstab *fstab = fs_mgr_read_fstab_default(); if (fstab != NULL) return fstab; - fstab = fs_mgr_read_fstab("/fstab.device"); + fstab = fs_mgr_read_fstab_with_dt("/fstab.device"); return fstab; } |