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>
|
||||
|
||||
* configure.in: Added "pl" to ALL_LINGUAS
|
||||
|
|
|
@ -195,8 +195,6 @@ void Dialog_Partition_Info::Display_Info( )
|
|||
else if ( partition .mountpoints .size() )
|
||||
str_temp = String::ucompose( _("Mounted on %1"),
|
||||
Glib::build_path( ", ", partition .mountpoints ) ) ;
|
||||
else
|
||||
str_temp = _("Unable to find mountpoint") ;
|
||||
}
|
||||
else if ( partition.type == GParted::TYPE_EXTENDED )
|
||||
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 );
|
||||
if ( iter_mp != mount_info .end() )
|
||||
partitions[ t ] .mountpoints = iter_mp ->second ;
|
||||
else
|
||||
partitions[ t ] .error = _("Unable to find mountpoint") ;
|
||||
}
|
||||
else if ( partitions[ t ] .type == GParted::TYPE_EXTENDED )
|
||||
set_mountpoints( partitions[ t ] .logicals ) ;
|
||||
|
@ -435,6 +437,8 @@ void GParted_Core::set_used_sectors( std::vector<Partition> & partitions )
|
|||
partitions[ t ] .type == GParted::TYPE_LOGICAL )
|
||||
{
|
||||
if ( partitions[ t ] .busy )
|
||||
{
|
||||
if ( partitions[ t ] .mountpoints .size() > 0 )
|
||||
{
|
||||
if ( statvfs( partitions[ t ] .mountpoints .back() .c_str(), &sfs ) == 0 )
|
||||
partitions[ t ] .Set_Unused( sfs .f_bfree * (sfs .f_bsize / 512) ) ;
|
||||
|
@ -442,6 +446,7 @@ void GParted_Core::set_used_sectors( std::vector<Partition> & partitions )
|
|||
partitions[ t ] .error =
|
||||
"statvfs (" + partitions[ t ] .mountpoints .back() + "): " + Glib::strerror( errno );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
switch( get_fs( partitions[ t ] .filesystem ) .read )
|
||||
|
|
|
@ -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.
|
||||
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(
|
||||
*this,
|
||||
String::ucompose( _("It is not possible to create more than %1 primary partitions"),
|
||||
|
|
Loading…
Reference in New Issue