diff options
author | Bowgo Tsai <bowgotsai@google.com> | 2017-03-10 17:03:24 +0800 |
---|---|---|
committer | Bowgo Tsai <bowgotsai@google.com> | 2017-03-10 17:07:14 +0800 |
commit | b3d5ba44910310da454bf221e46ed84175a21287 (patch) | |
tree | a3e9fc653c406bfce3c646ab2f7794cc01542998 /tests | |
parent | b7b92040c23387a14473cf261c65d13d4e80af85 (diff) | |
download | extras-b3d5ba44910310da454bf221e46ed84175a21287.tar.gz |
fstest: replacing fs_mgr_read_fstab() with fs_mgr_read_fstab_default()
The original default /fstab.{ro.hardware} might be moved to
/vendor/etc/. or /odm/etc/. Use the new API to get the default
fstab instead of using the hard-coded /fstab.{ro.hardware}.
Bug: 35811655
Test: boot sailfish
Change-Id: Ie11a4f22ed449ef90cbcc7117227a99ea9d79110
Diffstat (limited to 'tests')
-rw-r--r-- | tests/fstest/recovery_test.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/tests/fstest/recovery_test.cpp b/tests/fstest/recovery_test.cpp index fab9a0fc..e2371395 100644 --- a/tests/fstest/recovery_test.cpp +++ b/tests/fstest/recovery_test.cpp @@ -37,7 +37,6 @@ #include <testUtil.h> #define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0])) -#define FSTAB_PREFIX "/fstab." #define SB_OFFSET 1024 static char UMOUNT_BIN[] = "/system/bin/umount"; static char VDC_BIN[] = "/system/bin/vdc"; @@ -188,14 +187,10 @@ class FsRecoveryTest : public ::testing::Test { bool setCacheInfoFromFstab() { fs_type = FS_UNKNOWN; - char propbuf[PROPERTY_VALUE_MAX]; - property_get("ro.hardware", propbuf, ""); - char fstab_filename[PROPERTY_VALUE_MAX + sizeof(FSTAB_PREFIX)]; - snprintf(fstab_filename, sizeof(fstab_filename), FSTAB_PREFIX"%s", propbuf); - struct fstab *fstab = fs_mgr_read_fstab(fstab_filename); + struct fstab *fstab = fs_mgr_read_fstab_default(); if (!fstab) { - testPrintE("failed to open %s\n", fstab_filename); + testPrintE("failed to open default fstab\n"); } else { // Loop through entries looking for cache. for (int i = 0; i < fstab->num_entries; ++i) { |