From: Daniel Borkmann Date: Tue, 17 Jul 2018 23:31:19 +0000 (+0200) Subject: bpf: move bpf_elf_map fixup notification under verbose X-Git-Tag: v4.19.0~97^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=282a1fe1f8fc87b1ebca4ca6f4440d2e69cf4b8f;p=thirdparty%2Fiproute2.git 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 Signed-off-by: David Ahern --- diff --git a/lib/bpf.c b/lib/bpf.c index 4e26c0df7..42093db41 100644 --- a/lib/bpf.c +++ b/lib/bpf.c @@ -1893,9 +1893,9 @@ static int bpf_fetch_maps_end(struct bpf_elf_ctx *ctx) } memcpy(ctx->maps, fixup, sizeof(fixup)); - - printf("Note: %zu bytes struct bpf_elf_map fixup performed due to size mismatch!\n", - sizeof(struct bpf_elf_map) - ctx->map_len); + if (ctx->verbose) + printf("%zu bytes struct bpf_elf_map fixup performed due to size mismatch!\n", + sizeof(struct bpf_elf_map) - ctx->map_len); return 0; }