aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-sqlite.py
diff options
context:
space:
mode:
authorQuentin Monnet <[email protected]>2019-04-12 14:29:35 +0100
committerDaniel Borkmann <[email protected]>2019-04-16 10:13:21 +0200
commit39c9f10639a3e8ead677492a7ab41cee5fa481a7 (patch)
treeb318904a88052a611c234269b6b7dc3176ef34f7 /tools/perf/scripts/python/export-to-sqlite.py
parent031ebc1aac3dc26c5ef9f5236ad35366bd57de61 (diff)
tools: bpftool: reset errno for "bpftool cgroup tree"
When trying to dump the tree of all cgroups under a given root node, bpftool attempts to query programs of all available attach types. Some of those attach types do not support queries, therefore several of the calls are actually expected to fail. Those calls set errno to EINVAL, which has no consequence for dumping the rest of the tree. It does have consequences however if errno is inspected at a later time. For example, bpftool batch mode relies on errno to determine whether a command has succeeded, and whether it should carry on with the next command. Setting errno to EINVAL when everything worked as expected would therefore make such command fail: # echo 'cgroup tree \n net show' | \ bpftool batch file - To improve this, reset errno when its value is EINVAL after attempting to show programs for all existing attach types in do_show_tree_fn(). Signed-off-by: Quentin Monnet <[email protected]> Reviewed-by: Jakub Kicinski <[email protected]> Acked-by: Song Liu <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions