Ensure sector size is set when getting a new partition

This change is in preparation for supporting sectors sizes > 512 bytes.
This commit is contained in:
Curtis Gedak 2010-05-04 15:19:49 -06:00
parent 8155d4786d
commit b45b30c2ed
1 changed files with 4 additions and 0 deletions

View File

@ -124,8 +124,12 @@ void Dialog_Base_Partition::Set_Resizer( bool extended )
Partition Dialog_Base_Partition::Get_New_Partition( Byte_Value sector_size )
{
//set sector size of new partition
selected_partition .sector_size = sector_size;
//FIXME: Partition size is limited to just less than 1024 TeraBytes due
// to the maximum value of signed 4 byte integer.
// Assuming 512 byte sector size.
if ( ORIG_BEFORE != spinbutton_before .get_value_as_int() )
selected_partition .sector_start = START + Sector(spinbutton_before .get_value_as_int()) * (MEBIBYTE / sector_size) ;