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
// 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;
}