]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
bpf: move bpf_elf_map fixup notification under verbose
authorDaniel Borkmann <daniel@iogearbox.net>
Tue, 17 Jul 2018 23:31:19 +0000 (01:31 +0200)
committerDavid Ahern <dsahern@gmail.com>
Wed, 18 Jul 2018 02:38:38 +0000 (19:38 -0700)
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>
lib/bpf.c

index 4e26c0df76c51d9748b2c86df9de1c43c7945470..42093db41330f1ed568e1bd74ca1bcb4a9e0a9ad 100644 (file)
--- 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;
 }