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):
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;
/* -*- Mode: c; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
libparted - a library for manipulating disk partitions
- Copyright (C) 2000, 2001, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2001, 2007-2008 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
* (long long) disk->dev->hw_geom.sectors
* (long long) disk_specific->real_sector_size
/ (long long) disk->dev->sector_size - 1;
- part = ped_partition_new(disk, 0, NULL, start, end);
+ part = ped_partition_new(disk, PED_PARTITION_NORMAL, NULL,
+ start, end);
PDEBUG;
if (!part)
* (long long) disk->dev->hw_geom.sectors
* (long long) disk_specific->real_sector_size
/ (long long) disk->dev->sector_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_close_dev;
original version by Matt Domsch <Matt_Domsch@dell.com>
Disclaimed into the Public Domain
- Portions Copyright (C) 2001, 2002, 2003, 2005, 2006, 2007, 2008
- Free Software Foundation, Inc.
+ Portions Copyright (C) 2001-2003, 2005-2008 Free Software Foundation, Inc.
EFI GUID Partition Table handling
Per Intel EFI Specification v1.02
GPTPartitionData* gpt_part_data;
unsigned int i;
- part = ped_partition_new (disk, 0, NULL,
+ part = ped_partition_new (disk, PED_PARTITION_NORMAL, NULL,
PED_LE64_TO_CPU(pte->StartingLBA),
PED_LE64_TO_CPU(pte->EndingLBA));
if (!part)
if (!fs_type)
goto error_free_geom;
- part = ped_partition_new (disk, 0, fs_type, geom->start, geom->end);
+ part = ped_partition_new (disk, PED_PARTITION_NORMAL,
+ fs_type, geom->start, geom->end);
ped_geometry_destroy (geom);
if (!part)
goto error;
if (part_map_size == 0)
part_map_size = 64;
- new_part = ped_partition_new (disk, 0, NULL, 1, part_map_size - 1);
+ new_part = ped_partition_new (disk, PED_PARTITION_NORMAL, NULL,
+ 1, part_map_size - 1);
if (!new_part)
goto error;
#endif
return NULL;
}
- part = ped_partition_new (disk, 0, NULL, start, start + length - 1);
+ part = ped_partition_new (disk, PED_PARTITION_NORMAL, NULL,
+ start, start + length - 1);
if (!part)
goto error;
/*
libparted - a library for manipulating disk partitions
- Copyright (C) 2000, 2001, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2001, 2007-2008 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
part_start = legacy_start (disk, raw_part);
part_end = legacy_end (disk, raw_part);
- part = ped_partition_new (disk, 0, NULL, part_start, part_end);
+ part = ped_partition_new (disk, PED_PARTITION_NORMAL,
+ NULL, part_start, part_end);
if (!part)
goto error;
pc98_data = part->disk_specific;
libparted - a library for manipulating disk partitions
disk_amiga.c - libparted module to manipulate amiga RDB partition tables.
- Copyright (C) 2000, 2001, 2004, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2001, 2004, 2007-2008 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
+ 1) * cylblocks - 1;
/* We can now construct a new partition */
- if (!(part = ped_partition_new (disk, 0, NULL, start, end))) {
+ if (!(part = ped_partition_new (disk, PED_PARTITION_NORMAL,
+ NULL, start, end))) {
free(partition);
return 0;
}
/* -*- Mode: c; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
libparted - a library for manipulating disk partitions
- Copyright (C) 2000, 2001, 2005, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2001, 2005, 2007-2008 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
end = start
+ PED_BE32_TO_CPU(label->partitions[i].num_sectors) - 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;