diff --git a/src/ext2.cc b/src/ext2.cc index 34f50ec7..c77d49ac 100644 --- a/src/ext2.cc +++ b/src/ext2.cc @@ -189,8 +189,8 @@ bool ext2::resize( const Partition & partition_new, OperationDetail & operationd Glib::ustring str_temp = "resize2fs -p " + partition_new .get_path() ; 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 ) ) ) + "K" ; + str_temp += " " + Utils::num_to_str( floor( Utils::sector_to_unit( + 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 6ac19cb3..61da5012 100644 --- a/src/ntfs.cc +++ b/src/ntfs.cc @@ -203,7 +203,7 @@ bool ntfs::resize( const Partition & partition_new, OperationDetail & operationd Glib::ustring size = "" ; if ( ! fill_partition ) { - size = " -s " + Utils::num_to_str( Utils::round( Utils::sector_to_unit( + size = " -s " + Utils::num_to_str( floor( Utils::sector_to_unit( partition_new .get_sector_length(), partition_new .sector_size, UNIT_BYTE ) ) ) ; } Glib::ustring cmd = "ntfsresize --force --force" + size ; diff --git a/src/reiserfs.cc b/src/reiserfs.cc index 2c44471d..fc89a08b 100644 --- a/src/reiserfs.cc +++ b/src/reiserfs.cc @@ -165,7 +165,7 @@ bool reiserfs::resize( const Partition & partition_new, OperationDetail & operat Glib::ustring size = "" ; if ( ! fill_partition ) { - size = " -s " + Utils::num_to_str( Utils::round( Utils::sector_to_unit( + size = " -s " + Utils::num_to_str( floor( Utils::sector_to_unit( 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() + "'" ;