From 10979ef9ec71b33abd12f79b1d5730ce1166c97c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20=C5=BBenczykowski?= Date: Tue, 20 May 2025 06:38:16 -0700 Subject: [PATCH] NetBpfLoad: abort if pin_subdir is specified MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This code should be dead. Abort to see whether it is. Test: TreeHugger Flag: EXEMPT dead code Signed-off-by: Maciej Żenczykowski Change-Id: Ib5309ff683339e70bc44e135578ede75548b022d --- bpf/loader/NetBpfLoad.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bpf/loader/NetBpfLoad.cpp b/bpf/loader/NetBpfLoad.cpp index d910da2ccd..6b92dfcf09 100644 --- a/bpf/loader/NetBpfLoad.cpp +++ b/bpf/loader/NetBpfLoad.cpp @@ -970,6 +970,7 @@ static int createMaps(const char* elfPath, ifstream& elfFile, vector& if (specified(pin_subdir)) { ALOGV("map %s pin_subdir [%-32s] -> %d -> '%s'", mapNames[i].c_str(), md[i].pin_subdir, static_cast(pin_subdir), lookupPinSubdir(pin_subdir)); + abort(); } // Format of pin location is /sys/fs/bpf/map__ @@ -1202,6 +1203,7 @@ static int loadCodeSections(const char* elfPath, vector& cs, const ALOGV("prog %s pin_subdir [%-32s] -> %d -> '%s'", name.c_str(), cs[i].prog_def->pin_subdir, static_cast(pin_subdir), lookupPinSubdir(pin_subdir)); + abort(); } // strip any potential $foo suffix