mkswap: remove legacy swap structure
If software archeolgists want to know how the old, and unused, swap
header looked they can dig it from the revision history.
[kzak@redhat.com: - use sizeof() for SWAP_HEADER_SIZE]
Reference: 4c85aa3a4c
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
parent
8a101b1447
commit
506b499991
|
@ -186,8 +186,7 @@ write_uuid_and_label(unsigned char *uuid, char *volume_name)
|
|||
struct swap_header_v1_2 *h;
|
||||
|
||||
/* Sanity check */
|
||||
if (sizeof(struct swap_header_v1) !=
|
||||
sizeof(struct swap_header_v1_2)) {
|
||||
if (sizeof(struct swap_header_v1_2) != SWAP_HEADER_SIZE) {
|
||||
warnx(_("Bad swap header size, no label written."));
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -1,16 +1,6 @@
|
|||
#ifndef _SWAPHEADER_H
|
||||
#define _SWAPHEADER_H
|
||||
|
||||
struct swap_header_v1 {
|
||||
char bootbits[1024]; /* Space for disklabel etc. */
|
||||
unsigned int version;
|
||||
unsigned int last_page;
|
||||
unsigned int nr_badpages;
|
||||
unsigned int padding[125];
|
||||
unsigned int badpages[1];
|
||||
};
|
||||
|
||||
|
||||
#define SWAP_VERSION 1
|
||||
#define SWAP_UUID_LENGTH 16
|
||||
#define SWAP_LABEL_LENGTH 16
|
||||
|
@ -26,4 +16,6 @@ struct swap_header_v1_2 {
|
|||
unsigned int badpages[1];
|
||||
};
|
||||
|
||||
#define SWAP_HEADER_SIZE (sizeof(struct swap_header_v1_2))
|
||||
|
||||
#endif /* _SWAPHEADER_H */
|
||||
|
|
Loading…
Reference in New Issue