add missing logging for bpf_obj_pin operation am: d8259aa1e4 am: febb48d501

Original change: https://android-review.googlesource.com/c/platform/system/bpf/+/2143113

Change-Id: I8f7b6fec1cb7b638c803c3b67308ffd6f22a3331
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Maciej Żenczykowski 2022-07-01 20:09:25 +00:00 committed by Automerger Merge Worker
commit c1e51cfe15

View file

@ -871,7 +871,11 @@ static int createMaps(const char* elfPath, ifstream& elfFile, vector<unique_fd>&
}
} else {
ret = bpf_obj_pin(fd, mapPinLoc.c_str());
if (ret) return -errno;
if (ret) {
int err = errno;
ALOGE("pin %s -> %d [%d:%s]", mapPinLoc.c_str(), ret, err, strerror(err));
return -err;
}
}
ret = chown(mapPinLoc.c_str(), (uid_t)md[i].uid, (gid_t)md[i].gid);
if (ret) {