Util-Linux Archive on lore.kernel.org
 help / color / Atom feed
From: "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com>
To: Karel Zak <kzak@redhat.com>
Cc: mtk.manpages@gmail.com, util-linux@vger.kernel.org
Subject: [PATCH 3/4] Manual pages: order ENVIRONMENT / FILES / CONFORMING TO consistently
Date: Thu, 21 May 2020 09:28:49 +0200
Message-ID: <c56c02e1-2323-3969-d060-0be02d4e64d5@gmail.com> (raw)

There is value in ensuring that manual page sections use consistently
named sections, as far as possible, and also that sections have a
consistent order within manual pages. This is one of a series of patches
to place manual page sections in a consistent order.

In this patch, we ensure that the ENVIRONMENT, FILES, and CONFORMING TO
sections are always placed toward the end of the page, just above NOTES.

One page is not fixed by this patch: term-utils/agetty.8. This page
is a mess of unusual section names, and probably requires an individual
edit.

Testing that no gross editing mistake (causing accidental loss or addition
of text) was performed as follows:

    $ cat $(grep '\.SH' -l $(find . -name '*.[1-9]') |sort) | sort > a
    [Apply patch]
    $ cat $(grep '\.SH' -l $(find . -name '*.[1-9]') |sort) | sort > b
    $ diff a b
    $ echo $?
    0

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
---
 disk-utils/fsck.8       |  4 ++--
 lib/terminal-colors.d.5 |  8 ++++----
 sys-utils/losetup.8     |  8 ++++----
 sys-utils/mount.8       | 22 +++++++++++-----------
 sys-utils/umount.8      | 14 +++++++-------
 5 files changed, 28 insertions(+), 28 deletions(-)

diff --git a/disk-utils/fsck.8 b/disk-utils/fsck.8
index 012c51f6e..97eb8d8c4 100644
--- a/disk-utils/fsck.8
+++ b/disk-utils/fsck.8
@@ -343,8 +343,6 @@ You're almost certainly doing something that you shouldn't be doing
 with
 .BR fsck .
 Options to different filesystem-specific fsck's are not standardized.
-.SH FILES
-.I /etc/fstab
 .SH ENVIRONMENT
 The
 .B fsck
@@ -388,6 +386,8 @@ enables libblkid debug output.
 .TP
 .B LIBMOUNT_DEBUG=all
 enables libmount debug output.
+.SH FILES
+.I /etc/fstab
 .SH AUTHORS
 .nf
 Theodore Ts'o <tytso@mit.edu>
diff --git a/lib/terminal-colors.d.5 b/lib/terminal-colors.d.5
index 4714bf505..b1be822f6 100644
--- a/lib/terminal-colors.d.5
+++ b/lib/terminal-colors.d.5
@@ -145,6 +145,10 @@ Lines where the first non-blank character is a # (hash) are ignored.
 Any other use of the hash character is not interpreted as introducing
 a comment.
 
+.SH ENVIRONMENT
+.IP TERMINAL_COLORS_DEBUG=all
+enables debug output.
+
 .SH FILES
 .I $XDG_CONFIG_HOME/terminal-colors.d
 .br
@@ -152,10 +156,6 @@ a comment.
 .br
 .I /etc/terminal-colors.d
 
-.SH ENVIRONMENT
-.IP TERMINAL_COLORS_DEBUG=all
-enables debug output.
-
 .SH EXAMPLE
 Disable colors for all compatible utilities:
 .RS
diff --git a/sys-utils/losetup.8 b/sys-utils/losetup.8
index 0db710449..7b51921a9 100644
--- a/sys-utils/losetup.8
+++ b/sys-utils/losetup.8
@@ -178,6 +178,10 @@ displays the status of a loop device, it returns 1 if the device
 is not configured and 2 if an error occurred which prevented
 determining the status of the device.
 
+.SH ENVIRONMENT
+.IP LOOPDEV_DEBUG=all
+enables debug output.
+
 .SH FILES
 .TP
 .I /dev/loop[0..N]
