Skip to content

Commit 5b7e803

Browse files
qmonnetkernel-patches-bot
authored andcommitted
To build man pages for bpftool (and for eBPF helper functions), rst2man
can log different levels of information. Let's make it log all levels to keep the RST files clean. Doing so, rst2man complains about double colons, used for literal blocks, that look like underlines for section titles. Let's add the necessary blank lines. Signed-off-by: Quentin Monnet <[email protected]> --- tools/bpf/bpftool/Documentation/Makefile | 2 +- tools/bpf/bpftool/Documentation/bpftool-btf.rst | 3 +++ tools/bpf/bpftool/Documentation/bpftool-gen.rst | 4 ++++ tools/bpf/bpftool/Documentation/bpftool-map.rst | 3 +++ 4 files changed, 11 insertions(+), 1 deletion(-)
1 parent d0619dd commit 5b7e803

File tree

4 files changed

+11
-1
lines changed

4 files changed

+11
-1
lines changed

tools/bpf/bpftool/Documentation/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ $(OUTPUT)%.8: %.rst
3333
ifndef RST2MAN_DEP
3434
$(error "rst2man not found, but required to generate man pages")
3535
endif
36-
$(QUIET_GEN)rst2man $< > $@
36+
$(QUIET_GEN)rst2man -r 1 $< > $@
3737

3838
clean: helpers-clean
3939
$(call QUIET_CLEAN, Documentation)

tools/bpf/bpftool/Documentation/bpftool-btf.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ OPTIONS
9191
EXAMPLES
9292
========
9393
**# bpftool btf dump id 1226**
94+
9495
::
9596

9697
[1] PTR '(anon)' type_id=2
@@ -104,6 +105,7 @@ EXAMPLES
104105
This gives an example of default output for all supported BTF kinds.
105106

106107
**$ cat prog.c**
108+
107109
::
108110

109111
struct fwd_struct;
@@ -144,6 +146,7 @@ This gives an example of default output for all supported BTF kinds.
144146
}
145147

146148
**$ bpftool btf dump file prog.o**
149+
147150
::
148151

149152
[1] PTR '(anon)' type_id=2

tools/bpf/bpftool/Documentation/bpftool-gen.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ OPTIONS
146146
EXAMPLES
147147
========
148148
**$ cat example.c**
149+
149150
::
150151

151152
#include <stdbool.h>
@@ -187,6 +188,7 @@ This is example BPF application with two BPF programs and a mix of BPF maps
187188
and global variables.
188189

189190
**$ bpftool gen skeleton example.o**
191+
190192
::
191193

192194
/* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */
@@ -241,6 +243,7 @@ and global variables.
241243
#endif /* __EXAMPLE_SKEL_H__ */
242244

243245
**$ cat example_user.c**
246+
244247
::
245248

246249
#include "example.skel.h"
@@ -283,6 +286,7 @@ and global variables.
283286
}
284287

285288
**# ./example_user**
289+
286290
::
287291

288292
my_map name: my_map

tools/bpf/bpftool/Documentation/bpftool-map.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ OPTIONS
182182
EXAMPLES
183183
========
184184
**# bpftool map show**
185+
185186
::
186187

187188
10: hash name some_map flags 0x0
@@ -203,13 +204,15 @@ The following three commands are equivalent:
203204

204205

205206
**# bpftool map dump id 10**
207+
206208
::
207209

208210
key: 00 01 02 03 value: 00 01 02 03 04 05 06 07
209211
key: 0d 00 07 00 value: 02 00 00 00 01 02 03 04
210212
Found 2 elements
211213

212214
**# bpftool map getnext id 10 key 0 1 2 3**
215+
213216
::
214217

215218
key:

0 commit comments

Comments
 (0)