From 380fd9aa95d7d59e50e37b5231d5a8daeab78d35 Mon Sep 17 00:00:00 2001 From: "Michael Kerrisk (man-pages)" Date: Thu, 21 May 2020 09:28:49 +0200 Subject: [PATCH] Manual pages: order ENVIRONMENT / FILES / CONFORMING TO consistently 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 --- 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 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. helpers. All other options are used in a comma-separated list as argument to the \fB\-o\fR option. +.SH ENVIRONMENT +.IP LIBMOUNT_FSTAB= +overrides the default location of the fstab file (ignored for suid) +.IP LIBMOUNT_MTAB= +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= -overrides the default location of the fstab file (ignored for suid) -.IP LIBMOUNT_MTAB= -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= +overrides the default location of the fstab file (ignored for suid) +.IP LIBMOUNT_MTAB= +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= -overrides the default location of the fstab file (ignored for suid) -.IP LIBMOUNT_MTAB= -overrides the default location of the mtab file (ignored for suid) -.IP LIBMOUNT_DEBUG=all -enables libmount debug output .SH HISTORY A .B umount