Platform BpfLoader: remove dead code exists() function am: 50c60e52f7
Original change: https://android-review.googlesource.com/c/platform/system/bpf/+/2997236
Change-Id: Id9616adac555b715e1b267a7068f882ac4a10aa9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/loader/BpfLoader.cpp b/loader/BpfLoader.cpp
index c05d1f4..e6800e6 100644
--- a/loader/BpfLoader.cpp
+++ b/loader/BpfLoader.cpp
@@ -52,17 +52,6 @@
using android::base::EndsWith;
using std::string;
-bool exists(const char* const path) {
- int v = access(path, F_OK);
- if (!v) {
- ALOGI("%s exists.", path);
- return true;
- }
- if (errno == ENOENT) return false;
- ALOGE("FATAL: access(%s, F_OK) -> %d [%d:%s]", path, v, errno, strerror(errno));
- abort(); // can only hit this if permissions (likely selinux) are screwed up
-}
-
// Networking-related program types are limited to the Tethering Apex
// to prevent things from breaking due to conflicts on mainline updates
// (exception made for socket filters, ie. xt_bpf for potential use in iptables,