Commit Graph

43 Commits

Author SHA1 Message Date
Karel Zak 701f0385a0 mkswap: add --verbose, reduce extents check output
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>
2020-09-10 12:54:14 +02:00
Karel Zak b8671fe763 mkswap: add --lock and LOCK_BLOCK_DEVICE
Addresses: https://github.com/karelzak/util-linux/issues/921
Signed-off-by: Karel Zak <kzak@redhat.com>
2020-05-27 16:59:16 +02:00
Michael Kerrisk (man-pages) 67e63c1263 Manual pages: order NOTES / HISTORY / BUGS / EXAMPLE 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 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>
2020-05-22 10:25:50 +02:00
Michael Kerrisk (man-pages) 5a82980632 docs: (man) remove double quotes (") in .SH lines
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>
2020-05-19 12:15:34 +02:00
Karel Zak f91c21cc7e mkswap: be more explicit about maximal number of pages
Addresses: https://github.com/karelzak/util-linux/pull/766
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-03-08 12:14:19 +01:00
Karel Zak 1895c76f74 swapon: rewrite section about swapfiles
* 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>
2019-01-22 10:02:17 +01:00
Karel Zak 77983e4a21 swapon: (man) iomap for swapfile is already supported by kernel
... since commit 67482129cdabf7cede1301d2415ef4f0156d35cd (Linus'
tree).

Signed-off-by: Karel Zak <kzak@redhat.com>
2019-01-21 17:01:25 +01:00
Karel Zak eebfa469fc swapon: (man) cleanup note about holes
Addresses: https://github.com/karelzak/util-linux/issues/633
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-01-21 12:54:20 +01:00
Karel Zak 4d09682b3c mkswap: use dd(1) in example rather than fallocate(1)
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>
2018-12-12 12:14:39 +01:00
Sébastien Helleu d673b74e9d docs: replace FTP by HTTPS in kernel.org URLs
The links to ftp://ftp.kernel.org/ are replaced by
https://www.kernel.org/.

Signed-off-by: Karel Zak <kzak@redhat.com>
2016-12-19 11:22:26 +01:00
Sami Kerola 55034ed00e docs: unify mkswap(8) with swapon(8) about holes warning
Reviewed-by: Dave Rutherford <dave@evilpettingzoo.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2015-06-29 12:06:00 +02:00
Benno Schulenberg 3a60b1c26b docs: remove obsolete and unneeded comments from man-page files
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>
2015-01-12 11:03:26 +01:00
Benno Schulenberg f49ccec212 docs: don't use bold or italics for "[option]" in synopsis of man pages
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>
2014-12-19 09:57:23 +01:00
Karel Zak 68e422ecae docs: update info about env debug variables
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-11-03 13:13:54 +01:00
Bjarni Ingi Gislason 9697975498 mkswap: Some minor typographical corrections to the manual
-- 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>
2014-04-07 12:31:48 +02:00
Phillip Susi d9ba898a7f mkswap: remove cruft from the man page
I don't think there's any reason to continue to mention behavior
of kernels older than 10 years.

Signed-off-by: Phillip Susi <psusi@ubuntu.com>
2013-11-14 12:29:54 +01:00
Karel Zak f1477c4b74 mkswap: add note about swap header limit to the man page
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-08-01 15:00:59 +02:00
Sami Kerola f31adc8f76 docs: mkswap.8: recommend fallocate(1)
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>
2013-01-25 10:15:40 +01:00
Milan Broz c1f1b30171 mkswap: wipe old signature if there is no part table by default
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>
2012-09-21 12:43:33 +02:00
Davidlohr Bueso ddfeda98d8 blkid: document LIBBLKID_DEBUG users
Update the manpages of programs that use this environment variable for
extra debugging information.

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
2012-09-04 17:21:54 +02:00
Benno Schulenberg 449a215fc5 docs: tweak the formatting and wording of several disk-utils man pages
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2011-08-29 11:24:47 +02:00
Benno Schulenberg 232dc924c4 docs: uniformize the header and footer lines in man pages
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>
2011-08-22 10:39:21 +02:00
Sami Kerola 17945af6be doc: mention mkswap long options in man page
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>
2011-02-21 16:20:53 +01:00
Karel Zak 601d12fb10 rename util-linux-ng back to util-linux
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-30 11:41:59 +01:00
Benno Schulenberg 83ff3782a3 mkswap: tweak the man page
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>
2010-06-30 12:51:36 +02:00
Karel Zak c4c20b3ad7 mkswap: add a note that -p is uncecessary
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-06-17 11:15:40 +02:00
Peter Breitenlohner 327f07d601 mkswap: restore device argument in mkswap.8 synopsis
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
2009-11-02 10:06:06 +01:00
Peter Breitenlohner e584ccb863 mkswap.8: formatting
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
2009-08-17 12:11:10 +02:00
Karel Zak d10056b34d mkswap: clean up man page
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-03-13 14:31:31 +01:00
Karel Zak 4c85aa3a4c mkswap: remove v0 swap space support
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>
2009-03-11 15:23:16 +01:00
Martin Schulze 93bf0f285d mkswap: set UUID for swap space (add -U option)
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>
2008-02-15 01:31:50 +01:00
Matthias Koenig 30294a2fe8 mkswap: default to V1 in any case
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>
2007-07-24 14:59:32 +02:00
Karel Zak 86d62711a9 man pages: add "AVAILABILITY" section
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-07-03 01:17:04 +02:00
Karel Zak ca3ea756e7 Imported from util-linux-2.13-pre4 tarball. 2006-12-07 00:27:06 +01:00
Karel Zak 756bfd018e Imported from util-linux-2.12o tarball. 2006-12-07 00:26:31 +01:00
Karel Zak 95f1bdeee4 Imported from util-linux-2.11x tarball. 2006-12-07 00:26:05 +01:00
Karel Zak 22853e4a82 Imported from util-linux-2.10m tarball. 2006-12-07 00:25:43 +01:00
Karel Zak eb63b9b8f4 Imported from util-linux-2.10f tarball. 2006-12-07 00:25:41 +01:00
Karel Zak 7eda085c41 Imported from util-linux-2.9v tarball. 2006-12-07 00:25:39 +01:00
Karel Zak 5c36a0eb7c Imported from util-linux-2.9i tarball. 2006-12-07 00:25:37 +01:00
Karel Zak fd6b7a7ffc Imported from util-linux-2.7.1 tarball. 2006-12-07 00:25:34 +01:00
Karel Zak 726f69e29c Imported from util-linux-2.5 tarball. 2006-12-07 00:25:33 +01:00
Karel Zak 6dbe3af945 Imported from util-linux-2.2 tarball. 2006-12-07 00:25:32 +01:00