Merge "use mapRetrieveRO() instead of bpf_obj_get()" am: 81329bd9e9
am: ced7df1d56
am: b0f95435d6
am: 4d02939973
am: fca84de355
Original change: https://android-review.googlesource.com/c/platform/system/bpf/+/2143733 Change-Id: I0b3bb309c5add3f01370181c3dbb06cb81fb7979 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
5927bd79ef
1 changed files with 3 additions and 3 deletions
|
@ -30,9 +30,9 @@
|
|||
#include <sys/wait.h>
|
||||
#include <unistd.h>
|
||||
|
||||
// This is BpfLoader v0.19
|
||||
// This is BpfLoader v0.20
|
||||
#define BPFLOADER_VERSION_MAJOR 0u
|
||||
#define BPFLOADER_VERSION_MINOR 19u
|
||||
#define BPFLOADER_VERSION_MINOR 20u
|
||||
#define BPFLOADER_VERSION ((BPFLOADER_VERSION_MAJOR << 16) | BPFLOADER_VERSION_MINOR)
|
||||
|
||||
#include "bpf/BpfUtils.h"
|
||||
|
@ -822,7 +822,7 @@ static int createMaps(const char* elfPath, ifstream& elfFile, vector<unique_fd>&
|
|||
int saved_errno;
|
||||
|
||||
if (access(mapPinLoc.c_str(), F_OK) == 0) {
|
||||
fd.reset(bpf_obj_get(mapPinLoc.c_str()));
|
||||
fd.reset(mapRetrieveRO(mapPinLoc.c_str()));
|
||||
saved_errno = errno;
|
||||
ALOGD("bpf_create_map reusing map %s, ret: %d", mapNames[i].c_str(), fd.get());
|
||||
reuse = true;
|
||||
|
|
Loading…
Reference in a new issue