On Mon, Dec 13, 2004 at 06:10:16PM +0100, Sven Luther wrote: > > This week I will send you a simple program to check if the problem > > exists. I can be used on every platform (not only sun). > > Ok, thanks. I will have a look.
It is attached: $ dd count=100k if=/dev/zero of=sundisk 102400+0 records in 102400+0 records out 52428800 bytes transferred in 1.383157 seconds (37905169 bytes/sec) $ cc -lparted -ldl suntest.c $ ./a.out sundisk Error: Can't have the end before the start! Error: Can't have the end before the start! Error: Unable to satisfy all constraints on the partition. There are no problems if another label type is used instead of "sun". Anton Zinoviev
#include <parted/parted.h> #define TYPE "sun" int main(int argc, char *argv[]) { PedDevice *dev; PedDiskType *type; PedDisk *disk; PedFileSystemType *fs_type; PedPartition *part; PedConstraint *constraint; dev = ped_device_get(argv[1]); type = ped_disk_type_get(TYPE); disk = ped_disk_new_fresh(dev, type); fs_type = ped_file_system_type_get("ext3"); part = ped_partition_new(disk, PED_PARTITION_NORMAL, fs_type, 1, 10); constraint = ped_constraint_any(dev); ped_disk_add_partition(disk, part, constraint); return 0; } /* Local variables: indent-tabs-mode: nil c-file-style: "linux" c-font-lock-extra-types: ("Ped\\sw+") End: */