only allow growing of copy if there is grow support for the filesystem.
* src/Dialog_Partition_Copy.cc: only allow growing of copy if there is grow support for the filesystem. * src/reiser4.cc: added support for copying reiser4 filesystems
This commit is contained in:
parent
655a83d4c1
commit
3ff28fcc35
|
@ -1,3 +1,9 @@
|
|||
2006-04-05 Bart Hakvoort <hakvoort@cvs.gnome.org>
|
||||
|
||||
* src/Dialog_Partition_Copy.cc: only allow growing of copy if there is
|
||||
grow support for the filesystem.
|
||||
* src/reiser4.cc: added support for copying reiser4 filesystems
|
||||
|
||||
2006-04-05 Bart Hakvoort <hakvoort@cvs.gnome.org>
|
||||
|
||||
* src/GParted_Core.cc: modified warning
|
||||
|
|
|
@ -53,7 +53,11 @@ void Dialog_Partition_Copy::Set_Data( const Partition & selected_partition, cons
|
|||
Utils::round( Utils::sector_to_unit(
|
||||
copied_partition .sectors_used, GParted::UNIT_MIB ) / (TOTAL_MB/500.00) ) ) ;
|
||||
|
||||
if ( fs .grow )
|
||||
fs .MAX = ( ! fs .MAX || fs .MAX > (TOTAL_MB * MEBIBYTE) ) ? (TOTAL_MB * MEBIBYTE) : fs .MAX -= BUF ;
|
||||
else
|
||||
fs .MAX = copied_partition .get_length() ;
|
||||
|
||||
|
||||
if ( fs .filesystem == GParted::FS_XFS ) //bit hackisch, but most effective, since it's a unique situation
|
||||
fs .MIN = copied_partition .sectors_used + (BUF * 2) ;
|
||||
|
|
|
@ -35,6 +35,9 @@ FS reiser4::get_filesystem_support()
|
|||
if ( ! Glib::find_program_in_path( "fsck.reiser4" ) .empty() )
|
||||
fs .check = GParted::FS::EXTERNAL ;
|
||||
|
||||
if ( ! Glib::find_program_in_path( "dd" ) .empty() )
|
||||
fs .copy = GParted::FS::EXTERNAL ;
|
||||
|
||||
/*
|
||||
* IT SEEMS RESIZE AND COPY AREN'T IMPLEMENTED YET IN THE TOOLS...
|
||||
* SEE http://marc.theaimsgroup.com/?t=109883161600003&r=1&w=2 for more information..
|
||||
|
@ -93,7 +96,20 @@ bool reiser4::Copy( const Glib::ustring & src_part_path,
|
|||
const Glib::ustring & dest_part_path,
|
||||
std::vector<OperationDetails> & operation_details )
|
||||
{
|
||||
operation_details .push_back( OperationDetails(
|
||||
String::ucompose( _("copy contents of %1 to %2"), src_part_path, dest_part_path ) ) ) ;
|
||||
|
||||
if ( ! execute_command( "dd bs=8192 if=" + src_part_path + " of=" + dest_part_path,
|
||||
operation_details .back() .sub_details ) )
|
||||
{
|
||||
operation_details .back() .status = OperationDetails::SUCCES ;
|
||||
return true ;
|
||||
}
|
||||
else
|
||||
{
|
||||
operation_details .back() .status = OperationDetails::ERROR ;
|
||||
return false ;
|
||||
}
|
||||
}
|
||||
|
||||
bool reiser4::Check_Repair( const Partition & partition, std::vector<OperationDetails> & operation_details )
|
||||
|
|
Loading…
Reference in New Issue