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

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

Change-Id: I384c0f605a2cf69430d4d6e1a9cde1358e715ae6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Treehugger Robot 2022-12-13 15:56:11 +00:00 committed by Automerger Merge Worker
commit f0dec736c2

View file

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