NetBpfLoad: do not log bpfGetFdMapId() failures on 4.9

This is entirely expected due to lack of implementation in <4.14.

Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ifebe6843dc77b1b9a506c61239dcebe7262d0869
This commit is contained in:
Maciej Żenczykowski 2024-08-28 15:07:33 -07:00
commit 508c8f7857

View file

@ -839,7 +839,8 @@ static int createMaps(const char* elfPath, ifstream& elfFile, vector<unique_fd>&
int mapId = bpfGetFdMapId(fd);
if (mapId == -1) {
ALOGE("bpfGetFdMapId failed, ret: %d [%d]", mapId, errno);
if (isAtLeastKernelVersion(4, 14, 0))
ALOGE("bpfGetFdMapId failed, ret: %d [%d]", mapId, errno);
} else {
ALOGI("map %s id %d", mapPinLoc.c_str(), mapId);
}