Merge "Add ro.fuse.bpf.is_running" am: 1edb6550ab am: f0dec736c2 am: dc6ef047e2

Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2346803

Change-Id: If450454988b062f2b500560f98fbbe26fc2a5b13
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Treehugger Robot 2022-12-13 17:05:44 +00:00 committed by Automerger Merge Worker
commit e1d62b1548

View file

@ -1772,13 +1772,15 @@ std::pair<android::base::unique_fd, std::string> OpenDirInProcfs(std::string_vie
}
bool IsFuseBpfEnabled() {
std::string bpf_override = android::base::GetProperty("persist.sys.fuse.bpf.override", "");
if (bpf_override == "true") {
// TODO Once kernel supports flag, trigger off kernel flag unless
// ro.fuse.bpf.enabled is explicitly set to false
if (base::GetBoolProperty("ro.fuse.bpf.enabled", false)) {
base::SetProperty("ro.fuse.bpf.is_running", "true");
return true;
} else if (bpf_override == "false") {
} else {
base::SetProperty("ro.fuse.bpf.is_running", "false");
return false;
}
return base::GetBoolProperty("ro.fuse.bpf.enabled", false);
}
} // namespace vold