From d81b8e3d775743dbc2ce49b805cbce6fcc0ea617 Mon Sep 17 00:00:00 2001 From: Yifan Hong Date: Mon, 17 Dec 2018 14:29:06 -0800 Subject: 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 --- recovery.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'recovery.cpp') diff --git a/recovery.cpp b/recovery.cpp index 7e1fa43a6..a680615b1 100644 --- a/recovery.cpp +++ b/recovery.cpp @@ -294,7 +294,7 @@ bool SetUsbConfig(const std::string& state) { // Returns the selected filename, or an empty string. static std::string browse_directory(const std::string& path, Device* device) { - ensure_path_mounted(path.c_str()); + ensure_path_mounted(path); std::unique_ptr d(opendir(path.c_str()), closedir); if (!d) { @@ -572,7 +572,7 @@ static void choose_recovery_file(Device* device) { log_file += "." + std::to_string(i); } - if (ensure_path_mounted(log_file.c_str()) == 0 && access(log_file.c_str(), R_OK) == 0) { + if (ensure_path_mounted(log_file) == 0 && access(log_file.c_str(), R_OK) == 0) { entries.push_back(std::move(log_file)); } }; @@ -836,7 +836,7 @@ static Device::BuiltinAction prompt_and_wait(Device* device, int status) { } case Device::MOUNT_SYSTEM: // the system partition is mounted at /mnt/system - if (ensure_path_mounted_at(get_system_root().c_str(), "/mnt/system") != -1) { + if (ensure_path_mounted_at(get_system_root(), "/mnt/system") != -1) { ui->Print("Mounted /system.\n"); } break; -- cgit v1.2.3