don't wait for node to appear when an extended partition is created.

* src/GParted_Core.cc: don't wait for node to appear when an extended
  partition is created.
This commit is contained in:
Bart Hakvoort 2005-12-15 15:42:09 +00:00
parent 9564cf841b
commit 488063371b
2 changed files with 15 additions and 8 deletions

View File

@ -1,3 +1,8 @@
2005-12-15 Bart Hakvoort <hakvoort@cvs.gnome.org>
* src/GParted_Core.cc: don't wait for node to appear when an extended
partition is created.
2005-12-15 Bart Hakvoort <hakvoort@cvs.gnome.org>
* include/Utils.h,

View File

@ -731,9 +731,6 @@ int GParted_Core::Create_Empty_Partition( Partition & new_partition, bool copy )
{
new_partition .partition = ped_partition_get_path( c_part ) ;
new_partition .partition_number = c_part ->num ;
if ( ! wait_for_node( new_partition .partition ) )
return 0 ;
}
ped_constraint_destroy( constraint );
@ -744,11 +741,16 @@ int GParted_Core::Create_Empty_Partition( Partition & new_partition, bool copy )
close_device_and_disk( ) ;
}
//remove all filesystem signatures...
if ( new_partition .partition_number > 0 )
erase_filesystem_signatures( new_partition ) ;
return new_partition .partition_number ;
if ( new_partition .type == GParted::TYPE_EXTENDED ||
(
new_partition .partition_number > 0 &&
wait_for_node( new_partition .partition ) &&
erase_filesystem_signatures( new_partition )
)
)
return new_partition .partition_number ;
else
return 0 ;
}
bool GParted_Core::Resize_Container_Partition( const Partition & partition_old, const Partition & partition_new, bool fixed_start )