2008-11-27 05:32:55 -06:00
|
|
|
#ifndef _SWAPHEADER_H
|
|
|
|
#define _SWAPHEADER_H
|
|
|
|
|
2014-04-25 15:37:58 -05:00
|
|
|
#define SWAP_VERSION 1
|
2010-04-02 08:52:45 -05:00
|
|
|
#define SWAP_UUID_LENGTH 16
|
|
|
|
#define SWAP_LABEL_LENGTH 16
|
2014-04-25 18:50:30 -05:00
|
|
|
#define SWAP_SIGNATURE "SWAPSPACE2"
|
|
|
|
#define SWAP_SIGNATURE_SZ (sizeof(SWAP_SIGNATURE) - 1)
|
2010-04-02 08:52:45 -05:00
|
|
|
|
2014-04-25 16:08:23 -05:00
|
|
|
#include <stdint.h>
|
|
|
|
|
2006-12-06 17:26:31 -06:00
|
|
|
struct swap_header_v1_2 {
|
|
|
|
char bootbits[1024]; /* Space for disklabel etc. */
|
2014-04-25 16:08:23 -05:00
|
|
|
uint32_t version;
|
|
|
|
uint32_t last_page;
|
|
|
|
uint32_t nr_badpages;
|
2010-04-02 08:52:45 -05:00
|
|
|
unsigned char uuid[SWAP_UUID_LENGTH];
|
|
|
|
char volume_name[SWAP_LABEL_LENGTH];
|
2014-04-25 16:08:23 -05:00
|
|
|
uint32_t padding[117];
|
|
|
|
uint32_t badpages[1];
|
2006-12-06 17:26:31 -06:00
|
|
|
};
|
2008-11-27 05:32:55 -06:00
|
|
|
|
|
|
|
#endif /* _SWAPHEADER_H */
|