summaryrefslogtreecommitdiffstats
path: root/include/pt-sun.h
diff options
context:
space:
mode:
authorKarel Zak2013-02-04 17:54:30 +0100
committerKarel Zak2013-03-11 13:00:55 +0100
commitce337318fa1febf534b226f1de4772e3fa53775c (patch)
tree3ec9691b121259df90d1a0a9035e26852eae5a1b /include/pt-sun.h
parentlibblkid: move sun PT definition to include/ (diff)
downloadkernel-qcow2-util-linux-ce337318fa1febf534b226f1de4772e3fa53775c.tar.gz
kernel-qcow2-util-linux-ce337318fa1febf534b226f1de4772e3fa53775c.tar.xz
kernel-qcow2-util-linux-ce337318fa1febf534b226f1de4772e3fa53775c.zip
inlude/pt-sun: add flags and tags
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'include/pt-sun.h')
-rw-r--r--include/pt-sun.h30
1 files changed, 23 insertions, 7 deletions
diff --git a/include/pt-sun.h b/include/pt-sun.h
index 5528dd3ee..8ced5801d 100644
--- a/include/pt-sun.h
+++ b/include/pt-sun.h
@@ -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 */
@@ -20,9 +16,9 @@ struct sun_disklabel {
char volume[8]; /* volume name */
uint16_t nparts; /* num of partitions */
- struct sun_info { /* partition information */
- uint16_t id; /* tag */
- uint16_t flags;
+ struct sun_info { /* partition information */
+ 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;