inlude/pt-sun: add flags and tags
Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
parent
a08dc0ca89
commit
ce337318fa
2 changed files with 23 additions and 8 deletions
|
@ -32,7 +32,6 @@ struct sun_tag_flag {
|
|||
#define SUN_FLAG_RONLY 0x10 /* Read only */
|
||||
};
|
||||
|
||||
#define SUN_LABEL_SIZE 512
|
||||
|
||||
#define SUN_LABEL_ID_SIZE 128
|
||||
#define SUN_VOLUME_ID_SIZE 8
|
||||
|
|
|
@ -6,12 +6,8 @@
|
|||
/* Supported VTOC setting */
|
||||
#define SUN_VTOC_SANITY 0x600DDEEE /* magic number */
|
||||
#define SUN_VTOC_VERSION 1
|
||||
|
||||
#define SUN_MAXPARTITIONS 8
|
||||
|
||||
/* Partition IDs */
|
||||
#define SUN_TAG_WHOLEDISK 0x05
|
||||
|
||||
struct sun_disklabel {
|
||||
unsigned char info[128]; /* Informative text string */
|
||||
|
||||
|
@ -21,8 +17,8 @@ struct sun_disklabel {
|
|||
uint16_t nparts; /* num of partitions */
|
||||
|
||||
struct sun_info { /* partition information */
|
||||
uint16_t id; /* tag */
|
||||
uint16_t flags;
|
||||
uint16_t id; /* SUN_TAG_* */
|
||||
uint16_t flags; /* SUN_FLAG_* */
|
||||
} __attribute__ ((packed)) infos[8];
|
||||
|
||||
uint16_t padding; /* padding */
|
||||
|
@ -58,6 +54,26 @@ struct sun_disklabel {
|
|||
} __attribute__ ((packed));
|
||||
|
||||
|
||||
#define SUN_TAG_UNASSIGNED 0x00 /* Unassigned partition */
|
||||
#define SUN_TAG_BOOT 0x01 /* Boot partition */
|
||||
#define SUN_TAG_ROOT 0x02 /* Root filesystem */
|
||||
#define SUN_TAG_SWAP 0x03 /* Swap partition */
|
||||
#define SUN_TAG_USR 0x04 /* /usr filesystem */
|
||||
#define SUN_TAG_WHOLEDISK 0x05 /* Full-disk slice */
|
||||
#define SUN_TAG_STAND 0x06 /* Stand partition */
|
||||
#define SUN_TAG_VAR 0x07 /* /var filesystem */
|
||||
#define SUN_TAG_HOME 0x08 /* /home filesystem */
|
||||
#define SUN_TAG_ALTSCTR 0x09 /* Alt sector partition */
|
||||
#define SUN_TAG_CACHE 0x0a /* Cachefs partition */
|
||||
#define SUN_TAG_RESERVED 0x0b /* SMI reserved data */
|
||||
#define SUN_TAG_LINUX_SWAP 0x82 /* Linux SWAP */
|
||||
#define SUN_TAG_LINUX_NATIVE 0x83 /* Linux filesystem */
|
||||
#define SUN_TAG_LINUX_LVM 0x8e /* Linux LVM */
|
||||
#define SUN_TAG_LINUX_RAID 0xfd /* LInux RAID */
|
||||
|
||||
#define SUN_FLAG_UNMNT 0x01 /* Unmountable partition*/
|
||||
#define SUN_FLAG_RONLY 0x10 /* Read only */
|
||||
|
||||
static inline uint16_t sun_pt_checksum(struct sun_disklabel *label)
|
||||
{
|
||||
uint16_t *ptr = ((uint16_t *) (label + 1)) - 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue