creating a new partition on a BSD partitiontable failed, causing a

* src/GParted_Core.cc: creating a new partition on a BSD partitiontable
  failed, causing a segfault when setting the partitiontype. fixed.
This commit is contained in:
Bart Hakvoort 2006-04-15 12:28:42 +00:00
parent 4e1ed8d9d0
commit 2c3ce61275
2 changed files with 11 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2006-04-15 Bart Hakvoort <hakvoort@cvs.gnome.org>
* src/GParted_Core.cc: creating a new partition on a BSD partitiontable
failed, causing a segfault when setting the partitiontype. fixed.
2006-04-05 Bart Hakvoort <hakvoort@cvs.gnome.org>
* src/Dialog_Partition_Copy.cc: only allow growing of copy if there is

View File

@ -972,6 +972,7 @@ bool GParted_Core::create_empty_partition( Partition & new_partition,
PedPartitionType type;
lp_partition = NULL ;
PedConstraint *constraint = NULL ;
PedFileSystemType* fs_type = NULL ;
//create new partition
switch ( new_partition .type )
@ -989,10 +990,13 @@ bool GParted_Core::create_empty_partition( Partition & new_partition,
default :
type = PED_PARTITION_FREESPACE;
}
if ( new_partition .type != GParted::TYPE_EXTENDED )
fs_type = ped_file_system_type_get( "ext2" ) ;
lp_partition = ped_partition_new( lp_disk,
type,
NULL,
fs_type,
new_partition .sector_start,
new_partition .sector_end ) ;