]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libblkid: rename sys_type to sys_ind
authorKarel Zak <kzak@redhat.com>
Tue, 18 Jun 2013 13:11:57 +0000 (15:11 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 16 Sep 2013 14:47:02 +0000 (16:47 +0200)
This makes struct dos_partition more compatible with the current fdisk
code.

Signed-off-by: Karel Zak <kzak@redhat.com>
include/pt-mbr.h
libblkid/src/partitions/dos.c
libblkid/src/partitions/gpt.c
libblkid/src/partitions/minix.c

index 6a6510af4085558644d50bd4614e056dbca1c904..283ec7fac87bfaa5645179f1cbcb1ed760c1c520 100644 (file)
@@ -4,7 +4,7 @@
 struct dos_partition {
        unsigned char boot_ind;         /* 0x80 - active */
        unsigned char bh, bs, bc;       /* begin CHS */
-       unsigned char sys_type;
+       unsigned char sys_ind;
        unsigned char eh, es, ec;       /* end CHS */
        unsigned char start_sect[4];
        unsigned char nr_sects[4];
index 0e0413e64bae2e01461f8fb404e4a86dacc5f41f..c45e06ebd219dd083fa8940248a9f2dd4ffedda4 100644 (file)
@@ -33,9 +33,9 @@ static const struct dos_subtypes {
 
 static inline int is_extended(struct dos_partition *p)
 {
-       return (p->sys_type == MBR_DOS_EXTENDED_PARTITION ||
-               p->sys_type == MBR_W95_EXTENDED_PARTITION ||
-               p->sys_type == MBR_LINUX_EXTENDED_PARTITION);
+       return (p->sys_ind == MBR_DOS_EXTENDED_PARTITION ||
+               p->sys_ind == MBR_W95_EXTENDED_PARTITION ||
+               p->sys_ind == MBR_LINUX_EXTENDED_PARTITION);
 }
 
 static int parse_dos_extended(blkid_probe pr, blkid_parttable tab,
@@ -100,7 +100,7 @@ static int parse_dos_extended(blkid_probe pr, blkid_parttable tab,
                        if (!par)
                                goto err;
 
-                       blkid_partition_set_type(par, p->sys_type);
+                       blkid_partition_set_type(par, p->sys_ind);
                        blkid_partition_set_flags(par, p->boot_ind);
                        blkid_partition_gen_uuid(par);
                        ct_nodata = 0;
@@ -174,7 +174,7 @@ static int probe_dos_pt(blkid_probe pr,
         * GPT uses valid MBR
         */
        for (p = p0, i = 0; i < 4; i++, p++) {
-               if (p->sys_type == MBR_GPT_PARTITION) {
+               if (p->sys_ind == MBR_GPT_PARTITION) {
                        DBG(LOWPROBE, blkid_debug("probably GPT -- ignore"));
                        goto nothing;
                }
@@ -230,7 +230,7 @@ static int probe_dos_pt(blkid_probe pr,
                if (!par)
                        goto err;
 
-               blkid_partition_set_type(par, p->sys_type);
+               blkid_partition_set_type(par, p->sys_ind);
                blkid_partition_set_flags(par, p->boot_ind);
                blkid_partition_gen_uuid(par);
        }
@@ -261,7 +261,7 @@ static int probe_dos_pt(blkid_probe pr,
                                continue;
 
                        for (n = 0; n < ARRAY_SIZE(dos_nested); n++) {
-                               if (dos_nested[n].type != p->sys_type)
+                               if (dos_nested[n].type != p->sys_ind)
                                        continue;
 
                                if (blkid_partitions_do_subprobe(pr,
index 39a41815c6560b223468a0d781e3a7ac8c850948..dc057d358b1f1b57403071ec855c7a034243e5fe 100644 (file)
@@ -175,7 +175,7 @@ static int is_pmbr_valid(blkid_probe pr)
        p = (struct dos_partition *) (data + MBR_PT_OFFSET);
 
        for (i = 0; i < 4; i++, p++) {
-               if (p->sys_type == MBR_GPT_PARTITION)
+               if (p->sys_ind == MBR_GPT_PARTITION)
                        goto ok;
        }
 failed:
index 5730f44c533ddeeadc7a70cdc0b4242ec3d5c1c7..64df4d867a292d5b8e55d28c260d806b3c0e226d 100644 (file)
@@ -56,7 +56,7 @@ static int probe_minix_pt(blkid_probe pr,
                uint32_t start, size;
                blkid_partition par;
 
-               if (p->sys_type != MBR_MINIX_PARTITION)
+               if (p->sys_ind != MBR_MINIX_PARTITION)
                        continue;
 
                start = dos_partition_start(p);
@@ -73,7 +73,7 @@ static int probe_minix_pt(blkid_probe pr,
                if (!par)
                        goto err;
 
-               blkid_partition_set_type(par, p->sys_type);
+               blkid_partition_set_type(par, p->sys_ind);
                blkid_partition_set_flags(par, p->boot_ind);
        }