modified warning added support for shrinking and copying hfs+ filesystems

* src/GParted_Core.cc: modified warning
* src/hfsplus.cc: added support for shrinking and copying hfs+
  filesystems
This commit is contained in:
Bart Hakvoort 2006-04-05 14:26:30 +00:00
parent d61583599b
commit 655a83d4c1
3 changed files with 26 additions and 3 deletions

View File

@ -1,3 +1,9 @@
2006-04-05 Bart Hakvoort <hakvoort@cvs.gnome.org>
* src/GParted_Core.cc: modified warning
* src/hfsplus.cc: added support for shrinking and copying hfs+
filesystems
2006-04-05 Bart Hakvoort <hakvoort@cvs.gnome.org>
* src/Dialog_Partition_Resize_Move.cc,

View File

@ -358,7 +358,7 @@ GParted::FILESYSTEM GParted_Core::get_filesystem()
partition_temp .error += "\n-";
partition_temp .error += _( "The filesystem is damaged" ) ;
partition_temp .error += "\n-" ;
partition_temp .error += _( "The filesystem is unknown to libparted" ) ;
partition_temp .error += _( "The filesystem is unknown to GParted" ) ;
partition_temp .error += "\n-";
partition_temp .error += _( "There is no filesystem available (unformatted)" ) ;

View File

@ -27,7 +27,11 @@ FS hfsplus::get_filesystem_support( )
fs .filesystem = GParted::FS_HFSPLUS ;
fs .read = GParted::FS::LIBPARTED ; //provided by libparted
fs .read = GParted::FS::LIBPARTED ;
fs .shrink = GParted::FS::LIBPARTED ;
if ( ! Glib::find_program_in_path( "dd" ) .empty() )
fs .copy = GParted::FS::EXTERNAL ;
return fs ;
}
@ -52,7 +56,20 @@ bool hfsplus::Copy( const Glib::ustring & src_part_path,
const Glib::ustring & dest_part_path,
std::vector<OperationDetails> & operation_details )
{
return true ;
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 hfsplus::Check_Repair( const Partition & partition, std::vector<OperationDetails> & operation_details )