• Stanislav Fomichev's avatar
    bpftool: Add current libbpf_strict mode to version output · e47d0bf8
    Stanislav Fomichev authored
    + bpftool --legacy --version
    bpftool v5.15.0
    features: libbfd, skeletons
    + bpftool --version
    bpftool v5.15.0
    features: libbfd, libbpf_strict, skeletons
    
    + bpftool --legacy --help
    Usage: bpftool [OPTIONS] OBJECT { COMMAND | help }
           bpftool batch file FILE
           bpftool version
    
           OBJECT := { prog | map | link | cgroup | perf | net | feature | btf | gen | struct_ops | iter }
           OPTIONS := { {-j|--json} [{-p|--pretty}] | {-d|--debug} | {-l|--legacy} |
                        {-V|--version} }
    + bpftool --help
    Usage: bpftool [OPTIONS] OBJECT { COMMAND | help }
           bpftool batch file FILE
           bpftool version
    
           OBJECT := { prog | map | link | cgroup | perf | net | feature | btf | gen | struct_ops | iter }
           OPTIONS := { {-j|--json} [{-p|--pretty}] | {-d|--debug} | {-l|--legacy} |
                        {-V|--version} }
    
    + bpftool --legacy
    Usage: bpftool [OPTIONS] OBJECT { COMMAND | help }
           bpftool batch file FILE
           bpftool version
    
           OBJECT := { prog | map | link | cgroup | perf | net | feature | btf | gen | struct_ops | iter }
           OPTIONS := { {-j|--json} [{-p|--pretty}] | {-d|--debug} | {-l|--legacy} |
                        {-V|--version} }
    + bpftool
    Usage: bpftool [OPTIONS] OBJECT { COMMAND | help }
           bpftool batch file FILE
           bpftool version
    
           OBJECT := { prog | map | link | cgroup | perf | net | feature | btf | gen | struct_ops | iter }
           OPTIONS := { {-j|--json} [{-p|--pretty}] | {-d|--debug} | {-l|--legacy} |
                        {-V|--version} }
    
    + bpftool --legacy version
    bpftool v5.15.0
    features: libbfd, skeletons
    + bpftool version
    bpftool v5.15.0
    features: libbfd, libbpf_strict, skeletons
    
    + bpftool --json --legacy version
    {"version":"5.15.0","features":{"libbfd":true,"libbpf_strict":false,"skeletons":true}}
    + bpftool --json version
    {"version":"5.15.0","features":{"libbfd":true,"libbpf_strict":true,"skeletons":true}}
    Suggested-by: default avatarQuentin Monnet <quentin@isovalent.com>
    Signed-off-by: default avatarStanislav Fomichev <sdf@google.com>
    Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
    Reviewed-by: default avatarQuentin Monnet <quentin@isovalent.com>
    Link: https://lore.kernel.org/bpf/20211116000448.2918854-1-sdf@google.com
    e47d0bf8
main.c 10 KB