• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

system/core


Commit MetaInfo

Revisiona34d119057f1d62e6a6158fd682bcd4732b05cf6 (tree)
Time2019-03-28 19:36:04
AuthorChih-Wei Huang <cwhuang@linu...>
CommiterChih-Wei Huang

Log Message

fs_mgr: check ro.* property first

fs_mgr reads default fstab via ro.hardware property before Android 8.0.
However, Android 8.0 changed it to use ro.boot.hardware. The incompatible
change is bad.

Android-x86 doesn't set ro.boot.hardware anymore. Let's check ro.*
properties as before.

Change Summary

Incremental Difference

--- a/fs_mgr/fs_mgr_boot_config.cpp
+++ b/fs_mgr/fs_mgr_boot_config.cpp
@@ -51,7 +51,13 @@ bool fs_mgr_get_boot_config_from_kernel_cmdline(const std::string& key, std::str
5151 bool fs_mgr_get_boot_config(const std::string& key, std::string* out_val) {
5252 FS_MGR_CHECK(out_val != nullptr);
5353
54- // first check if we have "ro.boot" property already
54+ // first check if we have "ro.*" property already
55+ *out_val = android::base::GetProperty("ro." + key, "");
56+ if (!out_val->empty()) {
57+ return true;
58+ }
59+
60+ // second check if we have "ro.boot.*" property
5561 *out_val = android::base::GetProperty("ro.boot." + key, "");
5662 if (!out_val->empty()) {
5763 return true;