Loading fs_mgr/fs_mgr_boot_config.cpp +6 −2 Original line number Diff line number Diff line Loading @@ -14,6 +14,8 @@ * limitations under the License. */ #include <string> #include <android-base/file.h> #include <android-base/stringprintf.h> #include <android-base/strings.h> Loading Loading @@ -51,11 +53,13 @@ bool fs_mgr_get_boot_config(const std::string& key, std::string* out_val) { // lastly, check the device tree if (is_dt_compatible()) { std::string file_name = kAndroidDtDir + "/" + key; // DT entries terminate with '\0' but so do the properties if (android::base::ReadFileToString(file_name, out_val)) { if (!out_val->empty()) { out_val->pop_back(); // Trims the trailing '\0' out. return true; } } } return false; } Loading
fs_mgr/fs_mgr_boot_config.cpp +6 −2 Original line number Diff line number Diff line Loading @@ -14,6 +14,8 @@ * limitations under the License. */ #include <string> #include <android-base/file.h> #include <android-base/stringprintf.h> #include <android-base/strings.h> Loading Loading @@ -51,11 +53,13 @@ bool fs_mgr_get_boot_config(const std::string& key, std::string* out_val) { // lastly, check the device tree if (is_dt_compatible()) { std::string file_name = kAndroidDtDir + "/" + key; // DT entries terminate with '\0' but so do the properties if (android::base::ReadFileToString(file_name, out_val)) { if (!out_val->empty()) { out_val->pop_back(); // Trims the trailing '\0' out. return true; } } } return false; }