diff options
| author | Hechao Li <[email protected]> | 2019-12-24 01:17:42 +0000 |
|---|---|---|
| committer | Daniel Borkmann <[email protected]> | 2019-12-26 09:35:54 +0000 |
| commit | 1162f844030ac1ac7321b5e8f6c9badc7a11428f (patch) | |
| tree | bf84a24566a166a5c26ebc952a28ec0be6c87f4c /tools/testing/selftests/bpf/test_cpp.cpp | |
| parent | libbpf: Support CO-RE relocations for LDX/ST/STX instructions (diff) | |
| download | kernel-1162f844030ac1ac7321b5e8f6c9badc7a11428f.tar.gz kernel-1162f844030ac1ac7321b5e8f6c9badc7a11428f.zip | |
bpf: Print error message for bpftool cgroup show
Currently, when bpftool cgroup show <path> has an error, no error
message is printed. This is confusing because the user may think the
result is empty.
Before the change:
$ bpftool cgroup show /sys/fs/cgroup
ID AttachType AttachFlags Name
$ echo $?
255
After the change:
$ ./bpftool cgroup show /sys/fs/cgroup
Error: can't query bpf programs attached to /sys/fs/cgroup: Operation
not permitted
v2: Rename check_query_cgroup_progs to cgroup_has_attached_progs
Signed-off-by: Hechao Li <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/testing/selftests/bpf/test_cpp.cpp')
0 files changed, 0 insertions, 0 deletions
