replaced 'long' with 'Sector' to prefent overflows with really large

* include/Device.h,
  include/Dialog_Base_Partition.h,
  src/Dialog_Base_Partition.cc: replaced 'long' with 'Sector' to
  prefent overflows with really large devices.
This commit is contained in:
Bart Hakvoort 2006-12-08 13:14:05 +00:00
parent 815b5f61a3
commit 8d2e7dd26d
5 changed files with 14 additions and 7 deletions

View File

@ -1,3 +1,10 @@
2006-12-08 Bart Hakvoort <hakvoort@cvs.gnome.org>
* include/Device.h,
include/Dialog_Base_Partition.h,
src/Dialog_Base_Partition.cc: replaced 'long' with 'Sector' to
prefent overflows with really large devices.
2006-12-06 Bart Hakvoort <hakvoort@cvs.gnome.org>
* configure.in: gparted-0.3.3

View File

@ -41,9 +41,9 @@ public:
void Reset() ;
std::vector<Partition> partitions ;
Sector length;
long heads ;
long sectors ;
long cylinders ;
Sector heads ;
Sector sectors ;
Sector cylinders ;
Sector cylsize ;
Glib::ustring model;
Glib::ustring disktype;

View File

@ -56,10 +56,10 @@ protected:
};
void Set_Confirm_Button( CONFIRMBUTTON button_type ) ;
void Set_MinMax_Text( long min, long max ) ;
void Set_MinMax_Text( Sector min, Sector max ) ;
double MB_PER_PIXEL ;
long TOTAL_MB ;
Sector TOTAL_MB ;
Frame_Resizer_Base *frame_resizer_base;
Partition selected_partition ;

View File

@ -171,7 +171,7 @@ void Dialog_Base_Partition::Set_Confirm_Button( CONFIRMBUTTON button_type )
}
}
void Dialog_Base_Partition::Set_MinMax_Text( long min, long max )
void Dialog_Base_Partition::Set_MinMax_Text( Sector min, Sector max )
{
str_temp = String::ucompose( _("Minimum Size: %1 MiB"), min ) + "\t\t" ;
str_temp += String::ucompose( _("Maximum Size: %1 MiB"), max ) ;