Commit 2c6dcad
bpf_doc: Support 1st const parameter of bpf_d_path()
Since commit 1b8abbb ("bpf...d_path(): constify path argument"),
the first parameter of the bpf_d_path() has been changed to a const
constant. We need to modify the header file and bpf_doc.py.
The two error messages are as follows:
linux/tools/testing/selftests/bpf$ make
CLNG-BPF [test_progs] bpf_iter_task_vmas.bpf.o
progs/bpf_iter_task_vmas.c:52:14: error: passing 'const struct path *'
to parameter of type 'struct path *' discards qualifiers
[-Werror,-Wincompatible-pointer-types-discards-qualifiers]
52 | bpf_d_path(&file->f_path, d_path_buf, D_PATH_BUF_SIZE);
| ^~~~~~~~~~~~~
1 error generated.
....
progs/verifier_vfs_accept.c:80:7: error: assigning to 'struct path *'
from 'const struct path *' discards qualifiers
[-Werror,-Wincompatible-pointer-types-discards-qualifiers]
80 | path = &file->f_path;
| ^ ~~~~~~~~~~~~~
1 error generated.
Fixes: 1b8abbb ("bpf...d_path(): constify path argument")
Signed-off-by: Rong Tao <[email protected]>1 parent e0b1dc1 commit 2c6dcad
File tree
4 files changed
+4
-3
lines changed- include/uapi/linux
- scripts
- tools
- include/uapi/linux
- testing/selftests/bpf/progs
4 files changed
+4
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4891 | 4891 | | |
4892 | 4892 | | |
4893 | 4893 | | |
4894 | | - | |
| 4894 | + | |
4895 | 4895 | | |
4896 | 4896 | | |
4897 | 4897 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
788 | 788 | | |
789 | 789 | | |
790 | 790 | | |
| 791 | + | |
791 | 792 | | |
792 | 793 | | |
793 | 794 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4891 | 4891 | | |
4892 | 4892 | | |
4893 | 4893 | | |
4894 | | - | |
| 4894 | + | |
4895 | 4895 | | |
4896 | 4896 | | |
4897 | 4897 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
| 73 | + | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| |||
0 commit comments