Skip to contentSkip to conversation

dcb-dcbx.8: some remarks and editorial changes for this manual

PATCH Bjarni Ingi Gislason 1 participant 1 message Nov 5, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

The man page is from Debian:

Package: iproute2
Version: 6.11.0-1
Severity: minor
Tags: patch

Improve the layout of the man page according to the "man-page(7)"
guidelines, the output of "mandoc -lint T", the output of "groff -mandoc -t -ww -b -z", that of a shell script, and typographical conventions.

-.-

Output from a script "chk_man" is in the attachment.

-.-

dcb-dcbx.8.new renamed from dcb-dcbx.8 +27 -20
index bafc18f..790c56c 100644
@@ -2,24 +2,23 @@
 .SH NAME
 dcb-dcbx \- show / manipulate port DCBX (Data Center Bridging eXchange)
 .SH SYNOPSIS
-.sp
 .ad l
 .in +8
 
 .ti -8
 .B dcb
-.RI "[ " OPTIONS " ] "
+.RI "[ " OPTIONS " ]"
 .B dcbx
 .RI "{ " COMMAND " | " help " }"
 .sp
 
 .ti -8
 .B dcb dcbx show dev
-.RI DEV
+.I DEV
 
 .ti -8
 .B dcb dcbx set dev
-.RI DEV
+.I DEV
 .RB "[ " host " ]"
 .RB "[ " lld-managed " ]"
 .RB "[ " cee " ]"
@@ -29,16 +28,20 @@ dcb-dcbx \- show / manipulate port DCBX (Data Center Bridging eXchange)
 .SH DESCRIPTION
 
 Data Center Bridging eXchange (DCBX) is a protocol used by DCB devices to
-exchange configuration information with directly connected peers. The Linux DCBX
-object is a 1-byte bitfield of flags that configure whether DCBX is implemented
-in the device or in the host, and which version of the protocol should be used.
+exchange configuration information with directly connected peers.
+The Linux DCBX object is a 1-byte bitfield of flags that configure whether
+DCBX is implemented in the device or in the host,
+and which version of the protocol should be used.
 .B dcb dcbx
 is used to access the per-port Linux DCBX object.
 
 There are two principal modes of operation: in
 .B host
-mode, DCBX protocol is implemented by the host LLDP agent, and the DCB
-interfaces are used to propagate the negotiate parameters to capable devices. In
+mode,
+DCBX protocol is implemented by the host LLDP agent,
+and the DCB interfaces are used to propagate the negotiate parameters to
+capable devices.
+In
 .B lld-managed
 mode, the configuration is handled by the device, and DCB interfaces are used
 for inspection of negotiated parameters, and can also be used to set initial
@@ -47,19 +50,21 @@ parameters.
 .SH PARAMETERS
 
 When used with
-.B dcb dcbx set,
-the following keywords enable the corresponding configuration. The keywords that
-are not mentioned on the command line are considered disabled. When used with
-.B show,
+.BR "dcb dcbx set" ,
+the following keywords enable the corresponding configuration.
+The keywords that are not mentioned on the command line are considered
+disabled.
+When used with
+.BR show ,
 each enabled feature is shown by its corresponding keyword.
 
 .TP
 .B host
 .TQ
 .B lld-managed
-The device is in the host mode of operation and, respectively, the lld-managed
-mode of operation, as described above. In principle these two keywords are
-mutually exclusive, but
+The device is in the host mode of operation and, respectively,
+the lld-managed mode of operation, as described above.
+In principle these two keywords are mutually exclusive, but
 .B dcb dcbx
 allows setting both and lets the driver handle it as appropriate.
 
@@ -67,15 +72,17 @@ allows setting both and lets the driver handle it as appropriate.
 .B cee
 .TQ
 .B ieee
