[gparted] Ensure sector size is set when getting a new partition



commit b45b30c2eda35404f5f554b80afc88bad7f191f8
Author: Curtis Gedak <gedakc gmail com>
Date:   Tue May 4 15:19:49 2010 -0600

    Ensure sector size is set when getting a new partition
    
    This change is in preparation for supporting sectors sizes > 512 bytes.

 src/Dialog_Base_Partition.cc |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/Dialog_Base_Partition.cc b/src/Dialog_Base_Partition.cc
index 2bbd47c..8ff2b8e 100644
--- a/src/Dialog_Base_Partition.cc
+++ b/src/Dialog_Base_Partition.cc
@@ -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) ;	
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]