summaryrefslogtreecommitdiffstats
path: root/sys-utils/swapon.c
diff options
context:
space:
mode:
authorSami Kerola2014-04-26 01:40:28 +0200
committerKarel Zak2014-05-06 10:12:14 +0200
commiteb397d19e447e723ea293ecdcd4441fa8fe017f2 (patch)
treeaecdf397abd932bfdfd492bc57db2c524ff54a6b /sys-utils/swapon.c
parentinclude/swapheader.h: ensure type sizes (diff)
downloadkernel-qcow2-util-linux-eb397d19e447e723ea293ecdcd4441fa8fe017f2.tar.gz
kernel-qcow2-util-linux-eb397d19e447e723ea293ecdcd4441fa8fe017f2.tar.xz
kernel-qcow2-util-linux-eb397d19e447e723ea293ecdcd4441fa8fe017f2.zip
swapon: swaps with legacy version label are not supported
Reviewed-by: Benno Schulenberg <bensberg@justemail.net> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'sys-utils/swapon.c')
-rw-r--r--sys-utils/swapon.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys-utils/swapon.c b/sys-utils/swapon.c
index 6c422ce41..b88b7ec63 100644
--- a/sys-utils/swapon.c
+++ b/sys-utils/swapon.c
@@ -344,8 +344,7 @@ err:
static int swap_detect_signature(const char *buf, int *sig)
{
- if (memcmp(buf, "SWAP-SPACE", 10) == 0 ||
- memcmp(buf, "SWAPSPACE2", 10) == 0)
+ if (memcmp(buf, SWAP_SIGNATURE, SWAP_SIGNATURE_SZ) == 0)
*sig = SIG_SWAPSPACE;
else if (memcmp(buf, "S1SUSPEND", 9) == 0 ||