From 08ad51519af44c3a5812207bd1396d4acdd862fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20=C5=BBenczykowski?= Date: Tue, 29 Jul 2025 16:38:57 -0700 Subject: [PATCH] NetBpfLoad: remove foo@1.o support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit No longer needed now that we have a single loader which can support everything. Test: TreeHugger Flag: EXEMPT mainline/noop Signed-off-by: Maciej Żenczykowski Change-Id: I74c24016265a2b41d818d55c98cbabde04687dd8 --- bpf/loader/NetBpfLoad.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/bpf/loader/NetBpfLoad.cpp b/bpf/loader/NetBpfLoad.cpp index 6dae1b5b62..fa0b6f1fec 100644 --- a/bpf/loader/NetBpfLoad.cpp +++ b/bpf/loader/NetBpfLoad.cpp @@ -127,13 +127,10 @@ void validatePinDir(const char s[BPF_PIN_SUBDIR_CHAR_ARRAY_SIZE]) { } static string pathToObjName(const string& path) { - // extract everything after the final slash, ie. this is the filename 'foo@1.o' or 'bar.o' + // extract everything after the final slash, ie. this is the filename 'foo.o' string filename = Split(path, "/").back(); - // strip off everything from the final period onwards (strip '.o' suffix), ie. 'foo@1' or 'bar' - string name = filename.substr(0, filename.find_last_of('.')); - // strip any potential @1 suffix, this will leave us with just 'foo' or 'bar' - // this can be used to provide duplicate programs (mux based on the bpfloader version) - return name.substr(0, name.find_last_of('@')); + // strip off everything from the final period onwards (strip '.o' suffix), ie. 'foo' + return filename.substr(0, filename.find_last_of('.')); } typedef struct {