projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
f7019b7
)
tools: bpftool: use correct argument in cgroup errors
author
Jakub Kicinski
<jakub.kicinski@netronome.com>
Tue, 25 Jun 2019 16:56:31 +0000
(09:56 -0700)
committer
Daniel Borkmann
<daniel@iogearbox.net>
Wed, 26 Jun 2019 12:45:29 +0000
(14:45 +0200)
cgroup code tries to use argv[0] as the cgroup path,
but if it fails uses argv[1] to report errors.
Fixes:
5ccda64d38cc
("bpftool: implement cgroup bpf operations")
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>
Acked-by: Roman Gushchin <guro@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tools/bpf/bpftool/cgroup.c
patch
|
blob
|
history
diff --git
a/tools/bpf/bpftool/cgroup.c
b/tools/bpf/bpftool/cgroup.c
index
73ec8ea
..
a13fb72
100644
(file)
--- a/
tools/bpf/bpftool/cgroup.c
+++ b/
tools/bpf/bpftool/cgroup.c
@@
-168,7
+168,7
@@
static int do_show(int argc, char **argv)
cgroup_fd = open(argv[0], O_RDONLY);
if (cgroup_fd < 0) {
- p_err("can't open cgroup %s", argv[
1
]);
+ p_err("can't open cgroup %s", argv[
0
]);
goto exit;
}
@@
-356,7
+356,7
@@
static int do_attach(int argc, char **argv)
cgroup_fd = open(argv[0], O_RDONLY);
if (cgroup_fd < 0) {
- p_err("can't open cgroup %s", argv[
1
]);
+ p_err("can't open cgroup %s", argv[
0
]);
goto exit;
}
@@
-414,7
+414,7
@@
static int do_detach(int argc, char **argv)
cgroup_fd = open(argv[0], O_RDONLY);
if (cgroup_fd < 0) {
- p_err("can't open cgroup %s", argv[
1
]);
+ p_err("can't open cgroup %s", argv[
0
]);
goto exit;
}