enabled move support for all the filesystems. Also made some small changes

* enabled move support for all the filesystems. Also made some small
  changes to the logic which determines if copy is allowed.
This commit is contained in:
Bart Hakvoort 2006-07-19 20:12:46 +00:00
parent a11ddd7496
commit 9e32399727
12 changed files with 46 additions and 12 deletions

View File

@ -1,3 +1,8 @@
2006-07-19 Bart Hakvoort <hakvoort@cvs.gnome.org>
* enabled move support for all the filesystems. Also made some small
changes to the logic which determines if copy is allowed.
2006-07-19 Bart Hakvoort <hakvoort@cvs.gnome.org> 2006-07-19 Bart Hakvoort <hakvoort@cvs.gnome.org>
* src/GParted_Core.cc: added some progressfeedback * src/GParted_Core.cc: added some progressfeedback

View File

@ -1595,7 +1595,7 @@ bool GParted_Core::resize_filesystem( const Partition & partition_old,
//FIXME: perform checks in maximize_filesystem(), resize_filesystem() and check_repair() to see if //FIXME: perform checks in maximize_filesystem(), resize_filesystem() and check_repair() to see if
//the specified action is supported. if not, return true, but set status of operation to NOT_AVAILABLE //the specified action is supported. if not, return true, but set status of operation to NOT_AVAILABLE
//(or maybe we should simply skip the entire suboperation?) //(or maybe we should simply skip the entire suboperation?) maybe only maximize and check_repair are relevant..
bool GParted_Core::maximize_filesystem( const Partition & partition, bool GParted_Core::maximize_filesystem( const Partition & partition,
std::vector<OperationDetails> & operation_details ) std::vector<OperationDetails> & operation_details )
{ {

View File

@ -37,17 +37,16 @@ FS ext2::get_filesystem_support()
if ( ! Glib::find_program_in_path( "resize2fs" ) .empty() && fs .check ) if ( ! Glib::find_program_in_path( "resize2fs" ) .empty() && fs .check )
{ {
fs .grow = GParted::FS::EXTERNAL ; fs .grow = GParted::FS::EXTERNAL ;
fs .copy = GParted::FS::GPARTED ;
if ( fs .read ) //needed to determine a min filesystemsize.. if ( fs .read ) //needed to determine a min filesystemsize..
fs .shrink = GParted::FS::EXTERNAL ; fs .shrink = GParted::FS::EXTERNAL ;
} }
//FIXME: think about what is needed for moving (actually not much, maybe even nothing.) if ( fs .check )
//from now on moving is defined as moving a complete filesystem, withour modifying the size. {
//see of this definition has any effects on already existing code. fs .copy = GParted::FS::GPARTED ;
fs .move = GParted::FS::GPARTED ; fs .move = GParted::FS::GPARTED ;
}
return fs ; return fs ;
} }

View File

@ -38,11 +38,16 @@ FS ext3::get_filesystem_support()
if ( ! Glib::find_program_in_path( "resize2fs" ) .empty() && fs .check ) if ( ! Glib::find_program_in_path( "resize2fs" ) .empty() && fs .check )
{ {
fs .grow = GParted::FS::EXTERNAL ; fs .grow = GParted::FS::EXTERNAL ;
fs .copy = GParted::FS::GPARTED ;
if ( fs .read ) //needed to determine a min filesystemsize.. if ( fs .read ) //needed to determine a min filesystemsize..
fs .shrink = GParted::FS::EXTERNAL ; fs .shrink = GParted::FS::EXTERNAL ;
} }
if ( fs .check )
{
fs .copy = GParted::FS::GPARTED ;
fs .move = GParted::FS::GPARTED ;
}
return fs ; return fs ;
} }

View File

@ -34,6 +34,7 @@ FS hfs::get_filesystem_support()
fs .create = GParted::FS::EXTERNAL ; fs .create = GParted::FS::EXTERNAL ;
fs .copy = GParted::FS::GPARTED ; fs .copy = GParted::FS::GPARTED ;
fs .move = GParted::FS::GPARTED ;
fs .MAX = 2048 * MEBIBYTE ; fs .MAX = 2048 * MEBIBYTE ;

