]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
inlude/pt-sun: add flags and tags
authorKarel Zak <kzak@redhat.com>
Mon, 4 Feb 2013 16:54:30 +0000 (17:54 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 11 Mar 2013 12:00:55 +0000 (13:00 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
fdisks/fdisksunlabel.h
include/pt-sun.h

index 63e6c876c01c56dd3dbf8f60b578a20ce85caacb..2d638287b273d5e6e10fc21a089a9c00ef9a329a 100644 (file)
@@ -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
index 5528dd3ee2816e91ef0be18169d6b99a7f3084b6..8ced5801d7a14e2ef87350468d3eb660fca5ccd3 100644 (file)
@@ -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;