summaryrefslogtreecommitdiffstats
path: root/include/swapheader.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/swapheader.h')
-rw-r--r--include/swapheader.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/swapheader.h b/include/swapheader.h
index 6ff5390f5..42d521a49 100644
--- a/include/swapheader.h
+++ b/include/swapheader.h
@@ -10,13 +10,17 @@ struct swap_header_v1 {
unsigned int badpages[1];
};
+
+#define SWAP_UUID_LENGTH 16
+#define SWAP_LABEL_LENGTH 16
+
struct swap_header_v1_2 {
char bootbits[1024]; /* Space for disklabel etc. */
unsigned int version;
unsigned int last_page;
unsigned int nr_badpages;
- unsigned char uuid[16];
- char volume_name[16];
+ unsigned char uuid[SWAP_UUID_LENGTH];
+ char volume_name[SWAP_LABEL_LENGTH];
unsigned int padding[117];
unsigned int badpages[1];
};