summaryrefslogtreecommitdiff
path: root/libparted/labels/bsd.c
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2008-07-26 21:22:10 +0200
committerJim Meyering <meyering@redhat.com>2008-07-27 11:57:22 +0200
commite1e7be655deded3e2d94d8c737249b6c414e303a (patch)
tree4bc9ff11751ba987ab8a5ebd63019780085f0965 /libparted/labels/bsd.c
parent4b577b8c87ae91fc6686954f768772df93d3d360 (diff)
downloadparted-e1e7be655deded3e2d94d8c737249b6c414e303a.tar.gz
don't call ped_partition_new with "0" as 2nd arg
Instead, use an explicit and equivalent PED_PARTITION_NORMAL. * libparted/labels/bsd.c (bsd_read): * libparted/labels/dasd.c (dasd_read): * libparted/labels/gpt.c (_parse_part_entry): * libparted/labels/loop.c (loop_read): * libparted/labels/mac.c (_disk_add_part_map_entry) (_rawpart_analyse): * libparted/labels/pc98.c (read_table): * libparted/labels/rdb.c (amiga_read): * libparted/labels/sun.c (sun_read):
Diffstat (limited to 'libparted/labels/bsd.c')
-rw-r--r--libparted/labels/bsd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libparted/labels/bsd.c b/libparted/labels/bsd.c
index e99a06c..3eb5363 100644
--- a/libparted/labels/bsd.c
+++ b/libparted/labels/bsd.c
@@ -293,7 +293,8 @@ bsd_read (PedDisk* disk)
start = PED_LE32_TO_CPU(label->d_partitions[i - 1].p_offset);
end = PED_LE32_TO_CPU(label->d_partitions[i - 1].p_offset)
+ PED_LE32_TO_CPU(label->d_partitions[i - 1].p_size) - 1;
- part = ped_partition_new (disk, 0, NULL, start, end);
+ part = ped_partition_new (disk, PED_PARTITION_NORMAL,
+ NULL, start, end);
if (!part)
goto error;
bsd_part_data = part->disk_specific;