summaryrefslogtreecommitdiff
path: root/fdisks/fdiskbsdlabel.c
diff options
context:
space:
mode:
authorKarel Zak <kzak@redhat.com>2013-06-20 11:30:39 +0200
committerKarel Zak <kzak@redhat.com>2013-09-16 16:47:03 +0200
commitaf0df606a2511a1e6e65190cdfba968c98d9992c (patch)
tree25f4faf2be6c92362801972ad3a80be585596bb9 /fdisks/fdiskbsdlabel.c
parente8bf93ded2d055eabefd337b9eb324bde5c6efab (diff)
downloadutil-linux-af0df606a2511a1e6e65190cdfba968c98d9992c.tar.gz
fdisk: (dos) remove global ptes[]
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'fdisks/fdiskbsdlabel.c')
-rw-r--r--fdisks/fdiskbsdlabel.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fdisks/fdiskbsdlabel.c b/fdisks/fdiskbsdlabel.c
index 8f96a29b..a1063f08 100644
--- a/fdisks/fdiskbsdlabel.c
+++ b/fdisks/fdiskbsdlabel.c
@@ -285,7 +285,7 @@ bsd_command_prompt (struct fdisk_context *cxt)
assert(cxt->parent);
for (t=0; t<4; t++) {
- p = dos_get_pt_entry(t);
+ p = fdisk_dos_get_partition(cxt, t);
if (p && is_bsd_partition_type(p->sys_ind)) {
xbsd_part = p;
xbsd_part_index = t;
@@ -949,7 +949,7 @@ xbsd_link_part (struct fdisk_context *cxt)
int i;
struct dos_partition *p;
- if (!cxt->parent)
+ if (!cxt->parent || !fdisk_is_disklabel(cxt->parent, DOS))
return; /* not nested PT */
if (fdisk_ask_partnum(cxt->parent, &k, FALSE))
@@ -958,7 +958,7 @@ xbsd_link_part (struct fdisk_context *cxt)
if (xbsd_check_new_partition(cxt, &i))
return;
- p = dos_get_pt_entry(k);
+ p = fdisk_dos_get_partition(cxt->parent, k);
xbsd_dlabel.d_partitions[i].p_size = dos_partition_get_size(p);
xbsd_dlabel.d_partitions[i].p_offset = dos_partition_get_start(p);