diff options
author | Sami Kerola | 2014-04-26 01:40:28 +0200 |
---|---|---|
committer | Karel Zak | 2014-05-06 10:12:14 +0200 |
commit | eb397d19e447e723ea293ecdcd4441fa8fe017f2 (patch) | |
tree | aecdf397abd932bfdfd492bc57db2c524ff54a6b /sys-utils/swapon.c | |
parent | include/swapheader.h: ensure type sizes (diff) | |
download | kernel-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.c | 3 |
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 || |