We do not need to provide details in the default output. It seems
better to hide it behind --verbose to be user-friendly.
Signed-off-by: Karel Zak <kzak@redhat.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>
Using double quotes in .SH lines containing multiple words is unneeded,
and in any case is not consistently done in the util-linux manual pages,
where double quotes are used in only around half of the cases.
(This usage was long ago elminated in the man-pages project, with
no ill effects reported to date.)
Remove these quotes, so that .SH lines are more uniform, in preparation
for some (more easily) scripted doiscovery of consistency problems in
(and possibly global fixes to) the manual pages.
Other than stripping the double quotes, this patch makes no changes to
the content of the manual pages.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
* don't duplicate info on two places -- let's keep only small note
in mkswap(8) man page, suggest to read swapon(8) man page
* add info about kernel versions for XFS and Btrfs swapfiles support
* use subsection in the NOTES
Addresses: https://github.com/karelzak/util-linux/issues/633
Signed-off-by: Karel Zak <kzak@redhat.com>
The man page warns against fallocate on some filesystems and recommends
dd(1) as the most portable solution. So, let's use dd(1) also in the
example used in the same man page.
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1203378
Signed-off-by: Karel Zak <kzak@redhat.com>
Transform some of them into copyright lines.
Also fix three header lines and snip some trailing whitespace.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
As per the convention shown in Documentation/howto-man-page.txt.
Also make a few other tiny adjustments along the way.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
-- changed to \(en (an en-dash) if it is a dash (pause, separation)
- changed to \- if it indicates an option
A full stop (.), that begins or ends a string, protected with \&
Space between sentences corrected to two word spaces
-- changed to \-\- if it indicates an option
Signed-off-by: Karel Zak <kzak@redhat.com>
There is no reason why fallocate(1) should not be preferred instead of
'dd if=/dev/zero of=swapfile' with it's cumbersome size spec.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
Historically mkswap avoids wiping any signature on "whole disk",
until force option is given.
While the idea is that it should not wipe possible boot loader,
in reality it leads to many situations where e.g. LUKS device
is overwritten but still can be detected as LUKS (but unusable).
Patch chnges behaviour that only if partition table is detected,
signatures are not wiped.
Also it removes check for block device - loop device can now
map partitions in-kernel, so using mkswap on disk image in file
should behave the same as on disk.
Also it adds warning that know signature was wiped.
Signed-off-by: Milan Broz <mbroz@redhat.com>
Use dates without the day, use the full month name, put "util-linux" in
the lower left corner, and "User Commands" or "System Administration"
at the top center.
Also improve here and there the one-line program description.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
The update will also expand kernel version numbers to have a
month and year next to them. This should help users can get idea
how long, for example, swap v1 has been around.
[kzak@redhat.com: - modify synopsis, remove duplicate info about page size]
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
Note that option -v0 is obsolete, and remove the now unneeded comment
about new-style swap areas. Further doublespace sentences, add some
commas and articles, and alphabetize the options.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
The kernel has not supported v0 swap space format since 2.5.22. The
new version v1 is supported since 2.1.117.
Signed-off-by: Karel Zak <kzak@redhat.com>
A friend of mine is looking into the possibility of cloning Debian
(and other) systems automatically and stomped over swap partitions
getting assigned new UUIDs every time the new harddisk is partitioned
and swap is created.
It's essential when partitions are to be recognised by their uuid and
not by their old device path anymore.
Addresses-Ubuntu-Bug: #66637
Signed-off-by: LaMont Jones <lamont@debian.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
mkswap(8) enforces to use v0 swap format when pagesize > 16kB.
(use case might be ppc64 with CONFIG_PPC_64K_PAGES).
As version 0 swap is not supported anymore by recent kernels, the
behaviour in this case is rather strange.
Here is a testcase:
for i in 4 8 16 32 64; do mkswap -p `expr $i \* 1024` ./swap.file; done
Setting up swapspace version 1, size = 4294963 kB
Using user-specified page size 8192, instead of the system values
4096/4096
Setting up swapspace version 1, size = 4294959 kB
Using user-specified page size 16384, instead of the system values
4096/4096
Setting up swapspace version 1, size = 4294950 kB
Using user-specified page size 32768, instead of the system values
4096/4096
Setting up swapspace version 0, size = 4294934 kB
Using user-specified page size 65536, instead of the system values
4096/4096
Setting up swapspace version 0, size = 4294901 kB
Signed-off-by: Matthias Koenig <mkoenig@suse.de>
Signed-off-by: Karel Zak <kzak@redhat.com>