roots.cpp: convert to C++ Fstab

Convert code to use C++ Fstab struct and C++ std::strings.

Bug: 62292478
Bug: 118634720
Test: boots
Change-Id: Ibdc1df5831bc885d7c1574419f41af026e49a137
This commit is contained in:
Yifan Hong
2018-12-17 14:29:06 -08:00
parent 0f339e27bb
commit d81b8e3d77
6 changed files with 57 additions and 61 deletions
+1 -1
View File
@@ -46,7 +46,7 @@ static const std::string LAST_LOG_FILTER = "recovery/last_log";
// fopen(3)'s the given file, by mounting volumes and making parent dirs as necessary. Returns the
// file pointer, or nullptr on error.
static FILE* fopen_path(const std::string& path, const char* mode) {
if (ensure_path_mounted(path.c_str()) != 0) {
if (ensure_path_mounted(path) != 0) {
LOG(ERROR) << "Can't mount " << path;
return nullptr;
}