It seemed some kernels remove and re-add blockdevicepaths after the

* src/GParted_Core.cc: It seemed some kernels remove and re-add blockdevicepaths after the commit_to_os. This caused trouble at some points
  where the path was required. I decided to sleep 1 sec after each scan. So rescanning devices will take 1 extra second per device :|
* src/Win_GParted.cc: fixed typo in string.
This commit is contained in:
Bart Hakvoort 2004-11-29 15:27:33 +00:00
parent 286579d578
commit a547499904
3 changed files with 13 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2004-11-29 Bart Hakvoort <gparted@users.sf.net>
* src/GParted_Core.cc: It seemed some kernels remove and re-add blockdevicepaths after the commit_to_os. This caused trouble at some points
where the path was required. I decided to sleep 1 sec after each scan. So rescanning devices will take 1 extra second per device :|
* src/Win_GParted.cc: fixed typo in string.
2004-11-29 Bart Hakvoort <gparted@users.sf.net>
* Every devicescan now tests on beforehand if the kernel is able to reread the partitiontable. If the kernel is unable to do

View File

@ -94,7 +94,12 @@ void GParted_Core::get_devices( std::vector<Device> & devices, bool deep_scan )
{
temp_device .disktype = disk ->type ->name ;
temp_device .max_prims = ped_disk_get_max_primary_partition_count( disk ) ;
if ( deep_scan )
{
temp_device .readonly = ! ped_disk_commit_to_os( disk ) ;
sleep( 1 ) ;//this sucks, but it seems that after the commit test, the paths are removed and added again (which takes time..)
}
set_device_partitions( temp_device, deep_scan ) ;
}

View File

@ -738,7 +738,7 @@ void Win_GParted::menu_gparted_refresh_devices()
str_temp += readonly_paths ;
str_temp += "</span>\n\n" ;
str_temp += _("Because of this you will only have limited access to these decices.") ;
str_temp += _("Because of this you will only have limited access to these devices.") ;
str_temp += "\n" ;
str_temp += _("Unmount all mounted partitions on a device to get full access.") ;