fixed crasher with busy partition without mountpoint (#332983) added FIXME
* src/Dialog_Partition_Info.cc, src/GParted_Core.cc: fixed crasher with busy partition without mountpoint (#332983) * src/Win_GParted.cc: added FIXME
This commit is contained in:
parent
e69118d0b3
commit
58eff60c68
|
@ -1,3 +1,10 @@
|
||||||
|
2006-03-05 Bart Hakvoort <hakvoort@cvs.gnome.org>
|
||||||
|
|
||||||
|
* src/Dialog_Partition_Info.cc,
|
||||||
|
src/GParted_Core.cc: fixed crasher with busy partition without
|
||||||
|
mountpoint (#332983)
|
||||||
|
* src/Win_GParted.cc: added FIXME
|
||||||
|
|
||||||
2006-03-05 Artur Flinta <aflinta@cvs.gnome.org>
|
2006-03-05 Artur Flinta <aflinta@cvs.gnome.org>
|
||||||
|
|
||||||
* configure.in: Added "pl" to ALL_LINGUAS
|
* configure.in: Added "pl" to ALL_LINGUAS
|
||||||
|
|
|
@ -195,8 +195,6 @@ void Dialog_Partition_Info::Display_Info( )
|
||||||
else if ( partition .mountpoints .size() )
|
else if ( partition .mountpoints .size() )
|
||||||
str_temp = String::ucompose( _("Mounted on %1"),
|
str_temp = String::ucompose( _("Mounted on %1"),
|
||||||
Glib::build_path( ", ", partition .mountpoints ) ) ;
|
Glib::build_path( ", ", partition .mountpoints ) ) ;
|
||||||
else
|
|
||||||
str_temp = _("Unable to find mountpoint") ;
|
|
||||||
}
|
}
|
||||||
else if ( partition.type == GParted::TYPE_EXTENDED )
|
else if ( partition.type == GParted::TYPE_EXTENDED )
|
||||||
str_temp = _("Not busy (There are no mounted logical partitions)" ) ;
|
str_temp = _("Not busy (There are no mounted logical partitions)" ) ;
|
||||||
|
|
|
@ -389,6 +389,8 @@ void GParted_Core::set_mountpoints( std::vector<Partition> & partitions )
|
||||||
iter_mp = mount_info .find( partitions[ t ] .partition );
|
iter_mp = mount_info .find( partitions[ t ] .partition );
|
||||||
if ( iter_mp != mount_info .end() )
|
if ( iter_mp != mount_info .end() )
|
||||||
partitions[ t ] .mountpoints = iter_mp ->second ;
|
partitions[ t ] .mountpoints = iter_mp ->second ;
|
||||||
|
else
|
||||||
|
partitions[ t ] .error = _("Unable to find mountpoint") ;
|
||||||
}
|
}
|
||||||
else if ( partitions[ t ] .type == GParted::TYPE_EXTENDED )
|
else if ( partitions[ t ] .type == GParted::TYPE_EXTENDED )
|
||||||
set_mountpoints( partitions[ t ] .logicals ) ;
|
set_mountpoints( partitions[ t ] .logicals ) ;
|
||||||
|
@ -436,11 +438,14 @@ void GParted_Core::set_used_sectors( std::vector<Partition> & partitions )
|
||||||
{
|
{
|
||||||
if ( partitions[ t ] .busy )
|
if ( partitions[ t ] .busy )
|
||||||
{
|
{
|
||||||
if ( statvfs( partitions[ t ] .mountpoints .back() .c_str(), &sfs ) == 0 )
|
if ( partitions[ t ] .mountpoints .size() > 0 )
|
||||||
partitions[ t ] .Set_Unused( sfs .f_bfree * (sfs .f_bsize / 512) ) ;
|
{
|
||||||
else
|
if ( statvfs( partitions[ t ] .mountpoints .back() .c_str(), &sfs ) == 0 )
|
||||||
partitions[ t ] .error =
|
partitions[ t ] .Set_Unused( sfs .f_bfree * (sfs .f_bsize / 512) ) ;
|
||||||
"statvfs (" + partitions[ t ] .mountpoints .back() + "): " + Glib::strerror( errno );
|
else
|
||||||
|
partitions[ t ] .error =
|
||||||
|
"statvfs (" + partitions[ t ] .mountpoints .back() + "): " + Glib::strerror( errno );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -1069,7 +1069,8 @@ bool Win_GParted::max_amount_prim_reached()
|
||||||
{
|
{
|
||||||
//Display error if user tries to create more primary partitions than the partition table can hold.
|
//Display error if user tries to create more primary partitions than the partition table can hold.
|
||||||
if ( ! selected_partition .inside_extended && primary_count >= devices[ current_device ] .max_prims )
|
if ( ! selected_partition .inside_extended && primary_count >= devices[ current_device ] .max_prims )
|
||||||
{
|
{//FIXME..maybe we should mention the fact the user needs to remove an primary before
|
||||||
|
//he can add an extended..
|
||||||
Gtk::MessageDialog dialog(
|
Gtk::MessageDialog dialog(
|
||||||
*this,
|
*this,
|
||||||
String::ucompose( _("It is not possible to create more than %1 primary partitions"),
|
String::ucompose( _("It is not possible to create more than %1 primary partitions"),
|
||||||
|
|
Loading…
Reference in New Issue