summaryrefslogtreecommitdiffstats
path: root/disk-utils/swaplabel.c
diff options
context:
space:
mode:
authorSami Kerola2014-04-25 22:37:58 +0200
committerSami Kerola2014-05-04 12:42:03 +0200
commit8a101b1447ce3f5c0286c5ebea452920b38133d3 (patch)
tree16970502d42818bd3052d733568e79114297504b /disk-utils/swaplabel.c
parentinclude/c.h: add macro to print definitions as string (diff)
downloadkernel-qcow2-util-linux-8a101b1447ce3f5c0286c5ebea452920b38133d3.tar.gz
kernel-qcow2-util-linux-8a101b1447ce3f5c0286c5ebea452920b38133d3.tar.xz
kernel-qcow2-util-linux-8a101b1447ce3f5c0286c5ebea452920b38133d3.zip
mkswap, swaplabel: move version number to header
Corrently only the swap version 1 is supported, which is a magic value so move it to header. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'disk-utils/swaplabel.c')
-rw-r--r--disk-utils/swaplabel.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/disk-utils/swaplabel.c b/disk-utils/swaplabel.c
index 5d048aabb..8d5b260c5 100644
--- a/disk-utils/swaplabel.c
+++ b/disk-utils/swaplabel.c
@@ -67,10 +67,10 @@ static blkid_probe get_swap_prober(const char *devname)
warnx(_("%s: not a valid swap partition"), devname);
if (rc == 0) {
- /* supported is SWAPSPACE2 only */
+ /* Only the SWAPSPACE2 is supported. */
if (blkid_probe_lookup_value(pr, "VERSION", &version, NULL) == 0
&& version
- && strcmp(version, "1"))
+ && strcmp(version, stringify_value(SWAP_VERSION)))
warnx(_("%s: unsupported swap version '%s'"),
devname, version);
else