NetBpfLoad: prepareLoadMaps() doesn't need mapNames
Test: TreeHugger Flag: EXEMPT mainline Signed-off-by: Maciej Żenczykowski <maze@google.com> Change-Id: I0a8f73fc8104dbe1af44395993b634c18fc3b595
This commit is contained in:
parent
cc15e7a903
commit
3f44c16a15
1 changed files with 3 additions and 3 deletions
|
|
@ -1242,10 +1242,10 @@ static int loadCodeSections(const char* elfPath, vector<codeSection>& cs, const
|
|||
}
|
||||
|
||||
static int prepareLoadMaps(const struct bpf_object* obj, const vector<struct bpf_map_def>& md,
|
||||
const vector<string>& mapNames, const unsigned int bpfloader_ver) {
|
||||
const unsigned int bpfloader_ver) {
|
||||
unsigned kvers = kernelVersion();
|
||||
|
||||
for (int i = 0; i < (int)mapNames.size(); i++) {
|
||||
for (unsigned i = 0; i < md.size(); i++) {
|
||||
struct bpf_map* m = bpf_object__find_map_by_name(obj, md[i].name());
|
||||
if (!m) {
|
||||
ALOGE("bpf_object does not contain map: %s", md[i].name());
|
||||
|
|
@ -1401,7 +1401,7 @@ static int loadProgByLibbpf(const char* const elfPath, const unsigned int bpfloa
|
|||
ret = readMapNames(elfFile, mapNames);
|
||||
if (ret) return ret;
|
||||
|
||||
ret = prepareLoadMaps(obj, md, mapNames, bpfloader_ver);
|
||||
ret = prepareLoadMaps(obj, md, bpfloader_ver);
|
||||
if (ret) return ret;
|
||||
|
||||
ret = readCodeSections(elfFile, cs);
|
||||
|
|
|
|||
Loading…
Reference in a new issue