]> git.ipfire.org Git - thirdparty/util-linux.git/blob - include/swapheader.h
Merge branch 'lsfd-cmd--dir' of https://github.com/masatake/util-linux
[thirdparty/util-linux.git] / include / swapheader.h
1 /*
2 * No copyright is claimed. This code is in the public domain; do with
3 * it what you wish.
4 */
5 #ifndef _SWAPHEADER_H
6 #define _SWAPHEADER_H
7
8 #define SWAP_VERSION 1
9 #define SWAP_UUID_LENGTH 16
10 #define SWAP_LABEL_LENGTH 16
11 #define SWAP_SIGNATURE "SWAPSPACE2"
12 #define SWAP_SIGNATURE_SZ (sizeof(SWAP_SIGNATURE) - 1)
13
14 #include <stdint.h>
15
16 struct swap_header_v1_2 {
17 char bootbits[1024]; /* Space for disklabel etc. */
18 uint32_t version;
19 uint32_t last_page;
20 uint32_t nr_badpages;
21 unsigned char uuid[SWAP_UUID_LENGTH];
22 char volume_name[SWAP_LABEL_LENGTH];
23 uint32_t padding[117];
24 uint32_t badpages[1];
25 };
26
27 #endif /* _SWAPHEADER_H */