bpf: move bpf_elf_map fixup notification under verbose
No need to spam the user with this if it can be fixed gracefully anyway. Therefore, move it under verbose option. Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: David Ahern <dsahern@gmail.com>
This commit is contained in:
parent
5081979176
commit
282a1fe1f8
|
|
@ -1893,9 +1893,9 @@ static int bpf_fetch_maps_end(struct bpf_elf_ctx *ctx)
|
||||||
}
|
}
|
||||||
|
|
||||||
memcpy(ctx->maps, fixup, sizeof(fixup));
|
memcpy(ctx->maps, fixup, sizeof(fixup));
|
||||||
|
if (ctx->verbose)
|
||||||
printf("Note: %zu bytes struct bpf_elf_map fixup performed due to size mismatch!\n",
|
printf("%zu bytes struct bpf_elf_map fixup performed due to size mismatch!\n",
|
||||||
sizeof(struct bpf_elf_map) - ctx->map_len);
|
sizeof(struct bpf_elf_map) - ctx->map_len);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue