Skip to content
Snippets Groups Projects
Commit 05a06be7 authored by Quentin Monnet's avatar Quentin Monnet Committed by Alexei Starovoitov
Browse files

bpftool: Return an error on prog dumps if both CFG and JSON are required


We do not support JSON output for control flow graphs of programs with
bpftool. So far, requiring both the CFG and JSON output would result in
producing a null JSON object. It makes more sense to raise an error
directly when parsing command line arguments and options, so that users
know they won't get any output they might expect.

If JSON is required for the graph, we leave it to Graphviz instead:

    # bpftool prog dump xlated <REF> visual | dot -Tjson

Suggested-by: default avatarEduard Zingerman <eddyz87@gmail.com>
Signed-off-by: default avatarQuentin Monnet <quentin@isovalent.com>
Link: https://lore.kernel.org/r/20230405132120.59886-5-quentin@isovalent.com


Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent 9fd49684
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment