Most of these are "obviously correct":
- formatting fixes
- improved English wordings
- add missing articles ("a", "the")
- a few spelling fixes
- a few "obvious" corrections to the text
Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
In several pages, there is a consistent wording problem: "another"
where "other" should be used. This wording problem can be
surprisingly confusing for native speakers, especially those
unaware that in some other languages, "another" and "other" can be
expressed with the same word.
Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
Currently, this page has a mix of "filesystem" and file system",
with the former being predominant. Let's settle on one.
Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
Add a table listing other manual pages that describe mount options
of some widely used filesystems. Additionally, rewrite the remaining
text to be a bit easier to read.
Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
There are various references to "namespaces" when it would be
clearer to say "mount namespaces". Also, add references to the
mount_namespaces(7) manual page.
Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
The text describing the persistent mount namespace example
is rather confused. Explain more clearly the purpose of making
the parent directory a bind mount with private propagation.
Also make a few other wording improvements.
Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
A while ago stdout and stderr have been split in these testcases, but
"FATAL: kernel too old" is actually treated as an "okay" output. However
this FATAL ends up on stderr, so when it happens, it is not seen in
the captured stdout.
Fix this by merging stdout/stderr in these cases once again.
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Chris Hofstaedtler <zeha@debian.org>
Bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=961639
Fixes: cbf858aa08
Earlier, I patched various pages to consistently use EXAMPLE as a
section heading, rather than EXAMPLES. (At that time, both headings
occurred in util-linux, with roughly equal frequency.)
Since then, I've observed that EXAMPLES is the more common usage
across a large corpus of manual pages. So, in Linux the man-pages
project, I switched to using EXAMPLES also. This patch makes the same
change for util-linux.
Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
Explicitly mention "System V" in the description, so that readers do not
get confused with the POSIX IPC mechanisms.
Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
These commands all relate to System V IPC, so point the reader
at the relevant Section 7 page provided by the Linux man-pages
project.
Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
The text describing this option is a little hard to understand.
Improve it.
Cc: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
The current code hides details about reason why swapoff(8) and swapoff(2) failed. For example
ENOMEM from swapoff(2) is important as it indicates OOM.
The patch also clean ups --all return codes to be more compatible for
example with [u]mount --all, etc.
Addresses: https://github.com/karelzak/util-linux/issues/1050
Signed-off-by: Karel Zak <kzak@redhat.com>
Let's print number of detected errors or "No errors detected." for
MBR. We already use the same for GPT.
The patch also modifies fdisk_verify_disklabel() return code to inform
caller about number of issues.
Addresses: https://github.com/karelzak/util-linux/issues/1051
Signed-off-by: Karel Zak <kzak@redhat.com>
All simple function to parse --lock <mode> and $LOCK_BLOCK_DEVICE,
and to flock the fd.
The supported <mode> is:
"1" or "yes" - LOCK_EX
"0" or "no" - do nothing
"nonblock" - LOCK_EX | LOCK_NB
The function tries LOCK_NB before the solo LOCK_EX and prints
inform user that it will wait, for example:
session A:
# sfdisk --lock /dev/sdc
session B:
# sfdisk --lock /dev/sdc
sfdisk: /dev/sdc: device already locked, waiting to get lock ...
^C
# sfdisk --lock=nonblock /dev/sdc
sfdisk: /dev/sdc: device already locked
Addresses: https://github.com/karelzak/util-linux/issues/921
Signed-off-by: Karel Zak <kzak@redhat.com>
My earlier change that took libmagic in use to identify mime-type of an input
file caused empty files to be marked binary. Before the change empty files
were simply displayed as empty. This change will restore that behavior.
Addresses: 09070e1a65
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
The time namespaces example had no explanatory text! Add some.
Also, use the "uptime -p" option for output that is more compact
(and perhaps more readable).
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The explanation of the --kill-child example was quite confused and
also the example shell demo was broken because of quoting issues.
It is not the case that the *children* of 'program' would adopted by
init, but rather that 'program' itself (which would be running as PID
1 inside the namespace and is a child of 'unshare') would be adopted
by init.
Rework the --kill-child example. Add a lot more explanation, and
expand the example shell session to give the reader a much better
picture of what is going on.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The examples section of this manual page is rather hard to grok.
First, the arrangement of the text as follows makes life harder
than needed for the reader:
shell demo
explanatory text
It helps the reader if an example *begins* with an explanation of
what is being demonstrated. Therefore, rearrange these examples as:
explanatory text
shell demo
In addition, let's provide a bit more explanation for the first three
examples and expand the second example (user namespaces) a little.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The intro paragraph talks about entering the namespace of other
processes. That's not quite accurate, since nsenter can be used (via
a bind mount) to enter a namespace that has no member processes. So
rework NAME and the intro paragraph in DESCRIPTION to remove mention
of "processes".
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The intro paragraphs of this page are rather hard for a newcomer to
grok. The name of the underlying system call (and consequently the
name of the command) are "strange", but let's help the reader by
naming more clearly what unshare(1) does: creating new namespaces. In
addition, clarify and expand the details on making a namespace
persistent using bind mounts.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Back in commits f85b9777c2 and 894efece9e, in the
description of each namespace type, I added repeated cross references
to clone(2). Drop these references. The Section 7 namespaces pages,
which are already noted in the nsenter(1) and unshare(1) manual pages,
provide much more relevant information. Furthermore, pointing the
reader at clone(2) is perhaps a little misleading, since the system
call underlying nsenter(1) is setns(2) and the system call underlying
unshare(1) is unshare(2).
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Nowadays, the Linux man-pages project provides separate Section 7
manual pages for each type of namespace. Update the cross references
in nsenter.1 and unshare.1 to reflect this.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
- use --with-vendordir= (rather than --enable) to be compatible with
another package stuuf
- add USE_VENDORDIR automake condition
- add vendordir to global AM_CPPFLAGS to avoid binary specific cflags
modifications
Signed-off-by: Karel Zak <kzak@redhat.com>
This new option works like --all but it allows to specify multiple
files with filesystems to make fstrim configuration more portable
between distributions. For example:
fstrim --listed-in /etc/fstab:/proc/self/mountinfo
forces fstrim to try fstab and if unsuccessful than try mountinfo.
Addresses: https://github.com/karelzak/util-linux/issues/1019
Signed-off-by: Karel Zak <kzak@redhat.com>
The different libc implements TZ deprecation in settimeofday() library
function in the different way. Let's hide these portability issues and
use directly Linux syscall to set timezone.
Addresses: https://github.com/karelzak/util-linux/issues/995
Signed-off-by: Karel Zak <kzak@redhat.com>
CC: J William Piggott <elseifthen@gmx.com>
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>
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 NOTES, HISTORY, BUGS, and EXAMPLE
sections are always placed near the end of the page, just above
AUTHORS, COPYRIGHT, SEE ALSO, and AVAILABILITY.
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>