diff --git a/src/ext2.cc b/src/ext2.cc index 9b54010f..2b3bdd45 100644 --- a/src/ext2.cc +++ b/src/ext2.cc @@ -186,8 +186,8 @@ bool ext2::resize( const Partition & partition_new, OperationDetail & operationd if ( ! fill_partition ) str_temp += " " + Utils::num_to_str( Utils::round( Utils::sector_to_unit( - partition_new .get_sector_length(), partition_new .sector_size, UNIT_KIB ) ) -1 ) + "K" ; - + partition_new .get_sector_length(), partition_new .sector_size, UNIT_KIB ) ) ) + "K" ; + return ! execute_command( str_temp, operationdetail ) ; } diff --git a/src/ntfs.cc b/src/ntfs.cc index 3a160af5..d7ca9546 100644 --- a/src/ntfs.cc +++ b/src/ntfs.cc @@ -199,7 +199,7 @@ bool ntfs::resize( const Partition & partition_new, OperationDetail & operationd { str_temp += " -s " ; str_temp += Utils::num_to_str( Utils::round( Utils::sector_to_unit( - partition_new .get_sector_length(), partition_new .sector_size, UNIT_BYTE ) ) -1 ) ; + partition_new .get_sector_length(), partition_new .sector_size, UNIT_BYTE ) ) ) ; } //simulation.. diff --git a/src/reiserfs.cc b/src/reiserfs.cc index 50a35baa..0c4eb27a 100644 --- a/src/reiserfs.cc +++ b/src/reiserfs.cc @@ -160,7 +160,7 @@ bool reiserfs::resize( const Partition & partition_new, OperationDetail & operat if ( ! fill_partition ) { size = " -s " + Utils::num_to_str( Utils::round( Utils::sector_to_unit( - partition_new .get_sector_length(), partition_new .sector_size, UNIT_BYTE ) ) -1 ) ; + partition_new .get_sector_length(), partition_new .sector_size, UNIT_BYTE ) ) ) ; } Glib::ustring cmd = "sh -c 'echo y | resize_reiserfs" + size + " " + partition_new .get_path() + "'" ;