View File

@ -31,6 +31,7 @@ FS hfsplus::get_filesystem_support( )
fs .shrink = GParted::FS::LIBPARTED ; fs .shrink = GParted::FS::LIBPARTED ;
fs .copy = GParted::FS::GPARTED ; fs .copy = GParted::FS::GPARTED ;
fs .move = GParted::FS::GPARTED ;
return fs ; return fs ;
} }

View File

@ -58,8 +58,12 @@ FS jfs::get_filesystem_support()
} }
} }
if ( fs .grow )
if ( fs .check )
{
fs .move = GParted::FS::GPARTED ;
fs .copy = GParted::FS::GPARTED ; fs .copy = GParted::FS::GPARTED ;
}
fs .MIN = 16 * MEBIBYTE ; fs .MIN = 16 * MEBIBYTE ;

View File

@ -45,8 +45,11 @@ FS ntfs::get_filesystem_support()
} }
//we need ntfsresize to set correct used/unused after cloning //we need ntfsresize to set correct used/unused after cloning
if ( ! Glib::find_program_in_path( "ntfsclone" ) .empty() && fs .grow ) if ( ! Glib::find_program_in_path( "ntfsclone" ) .empty() )
fs .copy = GParted::FS::EXTERNAL ; fs .copy = GParted::FS::EXTERNAL ;
if ( fs .check )
fs .move = GParted::FS::GPARTED ;
return fs ; return fs ;
} }

View File

@ -35,7 +35,12 @@ FS reiser4::get_filesystem_support()
if ( ! Glib::find_program_in_path( "fsck.reiser4" ) .empty() ) if ( ! Glib::find_program_in_path( "fsck.reiser4" ) .empty() )
fs .check = GParted::FS::EXTERNAL ; fs .check = GParted::FS::EXTERNAL ;
fs .copy = GParted::FS::GPARTED ;
if ( fs .check )
{
fs .copy = GParted::FS::GPARTED ;
fs .move = GParted::FS::GPARTED ;
}
/* /*
* IT SEEMS RESIZE AND COPY AREN'T IMPLEMENTED YET IN THE TOOLS... * IT SEEMS RESIZE AND COPY AREN'T IMPLEMENTED YET IN THE TOOLS...

View File

@ -39,12 +39,17 @@ FS reiserfs::get_filesystem_support()
if ( ! Glib::find_program_in_path( "resize_reiserfs" ) .empty() && fs .check ) if ( ! Glib::find_program_in_path( "resize_reiserfs" ) .empty() && fs .check )
{ {
fs .grow = GParted::FS::EXTERNAL ; fs .grow = GParted::FS::EXTERNAL ;
fs .copy = GParted::FS::GPARTED ;
if ( fs .read ) //needed to determine a min filesystemsize.. if ( fs .read ) //needed to determine a min filesystemsize..
fs .shrink = GParted::FS::EXTERNAL ; fs .shrink = GParted::FS::EXTERNAL ;
} }
if ( fs .check )
{
fs .copy = GParted::FS::GPARTED ;
fs .move = GParted::FS::GPARTED ;
}
fs .MIN = 32 * MEBIBYTE ; fs .MIN = 32 * MEBIBYTE ;
return fs ; return fs ;

View File

@ -27,6 +27,9 @@ FS ufs::get_filesystem_support()
fs .filesystem = GParted::FS_UFS ; fs .filesystem = GParted::FS_UFS ;
fs .copy = GParted::FS::GPARTED ;
fs .move = GParted::FS::GPARTED ;
return fs ; return fs ;
} }

View File

@ -62,6 +62,9 @@ FS xfs::get_filesystem_support()
fs .check && fs .create ) fs .check && fs .create )
fs .copy = GParted::FS::EXTERNAL ; fs .copy = GParted::FS::EXTERNAL ;
if ( fs .check )
fs .move = GParted::FS::GPARTED ;
fs .MIN = 32 * MEBIBYTE ;//official minsize = 16MB, but the smallest xfs_repair can handle is 32MB... fs .MIN = 32 * MEBIBYTE ;//official minsize = 16MB, but the smallest xfs_repair can handle is 32MB...
return fs ; return fs ;