diff options
author | Karel Zak | 2013-06-19 15:42:47 +0200 |
---|---|---|
committer | Karel Zak | 2013-09-16 16:47:02 +0200 |
commit | e8bf93ded2d055eabefd337b9eb324bde5c6efab (patch) | |
tree | 206b13f05df4286a5bc03fb7d8285550d21a5279 /libblkid/src/partitions/dos.c | |
parent | fdisk: (dos) remove inline function from header file (diff) | |
download | kernel-qcow2-util-linux-e8bf93ded2d055eabefd337b9eb324bde5c6efab.tar.gz kernel-qcow2-util-linux-e8bf93ded2d055eabefd337b9eb324bde5c6efab.tar.xz kernel-qcow2-util-linux-e8bf93ded2d055eabefd337b9eb324bde5c6efab.zip |
fdisk: add mbr_get_partition()
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libblkid/src/partitions/dos.c')
-rw-r--r-- | libblkid/src/partitions/dos.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libblkid/src/partitions/dos.c b/libblkid/src/partitions/dos.c index c92d8ec0f..14f326d20 100644 --- a/libblkid/src/partitions/dos.c +++ b/libblkid/src/partitions/dos.c @@ -60,7 +60,7 @@ static int parse_dos_extended(blkid_probe pr, blkid_parttable tab, if (!mbr_is_valid_magic(data)) goto leave; - p0 = (struct dos_partition *) (data + MBR_PT_OFFSET); + p0 = mbr_get_partition(data, 0); /* Usually, the first entry is the real data partition, * the 2nd entry is the next extended partition, or empty, @@ -159,7 +159,7 @@ static int probe_dos_pt(blkid_probe pr, goto nothing; } - p0 = (struct dos_partition *) (data + MBR_PT_OFFSET); + p0 = mbr_get_partition(data, 0); /* * Reject PT where boot indicator is not 0 or 0x80. @@ -180,8 +180,7 @@ static int probe_dos_pt(blkid_probe pr, } } - blkid_probe_use_wiper(pr, MBR_PT_OFFSET, - 512 - MBR_PT_OFFSET); + blkid_probe_use_wiper(pr, MBR_PT_OFFSET, 512 - MBR_PT_OFFSET); id = mbr_get_id(data); if (id) |