2023-01-12 15:33:09 +01:00
|
|
|
/*
|
|
|
|
* No copyright is claimed. This code is in the public domain; do with
|
|
|
|
* it what you wish.
|
|
|
|
*/
|
2008-11-27 12:32:55 +01:00
|
|
|
#ifndef _SWAPHEADER_H
|
|
|
|
#define _SWAPHEADER_H
|
|
|
|
|
2014-04-25 21:37:58 +01:00
|
|
|
#define SWAP_VERSION 1
|
2010-04-02 15:52:45 +02:00
|
|
|
#define SWAP_UUID_LENGTH 16
|
|
|
|
#define SWAP_LABEL_LENGTH 16
|
2014-04-26 00:50:30 +01:00
|
|
|
#define SWAP_SIGNATURE "SWAPSPACE2"
|
|
|
|
#define SWAP_SIGNATURE_SZ (sizeof(SWAP_SIGNATURE) - 1)
|
2010-04-02 15:52:45 +02:00
|
|
|
|
2014-04-25 22:08:23 +01:00
|
|
|
#include <stdint.h>
|
|
|
|
|
2006-12-07 00:26:31 +01:00
|
|
|
struct swap_header_v1_2 {
|
|
|
|
char bootbits[1024]; /* Space for disklabel etc. */
|
2014-04-25 22:08:23 +01:00
|
|
|
uint32_t version;
|
|
|
|
uint32_t last_page;
|
|
|
|
uint32_t nr_badpages;
|
2010-04-02 15:52:45 +02:00
|
|
|
unsigned char uuid[SWAP_UUID_LENGTH];
|
|
|
|
char volume_name[SWAP_LABEL_LENGTH];
|
2014-04-25 22:08:23 +01:00
|
|
|
uint32_t padding[117];
|
|
|
|
uint32_t badpages[1];
|
2006-12-07 00:26:31 +01:00
|
|
|
};
|
2008-11-27 12:32:55 +01:00
|
|
|
|
|
|
|
#endif /* _SWAPHEADER_H */
|