-The device supports CEE (Converged Enhanced Ethernet) and, respectively, IEEE
-version of the DCB specification. Typically only one of these will be set, but
+The device supports CEE (Converged Enhanced Ethernet) and, respectively,
+IEEE version of the DCB specification.
+Typically only one of these will be set, but
 .B dcb dcbx
 does not mandate this.
 
 .TP
 .B static
-indicates the engine supports static configuration. No actual negotiation is
-performed, negotiated parameters are always the initial configuration.
+indicates the engine supports static configuration.
+No actual negotiation is performed,
+negotiated parameters are always the initial configuration.
 
 .SH EXAMPLE & USAGE
 

Any program (person), that produces man pages, should check the output
for defects by using (both groff and nroff)

[gn]roff -mandoc -t -ww -b -z -K utf8 <man page>

The same goes for man pages that are used as an input.

For a style guide use

mandoc -T lint

-.-

So any 'generator' should check its products with the above mentioned
'groff', 'mandoc', and additionally with 'nroff ...'.

This is just a simple quality control measure.

The 'generator' may have to be corrected to get a better man page,
the source file may, and any additional file may.

Common defects:

Input text line longer than 80 bytes.

Not removing trailing spaces (in in- and output).
The reason for these trailing spaces should be found and eliminated.

Not beginning each input sentence on a new line.
Lines should thus be shorter.

See man-pages(7), item 'semantic newline'.

-.-

The difference between the formatted output of the original and patched file can be seen with:

nroff -mandoc <file1> > <out1>
nroff -mandoc <file2> > <out2>
diff -u <out1> <out2>

and for groff, using

"printf '%s\n%s\n' '.kern 0' '.ss 12 0' | groff -mandoc -Z - "

instead of 'nroff -mandoc'

Add the option '-t', if the file contains a table.

Read the output of 'diff -u' with 'less -R' or similar.

-.-.

If 'man' (man-db) is used to check the manual for warnings,
the following must be set:

The option "-warnings=w"

The environmental variable:

export MAN_KEEP_STDERR=yes (or any non-empty value)

or

(produce only warnings):

export MANROFFOPT="-ww -b -z"

export MAN_KEEP_STDERR=yes (or any non-empty value)

-.-.

Output from "mandoc -T lint dcb-dcbx.8": (possibly shortened list)

mandoc: dcb-dcbx.8:5:2: WARNING: skipping paragraph macro: sp after SH

-.-.

Use the correct macro for the font change of a single argument or split the argument into two.

18:.RI DEV
22:.RI DEV

-.-.

Wrong distance between sentences in the input file.

Separate the sentences and subordinate clauses; each begins on a new
line. See man-pages(7) ("Conventions for source file layout") and "info groff" ("Input Conventions").

The best procedure is to always start a new sentence on a new line,
at least, if you are typing on a computer.

Remember coding: Only one command ("sentence") on each (logical) line.

E-mail: Easier to quote exactly the relevant lines.

Generally: Easier to edit the sentence.

Patches: Less unaffected text.

Search for two adjacent words is easier, when they belong to the same line, and the same phrase.

The amount of space between sentences in the output can then be
controlled with the ".ss" request.

32:exchange configuration information with directly connected peers. The Linux DCBX 41:interfaces are used to propagate the negotiate parameters to capable devices. In 51:the following keywords enable the corresponding configuration. The keywords that 52:are not mentioned on the command line are considered disabled. When used with 61:mode of operation, as described above. In principle these two keywords are 71:version of the DCB specification. Typically only one of these will be set, but 77:indicates the engine supports static configuration. No actual negotiation is

-.-.

Split a punctuation from a single argument, if a two-font macro is meant

53:.B show,

-.-.

No space is needed before a quote (") at the end of a line

11:.RI "[ " OPTIONS " ] "

-.-.

Output from "test-groff -mandoc -t -K utf8 -rF0 -rHY=0 -ww -b -z ":

troff: backtrace: '/home/bg/git/groff/build/s-tmac/an.tmac':709: macro 'RI'
troff: backtrace: file '<stdin>':11
troff:<stdin>:11: warning: trailing space in the line