]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libblkid: rename in sun_disklabel for compatibility with fdisk
authorKarel Zak <kzak@redhat.com>
Mon, 4 Feb 2013 17:29:05 +0000 (18:29 +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>
include/pt-sun.h
libblkid/src/partitions/sun.c

index 8ced5801d7a14e2ef87350468d3eb660fca5ccd3..b085268ca020f05858c02e6c3509ae6c4bd97394 100644 (file)
@@ -3,17 +3,19 @@
 
 #include <stdint.h>
 
+#define SUN_LABEL_MAGIC                0xDABE
+
 /* Supported VTOC setting */
 #define SUN_VTOC_SANITY                0x600DDEEE      /* magic number */
 #define SUN_VTOC_VERSION       1
 #define SUN_MAXPARTITIONS      8
 
 struct sun_disklabel {
-       unsigned char info[128];   /* Informative text string */
+       unsigned char label_id[128];   /* Informative text string */
 
        struct sun_vtoc {
                uint32_t version;     /* version */
-               char     volume[8];   /* volume name */
+               char     volume_id[8];/* volume name */
                uint16_t nparts;      /* num of partitions */
 
                struct sun_info {        /* partition information */
@@ -31,15 +33,15 @@ struct sun_disklabel {
        uint32_t write_reinstruct;     /* sectors to skip, writes */
        uint32_t read_reinstruct;      /* sectors to skip, reads */
        unsigned char spare[148];      /* padding */
-       uint16_t rspeed;               /* disk rotational speed */
-       uint16_t pcylcount;            /* physical cylinder count */
-       uint16_t sparecyl;             /* extra sects per cylinder */
+       uint16_t rpm;                  /* disk rotational speed */
+       uint16_t pcyl;                 /* physical cylinder count */
+       uint16_t apc;                  /* extra sects per cylinder */
        uint16_t obs1;
        uint16_t obs2;
-       uint16_t ilfact;               /* interleave factor */
+       uint16_t intrlv;               /* interleave factor */
        uint16_t ncyl;                 /* data cylinder count */
-       uint16_t nacyl;                /* alt. cylinder count */
-       uint16_t ntrks;                /* tracks per cylinder   <---- */
+       uint16_t acyl;                 /* alt. cylinder count */
+       uint16_t nhead;                /* tracks per cylinder   <---- */
        uint16_t nsect;                /* sectors per track     <---- */
        uint16_t obs3;
        uint16_t obs4;
index f1b839258a9df173156f8ba70d3e70317182c381..c2c700d960cdfa0672709a92decfcf3b645a6e5b 100644 (file)
@@ -49,7 +49,7 @@ static int probe_sun_pt(blkid_probe pr,
                goto err;
 
        /* sectors per cylinder (partition offset is in cylinders...) */
-       spc = be16_to_cpu(l->ntrks) * be16_to_cpu(l->nsect);
+       spc = be16_to_cpu(l->nhead) * be16_to_cpu(l->nsect);
 
        DBG(DEBUG_LOWPROBE,
                printf("Sun VTOC sanity=%u version=%u nparts=%u\n",