public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fit line in 80 columns
@ 2022-08-25 17:56 Alejandro Colomar
  2022-08-25 18:06 ` Alexei Starovoitov
  2022-08-29 19:58 ` [PATCH v2] Fit lines " Alejandro Colomar
  0 siblings, 2 replies; 11+ messages in thread
From: Alejandro Colomar @ 2022-08-25 17:56 UTC (permalink / raw)
  To: Quentin Monnet, bpf
  Cc: Alejandro Colomar, linux-man, Alexei Starovoitov, Daniel Borkmann,
	Andrii Nakryiko, Martin KaFai Lau, Song Liu, Yonghong Song,
	John Fastabend, KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa,
	Jesper Dangaard Brouer

That line is used to generate the bpf-helpers(7) manual page.  It
is a no-fill line, since it represents a command, which means that
the formatter can't break the line, and instead just runs across
the right margin (in most set-ups this means that the pager will
break the line).

Using <fmt> makes it end exactly at the 80-col right margin, both
in the header file, and also in the manual page, and also seems to
be a sensible name.

Cc: bpf <bpf@vger.kernel.org>
Cc: linux-man <linux-man@vger.kernel.org>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: Andrii Nakryiko <andrii@kernel.org>
Cc: Martin KaFai Lau <kafai@fb.com>
Cc: Song Liu <songliubraving@fb.com>
Cc: Yonghong Song <yhs@fb.com>
Cc: John Fastabend <john.fastabend@gmail.com>
Cc: KP Singh <kpsingh@kernel.org>
Cc: Stanislav Fomichev <sdf@google.com>
Cc: Hao Luo <haoluo@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Jesper Dangaard Brouer <brouer@redhat.com>
Cc: Quentin Monnet <quentin@isovalent.com>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
---

Hi,

We are adding another linter to the manual pages, which lints
about output going past the right margin of the terminal.

The following results triggered in the bpf-helpers(7) page:

$ make lint-man-groff
LINT (groff)	tmp/lint/man7/bpf-helpers.7.lint-man.groff.touch
an.tmac:man7/bpf-helpers.7:3: style: .TH missing third argument; suggest document modification date in ISO 8601 format (YYYY-MM-DD)
an.tmac:man7/bpf-helpers.7:3: style: .TH missing fourth argument; suggest package/project name and version (e.g., "groff 1.23.0")
an.tmac:man7/bpf-helpers.7:3: style: .TH missing fifth argument and second argument '7' not a recognized manual section; specify volume title
114:                        telnet-470   [001] .N.. 419421.045894: 0x00000001: <formatted msg>
2642:                                int res = bpf_probe_read_user_str(buf, sizeof(buf),
found style problems; aborting
make: *** [lib/lint-man.mk:50: tmp/lint/man7/bpf-helpers.7.lint-man.groff.touch] Error 1


This patch addresses the issue in line 114 (that line count is in
the output rendered page, not in the man(7) source file).

I'm not sure which of those files are used to produce the manual
page, but for consistency I thought it was best to fix both in the
same way.

Cheers,

Alex


 include/uapi/linux/bpf.h       | 5 ++---
 tools/include/uapi/linux/bpf.h | 5 ++---
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
index ef78e0e1a754..c03ae39c03b2 100644
--- a/include/uapi/linux/bpf.h
+++ b/include/uapi/linux/bpf.h
@@ -1619,7 +1619,7 @@ union bpf_attr {
  *
  * 		::
  *
- * 			telnet-470   [001] .N.. 419421.045894: 0x00000001: <formatted msg>
+ * 			telnet-470   [001] .N.. 419421.045894: 0x00000001: <fmt>
  *
  * 		In the above:
  *
@@ -1636,8 +1636,7 @@ union bpf_attr {
  * 			* ``419421.045894`` is a timestamp.
  * 			* ``0x00000001`` is a fake value used by BPF for the
  * 			  instruction pointer register.
- * 			* ``<formatted msg>`` is the message formatted with
- * 			  *fmt*.
+ * 			* ``<fmt>`` is the message formatted with *fmt*.
  *
  * 		The conversion specifiers supported by *fmt* are similar, but
  * 		more limited than for printk(). They are **%d**, **%i**,
diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h
index ef78e0e1a754..c03ae39c03b2 100644
--- a/tools/include/uapi/linux/bpf.h
+++ b/tools/include/uapi/linux/bpf.h
@@ -1619,7 +1619,7 @@ union bpf_attr {
  *
  * 		::
  *
- * 			telnet-470   [001] .N.. 419421.045894: 0x00000001: <formatted msg>
+ * 			telnet-470   [001] .N.. 419421.045894: 0x00000001: <fmt>
  *
  * 		In the above:
  *
@@ -1636,8 +1636,7 @@ union bpf_attr {
  * 			* ``419421.045894`` is a timestamp.
  * 			* ``0x00000001`` is a fake value used by BPF for the
  * 			  instruction pointer register.
- * 			* ``<formatted msg>`` is the message formatted with
- * 			  *fmt*.
+ * 			* ``<fmt>`` is the message formatted with *fmt*.
  *
  * 		The conversion specifiers supported by *fmt* are similar, but
  * 		more limited than for printk(). They are **%d**, **%i**,
-- 
2.37.2


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2022-08-29 20:29 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-25 17:56 [PATCH] Fit line in 80 columns Alejandro Colomar
2022-08-25 18:06 ` Alexei Starovoitov
2022-08-25 21:36   ` Andrii Nakryiko
2022-08-25 21:51     ` Alejandro Colomar
2022-08-25 21:54       ` Alejandro Colomar
2022-08-25 22:54   ` G. Branden Robinson
2022-08-26  0:25     ` Alexei Starovoitov
2022-08-26  0:45     ` Seth David Schoen
2022-08-27  7:20     ` Greg KH
2022-08-29 19:58 ` [PATCH v2] Fit lines " Alejandro Colomar
2022-08-29 20:29   ` Daniel Borkmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox