]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
mkswap: use dd(1) in example rather than fallocate(1)
authorKarel Zak <kzak@redhat.com>
Wed, 12 Dec 2018 11:14:39 +0000 (12:14 +0100)
committerKarel Zak <kzak@redhat.com>
Fri, 4 Jan 2019 10:46:08 +0000 (11:46 +0100)
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>
disk-utils/mkswap.8

index a6ab8530da7609963a964e7c85ef7e127d071f5d..27f9221718e270c90aebc5ec0159772cb5393618 100644 (file)
@@ -124,10 +124,12 @@ e.g.\& using a command like
 
 .nf
 .RS
-# fallocate \-\-length 8GiB swapfile
+# dd if=/dev/zero of=swapfile bs=1MiB count=$((8*1024))
 .RE
 .fi
 
+to create 8GiB swapfile.
+
 Note that a swap file must not contain any holes.  Using
 .BR cp (1)
 to create the file is not acceptable.  Neither is use of