bigbiff bigbiff | e60683a | 2013-02-22 20:55:50 -0500 | [diff] [blame] | 1 | #ifndef _SWAPHEADER_H |
| 2 | #define _SWAPHEADER_H |
| 3 | |
| 4 | struct swap_header_v1 { |
| 5 | char bootbits[1024]; /* Space for disklabel etc. */ |
| 6 | unsigned int version; |
| 7 | unsigned int last_page; |
| 8 | unsigned int nr_badpages; |
| 9 | unsigned int padding[125]; |
| 10 | unsigned int badpages[1]; |
| 11 | }; |
| 12 | |
| 13 | |
| 14 | #define SWAP_UUID_LENGTH 16 |
| 15 | #define SWAP_LABEL_LENGTH 16 |
| 16 | |
| 17 | struct swap_header_v1_2 { |
| 18 | char bootbits[1024]; /* Space for disklabel etc. */ |
| 19 | unsigned int version; |
| 20 | unsigned int last_page; |
| 21 | unsigned int nr_badpages; |
| 22 | unsigned char uuid[SWAP_UUID_LENGTH]; |
| 23 | char volume_name[SWAP_LABEL_LENGTH]; |
| 24 | unsigned int padding[117]; |
| 25 | unsigned int badpages[1]; |
| 26 | }; |
| 27 | |
| 28 | #endif /* _SWAPHEADER_H */ |