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:
Daniel Borkmann 2018-07-18 01:31:19 +02:00 committed by David Ahern
parent 5081979176
commit 282a1fe1f8

View File

@ -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;
}