[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Fri, 12 Jan 2001 15:00:00 -0600
A small gripe with 1.4.6. ped_disk_alloc() must set disk->disk_specific =
NULL, otherwise future PED_ASSERT(disk->disk_specific != NULL) tests can't
The problem then becomes that ped_disk_alloc() calls ped_partition_new() to
allocate freespace, before a callback to disk specific code has been made.
No code in disk_xxx.c can execute to allocate their own disk_specific data
prior to getting a call to xxx_partition_new(), which may well expect that
disk->disk_specific be valid...
I recommend adding a new function to disk_ops:
static PedDisk * (*disk_new)(PedDisk * disk);
If !NULL, disk_new is called in ped_disk_alloc() after allocating disk, but
before calling ped_partition_new(). That way disk specific code can
allocate disk_specific themselves, rather than waiting for the first
invocation of xxx_partition_new() which is the wrong place IMHO to allocate
- ped_disk_alloc() mis-features,