From 91e3aee9bdc1a503affdd925dd4da352a198abca Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Fri, 23 Sep 2016 15:30:55 -0700 Subject: Switch to . Bug: http://b/23102347 Test: boot into recovery. Change-Id: Ib2ca560f1312961c21fbaa294bb068de19cb883e --- bootloader_message/bootloader_message.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'bootloader_message') diff --git a/bootloader_message/bootloader_message.cpp b/bootloader_message/bootloader_message.cpp index 9de7dff40..e0c95d223 100644 --- a/bootloader_message/bootloader_message.cpp +++ b/bootloader_message/bootloader_message.cpp @@ -19,25 +19,24 @@ #include #include #include -#include #include #include #include +#include #include #include #include static struct fstab* read_fstab(std::string* err) { - // The fstab path is always "/fstab.${ro.hardware}". - std::string fstab_path = "/fstab."; - char value[PROP_VALUE_MAX]; - if (__system_property_get("ro.hardware", value) == 0) { + std::string ro_hardware = android::base::GetProperty("ro.hardware", ""); + if (ro_hardware.empty()) { *err = "failed to get ro.hardware"; return nullptr; } - fstab_path += value; + // The fstab path is always "/fstab.${ro.hardware}". + std::string fstab_path = "/fstab." + ro_hardware; struct fstab* fstab = fs_mgr_read_fstab(fstab_path.c_str()); if (fstab == nullptr) { *err = "failed to read " + fstab_path; -- cgit v1.2.3