summaryrefslogtreecommitdiffstats
path: root/include/swapheader.h
diff options
context:
space:
mode:
authorSami Kerola2014-04-26 01:50:30 +0200
committerKarel Zak2014-05-06 10:16:54 +0200
commit24f83f7392a1e90e7db8567a675fdcd8f2e3e623 (patch)
tree9914c01c8034df03309cb2391afab643b85231ce /include/swapheader.h
parentswapon: swaps with legacy version label are not supported (diff)
downloadkernel-qcow2-util-linux-24f83f7392a1e90e7db8567a675fdcd8f2e3e623.tar.gz
kernel-qcow2-util-linux-24f83f7392a1e90e7db8567a675fdcd8f2e3e623.tar.xz
kernel-qcow2-util-linux-24f83f7392a1e90e7db8567a675fdcd8f2e3e623.zip
swapon, swapheader, mkswap: move swap signature to header
Both swapon and mkswap need to know what is valid device signature, so share the value. [kzak@redhat.com: - use SWAP_SIGNATURE_SZ properly in write_signature()] Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'include/swapheader.h')
-rw-r--r--include/swapheader.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/swapheader.h b/include/swapheader.h
index e56d93f3a..1d91e41ce 100644
--- a/include/swapheader.h
+++ b/include/swapheader.h
@@ -4,6 +4,8 @@
#define SWAP_VERSION 1
#define SWAP_UUID_LENGTH 16
#define SWAP_LABEL_LENGTH 16
+#define SWAP_SIGNATURE "SWAPSPACE2"
+#define SWAP_SIGNATURE_SZ (sizeof(SWAP_SIGNATURE) - 1)
#include <stdint.h>