summaryrefslogtreecommitdiffstats
path: root/disk-utils/swaplabel.c
diff options
context:
space:
mode:
authorSami Kerola2014-02-17 00:54:19 +0100
committerKarel Zak2014-02-17 14:04:40 +0100
commitfce72f96d0911a7578e27430e11b857bb1b0aecf (patch)
tree81828140fb98adea1c8ddaf1dfc4251f4e1d9f22 /disk-utils/swaplabel.c
parenttests: align last.1 with recent phantom detection (diff)
downloadkernel-qcow2-util-linux-fce72f96d0911a7578e27430e11b857bb1b0aecf.tar.gz
kernel-qcow2-util-linux-fce72f96d0911a7578e27430e11b857bb1b0aecf.tar.xz
kernel-qcow2-util-linux-fce72f96d0911a7578e27430e11b857bb1b0aecf.zip
swaplabel: wrong version number in check
$ swaplabel /dev/sda2 swaplabel: /dev/sda2: unsupported swap version '1' The mkswap does not allow any other version, so swaplabel(8) must be wrong. Reference: https://github.com/karelzak/util-linux/blob/master/disk-utils/mkswap.c#L520 Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'disk-utils/swaplabel.c')
-rw-r--r--disk-utils/swaplabel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/disk-utils/swaplabel.c b/disk-utils/swaplabel.c
index a5ccb7ec3..5d048aabb 100644
--- a/disk-utils/swaplabel.c
+++ b/disk-utils/swaplabel.c
@@ -70,7 +70,7 @@ static blkid_probe get_swap_prober(const char *devname)
/* supported is SWAPSPACE2 only */
if (blkid_probe_lookup_value(pr, "VERSION", &version, NULL) == 0
&& version
- && strcmp(version, "2"))
+ && strcmp(version, "1"))
warnx(_("%s: unsupported swap version '%s'"),
devname, version);
else