@@ -185,10 +189,6 @@ loop block devices
 .TP
 .I /dev/loop-control
 loop control device
-
-.SH ENVIRONMENT
-.IP LOOPDEV_DEBUG=all
-enables debug output.
 .SH EXAMPLE
 The following commands can be used as an example of using the loop device.
 .nf
diff --git a/sys-utils/mount.8 b/sys-utils/mount.8
index 9a43672c6..81bc225cb 100644
--- a/sys-utils/mount.8
+++ b/sys-utils/mount.8
@@ -2574,6 +2574,17 @@ and
 to the mount.<suffix> helpers.  All other options are used in a
 comma-separated list as argument to the \fB\-o\fR option.
 
+.SH ENVIRONMENT
+.IP LIBMOUNT_FSTAB=<path>
+overrides the default location of the fstab file (ignored for suid)
+.IP LIBMOUNT_MTAB=<path>
+overrides the default location of the mtab file (ignored for suid)
+.IP LIBMOUNT_DEBUG=all
+enables libmount debug output
+.IP LIBBLKID_DEBUG=all
+enables libblkid debug output
+.IP LOOPDEV_DEBUG=all
+enables loop device setup debug output
 .SH FILES
 See also "\fBThe files /etc/fstab, /etc/mtab and /proc/mounts\fR" section above.
 .TP 18n
@@ -2594,17 +2605,6 @@ temporary file (unused on systems with mtab symlink)
 .TP
 .I /etc/filesystems
 a list of filesystem types to try
-.SH ENVIRONMENT
-.IP LIBMOUNT_FSTAB=<path>
-overrides the default location of the fstab file (ignored for suid)
-.IP LIBMOUNT_MTAB=<path>
-overrides the default location of the mtab file (ignored for suid)
-.IP LIBMOUNT_DEBUG=all
-enables libmount debug output
-.IP LIBBLKID_DEBUG=all
-enables libblkid debug output
-.IP LOOPDEV_DEBUG=all
-enables loop device setup debug output
 .SH HISTORY
 A
 .B mount
diff --git a/sys-utils/umount.8 b/sys-utils/umount.8
index 434877afc..43363b11c 100644
--- a/sys-utils/umount.8
+++ b/sys-utils/umount.8
@@ -253,6 +253,13 @@ to the \fB/sbin/umount.\fItype\fR helper independently of UID.
 .PP
 Note that \fI/etc/mtab\fR is currently deprecated and helper= and another
 userspace mount options are maintained by libmount.
+.SH ENVIRONMENT
+.IP LIBMOUNT_FSTAB=<path>
+overrides the default location of the fstab file (ignored for suid)
+.IP LIBMOUNT_MTAB=<path>
+overrides the default location of the mtab file (ignored for suid)
+.IP LIBMOUNT_DEBUG=all
+enables libmount debug output
 .SH FILES
 .TP
 .I /etc/mtab
@@ -264,13 +271,6 @@ table of known filesystems
 .TP
 .I /proc/self/mountinfo
 table of mounted filesystems generated by kernel.
-.SH ENVIRONMENT
-.IP LIBMOUNT_FSTAB=<path>
-overrides the default location of the fstab file (ignored for suid)
-.IP LIBMOUNT_MTAB=<path>
-overrides the default location of the mtab file (ignored for suid)
-.IP LIBMOUNT_DEBUG=all
-enables libmount debug output
 .SH HISTORY
 A
 .B umount
-- 
2.26.2

-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

                 reply index

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c56c02e1-2323-3969-d060-0be02d4e64d5@gmail.com \
    --to=mtk.manpages@gmail.com \
    --cc=kzak@redhat.com \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Util-Linux Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/util-linux/0 util-linux/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 util-linux util-linux/ https://lore.kernel.org/util-linux \
		util-linux@vger.kernel.org
	public-inbox-index util-linux

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.util-linux


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git