Cleanup duplicate fs code

Many filesystems do not implement some of their methods, but had to provide
dummy implementations.  Remove all of the dummy implementations and instead
just provide one in the base FileSystem class.
This commit is contained in:
Phillip Susi 2013-01-30 20:07:44 -05:00 committed by Curtis Gedak
parent 4c249b4d65
commit e4210ba08d
33 changed files with 11 additions and 656 deletions

View File

@ -39,24 +39,24 @@ public:
static const Glib::ustring get_generic_text( CUSTOM_TEXT ttype, int index = 0 ) ; static const Glib::ustring get_generic_text( CUSTOM_TEXT ttype, int index = 0 ) ;
virtual FS get_filesystem_support() = 0 ; virtual FS get_filesystem_support() = 0 ;
virtual void set_used_sectors( Partition & partition ) = 0 ; virtual void set_used_sectors( Partition & partition ) {};
virtual void read_label( Partition & partition ) = 0 ; virtual void read_label( Partition & partition ) {};
virtual bool write_label( const Partition & partition, OperationDetail & operationdetail ) = 0 ; virtual bool write_label( const Partition & partition, OperationDetail & operationdetail ) { return false; };
virtual void read_uuid( Partition & partition ) = 0 ; virtual void read_uuid( Partition & partition ) {};
virtual bool write_uuid( const Partition & partition, OperationDetail & operationdetail ) = 0 ; virtual bool write_uuid( const Partition & partition, OperationDetail & operationdetail ) { return false; };
virtual bool create( const Partition & new_partition, OperationDetail & operationdetail ) = 0 ; virtual bool create( const Partition & new_partition, OperationDetail & operationdetail ) { return false; };
virtual bool resize( const Partition & partition_new, virtual bool resize( const Partition & partition_new,
OperationDetail & operationdetail, OperationDetail & operationdetail,
bool fill_partition = false ) = 0 ; bool fill_partition = false ) { return false; };
virtual bool move( const Partition & partition_new virtual bool move( const Partition & partition_new
, const Partition & partition_old , const Partition & partition_old
, OperationDetail & operationdetail , OperationDetail & operationdetail
) = 0 ; ) { return false; };
virtual bool copy( const Glib::ustring & src_part_path, virtual bool copy( const Glib::ustring & src_part_path,
const Glib::ustring & dest_part_path, const Glib::ustring & dest_part_path,
OperationDetail & operationdetail ) = 0 ; OperationDetail & operationdetail ) { return false; };
virtual bool check_repair( const Partition & partition, OperationDetail & operationdetail ) = 0 ; virtual bool check_repair( const Partition & partition, OperationDetail & operationdetail ) { return false; };
virtual bool remove( const Partition & partition, OperationDetail & operationdetail ) = 0 ; virtual bool remove( const Partition & partition, OperationDetail & operationdetail ) { return true; };
bool success; bool success;
protected: protected:
int execute_command( const Glib::ustring & command, OperationDetail & operationdetail, int execute_command( const Glib::ustring & command, OperationDetail & operationdetail,

View File

@ -32,18 +32,9 @@ public:
void read_label( Partition & partition ) ; void read_label( Partition & partition ) ;
bool write_label( const Partition & partition, OperationDetail & operationdetail ) ; bool write_label( const Partition & partition, OperationDetail & operationdetail ) ;
void read_uuid( Partition & partition ) ; void read_uuid( Partition & partition ) ;
bool write_uuid( const Partition & partition, OperationDetail & operationdetail ) ;
bool create( const Partition & new_partition, OperationDetail & operationdetail ) ; bool create( const Partition & new_partition, OperationDetail & operationdetail ) ;
bool resize( const Partition & partition_new, OperationDetail & operationdetail, bool fill_partition = false ) ; bool resize( const Partition & partition_new, OperationDetail & operationdetail, bool fill_partition = false ) ;
bool move( const Partition & partition_new
, const Partition & partition_old
, OperationDetail & operationdetail
) ;
bool copy( const Glib::ustring & src_part_path,
const Glib::ustring & dest_part_path,
OperationDetail & operationdetail ) ;
bool check_repair( const Partition & partition, OperationDetail & operationdetail ) ; bool check_repair( const Partition & partition, OperationDetail & operationdetail ) ;
bool remove( const Partition & partition, OperationDetail & operationdetail ) ;
private: private:
static Byte_Value btrfs_size_to_num( Glib::ustring str, Byte_Value ptn_bytes, bool scale_up ) ; static Byte_Value btrfs_size_to_num( Glib::ustring str, Byte_Value ptn_bytes, bool scale_up ) ;

View File

@ -28,26 +28,6 @@ class exfat : public FileSystem
{ {
public: public:
FS get_filesystem_support() ; FS get_filesystem_support() ;
void set_used_sectors( Partition & partition ) ;
void read_label( Partition & partition ) ;
bool write_label( const Partition & partition, OperationDetail & operationdetail ) ;
void read_uuid( Partition & partition ) ;
bool write_uuid( const Partition & partition, OperationDetail & operationdetail ) ;
bool create( const Partition & new_partition, OperationDetail & operationdetail ) ;
bool resize( const Partition & partition_new
, OperationDetail & operationdetail
, bool fill_partition = false
) ;
bool move( const Partition & partition_new
, const Partition & partition_old
, OperationDetail & operationdetail
) ;
bool copy( const Glib::ustring & src_part_path
, const Glib::ustring & dest_part_path
, OperationDetail & operationdetail
) ;
bool check_repair( const Partition & partition, OperationDetail & operationdetail ) ;
bool remove( const Partition & partition, OperationDetail & operationdetail ) ;
}; };
} //GParted } //GParted

View File

@ -38,15 +38,7 @@ public:
bool write_uuid( const Partition & partition, OperationDetail & operationdetail ) ; bool write_uuid( const Partition & partition, OperationDetail & operationdetail ) ;
bool create( const Partition & new_partition, OperationDetail & operationdetail ) ; bool create( const Partition & new_partition, OperationDetail & operationdetail ) ;
bool resize( const Partition & partition_new, OperationDetail & operationdetail, bool fill_partition = false ) ; bool resize( const Partition & partition_new, OperationDetail & operationdetail, bool fill_partition = false ) ;
bool move( const Partition & partition_new
, const Partition & partition_old
, OperationDetail & operationdetail
) ;
bool copy( const Glib::ustring & src_part_path,
const Glib::ustring & dest_part_path,
OperationDetail & operationdetail ) ;
bool check_repair( const Partition & partition, OperationDetail & operationdetail ) ; bool check_repair( const Partition & partition, OperationDetail & operationdetail ) ;
bool remove( const Partition & partition, OperationDetail & operationdetail ) ;
}; };
} //GParted } //GParted

View File

@ -36,16 +36,7 @@ public:
void read_uuid( Partition & partition ) ; void read_uuid( Partition & partition ) ;
bool write_uuid( const Partition & partition, OperationDetail & operationdetail ) ; bool write_uuid( const Partition & partition, OperationDetail & operationdetail ) ;
bool create( const Partition & new_partition, OperationDetail & operationdetail ) ; bool create( const Partition & new_partition, OperationDetail & operationdetail ) ;
bool resize( const Partition & partition_new, OperationDetail & operationdetail, bool fill_partition = false ) ;
bool move( const Partition & partition_new
, const Partition & partition_old
, OperationDetail & operationdetail
) ;
bool copy( const Glib::ustring & src_part_path,
const Glib::ustring & dest_part_path,
OperationDetail & operationdetail ) ;
bool check_repair( const Partition & partition, OperationDetail & operationdetail ) ; bool check_repair( const Partition & partition, OperationDetail & operationdetail ) ;
bool remove( const Partition & partition, OperationDetail & operationdetail ) ;
static const Glib::ustring Change_UUID_Warning [] ; static const Glib::ustring Change_UUID_Warning [] ;
}; };

View File

@ -36,16 +36,7 @@ public:
void read_uuid( Partition & partition ) ; void read_uuid( Partition & partition ) ;
bool write_uuid( const Partition & partition, OperationDetail & operationdetail ) ; bool write_uuid( const Partition & partition, OperationDetail & operationdetail ) ;
bool create( const Partition & new_partition, OperationDetail & operationdetail ) ; bool create( const Partition & new_partition, OperationDetail & operationdetail ) ;
bool resize( const Partition & partition_new, OperationDetail & operationdetail, bool fill_partition = false ) ;
bool move( const Partition & partition_new
, const Partition & partition_old
, OperationDetail & operationdetail
) ;
bool copy( const Glib::ustring & src_part_path,
const Glib::ustring & dest_part_path,
OperationDetail & operationdetail ) ;
bool check_repair( const Partition & partition, OperationDetail & operationdetail ) ; bool check_repair( const Partition & partition, OperationDetail & operationdetail ) ;
bool remove( const Partition & partition, OperationDetail & operationdetail ) ;
const static Glib::ustring ( & Change_UUID_Warning ) [] ; const static Glib::ustring ( & Change_UUID_Warning ) [] ;
}; };

View File

@ -29,22 +29,9 @@ class hfs : public FileSystem
{ {
public: public:
FS get_filesystem_support() ; FS get_filesystem_support() ;
void set_used_sectors( Partition & partition ) ;
void read_label( Partition & partition ) ; void read_label( Partition & partition ) ;
bool write_label( const Partition & partition, OperationDetail & operationdetail ) ;
void read_uuid( Partition & partition ) ;
bool write_uuid( const Partition & partition, OperationDetail & operationdetail ) ;
bool create( const Partition & new_partition, OperationDetail & operationdetail ) ; bool create( const Partition & new_partition, OperationDetail & operationdetail ) ;
bool resize( const Partition & partition_new, OperationDetail & operationdetail, bool fill_partition = false ) ;
bool move( const Partition & partition_new
, const Partition & partition_old
, OperationDetail & operationdetail
) ;
bool copy( const Glib::ustring & src_part_path,
const Glib::ustring & dest_part_path,
OperationDetail & operationdetail ) ;
bool check_repair( const Partition & partition, OperationDetail & operationdetail ) ; bool check_repair( const Partition & partition, OperationDetail & operationdetail ) ;
bool remove( const Partition & partition, OperationDetail & operationdetail ) ;
}; };
} //GParted } //GParted

View File

@ -29,22 +29,9 @@ class hfsplus : public FileSystem
{ {
public: public:
FS get_filesystem_support() ; FS get_filesystem_support() ;
void set_used_sectors( Partition & partition ) ;
void read_label( Partition & partition ) ; void read_label( Partition & partition ) ;
bool write_label( const Partition & partition, OperationDetail & operationdetail ) ;
void read_uuid( Partition & partition ) ;
bool write_uuid( const Partition & partition, OperationDetail & operationdetail ) ;
bool create( const Partition & new_partition, OperationDetail & operationdetail ) ; bool create( const Partition & new_partition, OperationDetail & operationdetail ) ;
bool resize( const Partition & partition_new, OperationDetail & operationdetail, bool fill_partition = false ) ;
bool move( const Partition & partition_new
, const Partition & partition_old
, OperationDetail & operationdetail
) ;
bool copy( const Glib::ustring & src_part_path,
const Glib::ustring & dest_part_path,
OperationDetail & operationdetail ) ;
bool check_repair( const Partition & partition, OperationDetail & operationdetail ) ; bool check_repair( const Partition & partition, OperationDetail & operationdetail ) ;
bool remove( const Partition & partition, OperationDetail & operationdetail ) ;
}; };
} //GParted } //GParted

View File

@ -36,15 +36,7 @@ public:
bool write_uuid( const Partition & partition, OperationDetail & operationdetail ) ; bool write_uuid( const Partition & partition, OperationDetail & operationdetail ) ;
bool create( const Partition & new_partition, OperationDetail & operationdetail ) ; bool create( const Partition & new_partition, OperationDetail & operationdetail ) ;
bool resize( const Partition & partition_new, OperationDetail & operationdetail, bool fill_partition = false ) ; bool resize( const Partition & partition_new, OperationDetail & operationdetail, bool fill_partition = false ) ;
bool move( const Partition & partition_new
, const Partition & partition_old
, OperationDetail & operationdetail
) ;
bool copy( const Glib::ustring & src_part_path,
const Glib::ustring & dest_part_path,
OperationDetail & operationdetail ) ;
bool check_repair( const Partition & partition, OperationDetail & operationdetail ) ; bool check_repair( const Partition & partition, OperationDetail & operationdetail ) ;
bool remove( const Partition & partition, OperationDetail & operationdetail ) ;
}; };
} //GParted } //GParted

View File

@ -31,7 +31,6 @@ public:
virtual const Glib::ustring get_custom_text( CUSTOM_TEXT ttype, int index = 0 ) ; virtual const Glib::ustring get_custom_text( CUSTOM_TEXT ttype, int index = 0 ) ;
FS get_filesystem_support() ; FS get_filesystem_support() ;
void set_used_sectors( Partition & partition ) ;
void read_label( Partition & partition ) ; void read_label( Partition & partition ) ;
bool write_label( const Partition & partition, OperationDetail & operationdetail ) ; bool write_label( const Partition & partition, OperationDetail & operationdetail ) ;
void read_uuid( Partition & partition ) ; void read_uuid( Partition & partition ) ;
@ -45,8 +44,6 @@ public:
bool copy( const Glib::ustring & src_part_path, bool copy( const Glib::ustring & src_part_path,
const Glib::ustring & dest_part_path, const Glib::ustring & dest_part_path,
OperationDetail & operationdetail ) ; OperationDetail & operationdetail ) ;
bool check_repair( const Partition & partition, OperationDetail & operationdetail ) ;
bool remove( const Partition & partition, OperationDetail & operationdetail ) ;
}; };
} //GParted } //GParted

View File

@ -30,19 +30,8 @@ public:
const Glib::ustring get_custom_text( CUSTOM_TEXT ttype, int index = 0 ) ; const Glib::ustring get_custom_text( CUSTOM_TEXT ttype, int index = 0 ) ;
FS get_filesystem_support() ; FS get_filesystem_support() ;
void set_used_sectors( Partition & partition ) ; void set_used_sectors( Partition & partition ) ;
void read_label( Partition & partition ) ;
bool write_label( const Partition & partition, OperationDetail & operationdetail ) ;
void read_uuid( Partition & partition ) ;
bool write_uuid( const Partition & partition, OperationDetail & operationdetail ) ;
bool create( const Partition & new_partition, OperationDetail & operationdetail ) ; bool create( const Partition & new_partition, OperationDetail & operationdetail ) ;
bool resize( const Partition & partition_new, OperationDetail & operationdetail, bool fill_partition = false ) ; bool resize( const Partition & partition_new, OperationDetail & operationdetail, bool fill_partition = false ) ;
bool move( const Partition & partition_new
, const Partition & partition_old
, OperationDetail & operationdetail
) ;
bool copy( const Glib::ustring & src_part_path
, const Glib::ustring & dest_part_path
, OperationDetail & operationdetail ) ;
bool check_repair( const Partition & partition, OperationDetail & operationdetail ) ; bool check_repair( const Partition & partition, OperationDetail & operationdetail ) ;
bool remove( const Partition & partition, OperationDetail & operationdetail ) ; bool remove( const Partition & partition, OperationDetail & operationdetail ) ;
}; };

View File

@ -35,16 +35,6 @@ public:
bool write_uuid( const Partition & partition, OperationDetail & operationdetail ) ; bool write_uuid( const Partition & partition, OperationDetail & operationdetail ) ;
bool create( const Partition & new_partition, OperationDetail & operationdetail ) ; bool create( const Partition & new_partition, OperationDetail & operationdetail ) ;
bool resize( const Partition & partition_new, OperationDetail & operationdetail, bool fill_partition = false ) ; bool resize( const Partition & partition_new, OperationDetail & operationdetail, bool fill_partition = false ) ;
bool move( const Partition & partition_new
, const Partition & partition_old
, OperationDetail & operationdetail
) ;
bool copy( const Glib::ustring & src_part_path
, const Glib::ustring & dest_part_path
, OperationDetail & operationdetail
) ;
bool check_repair( const Partition & partition, OperationDetail & operationdetail ) ;
bool remove( const Partition & partition, OperationDetail & operationdetail ) ;
}; };
} //GParted } //GParted

View File

@ -37,15 +37,10 @@ public:
bool write_uuid( const Partition & partition, OperationDetail & operationdetail ) ; bool write_uuid( const Partition & partition, OperationDetail & operationdetail ) ;
bool create( const Partition & new_partition, OperationDetail & operationdetail ) ; bool create( const Partition & new_partition, OperationDetail & operationdetail ) ;
bool resize( const Partition & partition_new, OperationDetail & operationdetail, bool fill_partition = false ) ; bool resize( const Partition & partition_new, OperationDetail & operationdetail, bool fill_partition = false ) ;
bool move( const Partition & partition_new
, const Partition & partition_old
, OperationDetail & operationdetail
) ;
bool copy( const Glib::ustring & src_part_path, bool copy( const Glib::ustring & src_part_path,
const Glib::ustring & dest_part_path, const Glib::ustring & dest_part_path,
OperationDetail & operationdetail ) ; OperationDetail & operationdetail ) ;
bool check_repair( const Partition & partition, OperationDetail & operationdetail ) ; bool check_repair( const Partition & partition, OperationDetail & operationdetail ) ;
bool remove( const Partition & partition, OperationDetail & operationdetail ) ;
static const Glib::ustring Change_UUID_Warning [] ; static const Glib::ustring Change_UUID_Warning [] ;
}; };

View File

@ -31,20 +31,9 @@ public:
FS get_filesystem_support() ; FS get_filesystem_support() ;
void set_used_sectors( Partition & partition ) ; void set_used_sectors( Partition & partition ) ;
void read_label( Partition & partition ) ; void read_label( Partition & partition ) ;
bool write_label( const Partition & partition, OperationDetail & operationdetail ) ;
void read_uuid( Partition & partition ) ; void read_uuid( Partition & partition ) ;
bool write_uuid( const Partition & partition, OperationDetail & operationdetail ) ;
bool create( const Partition & new_partition, OperationDetail & operationdetail ) ; bool create( const Partition & new_partition, OperationDetail & operationdetail ) ;
bool resize( const Partition & partition_new, OperationDetail & operationdetail, bool fill_partition = false ) ;
bool move( const Partition & partition_new
, const Partition & partition_old
, OperationDetail & operationdetail
) ;
bool copy( const Glib::ustring & src_part_path,
const Glib::ustring & dest_part_path,
OperationDetail & operationdetail ) ;
bool check_repair( const Partition & partition, OperationDetail & operationdetail ) ; bool check_repair( const Partition & partition, OperationDetail & operationdetail ) ;
bool remove( const Partition & partition, OperationDetail & operationdetail ) ;
}; };
} //GParted } //GParted

View File

@ -36,15 +36,7 @@ public:
bool write_uuid( const Partition & partition, OperationDetail & operationdetail ) ; bool write_uuid( const Partition & partition, OperationDetail & operationdetail ) ;
bool create( const Partition & new_partition, OperationDetail & operationdetail ) ; bool create( const Partition & new_partition, OperationDetail & operationdetail ) ;
bool resize( const Partition & partition_new, OperationDetail & operationdetail, bool fill_partition = false ) ; bool resize( const Partition & partition_new, OperationDetail & operationdetail, bool fill_partition = false ) ;
bool move( const Partition & partition_new
, const Partition & partition_old
, OperationDetail & operationdetail
) ;
bool copy( const Glib::ustring & src_part_path,
const Glib::ustring & dest_part_path,
OperationDetail & operationdetail ) ;
bool check_repair( const Partition & partition, OperationDetail & operationdetail ) ; bool check_repair( const Partition & partition, OperationDetail & operationdetail ) ;
bool remove( const Partition & partition, OperationDetail & operationdetail ) ;
}; };
} //GParted } //GParted

View File

@ -29,22 +29,6 @@ class ufs : public FileSystem
{ {
public: public:
FS get_filesystem_support() ; FS get_filesystem_support() ;
void set_used_sectors( Partition & partition ) ;
void read_label( Partition & partition ) ;
bool write_label( const Partition & partition, OperationDetail & operationdetail ) ;
void read_uuid( Partition & partition ) ;
bool write_uuid( const Partition & partition, OperationDetail & operationdetail ) ;
bool create( const Partition & new_partition, OperationDetail & operationdetail ) ;
bool resize( const Partition & partition_new, OperationDetail & operationdetail, bool fill_partition = false ) ;
bool move( const Partition & partition_new
, const Partition & partition_old
, OperationDetail & operationdetail
) ;
bool copy( const Glib::ustring & src_part_path,
const Glib::ustring & dest_part_path,
OperationDetail & operationdetail ) ;
bool check_repair( const Partition & partition, OperationDetail & operationdetail ) ;
bool remove( const Partition & partition, OperationDetail & operationdetail ) ;
}; };
} //GParted } //GParted

View File

@ -36,15 +36,10 @@ public:
bool write_uuid( const Partition & partition, OperationDetail & operationdetail ) ; bool write_uuid( const Partition & partition, OperationDetail & operationdetail ) ;
bool create( const Partition & new_partition, OperationDetail & operationdetail ) ; bool create( const Partition & new_partition, OperationDetail & operationdetail ) ;
bool resize( const Partition & partition_new, OperationDetail & operationdetail, bool fill_partition = false ) ; bool resize( const Partition & partition_new, OperationDetail & operationdetail, bool fill_partition = false ) ;
bool move( const Partition & partition_new
, const Partition & partition_old
, OperationDetail & operationdetail
) ;
bool copy( const Glib::ustring & src_part_path, bool copy( const Glib::ustring & src_part_path,
const Glib::ustring & dest_part_path, const Glib::ustring & dest_part_path,
OperationDetail & operationdetail ) ; OperationDetail & operationdetail ) ;
bool check_repair( const Partition & partition, OperationDetail & operationdetail ) ; bool check_repair( const Partition & partition, OperationDetail & operationdetail ) ;
bool remove( const Partition & partition, OperationDetail & operationdetail ) ;
}; };
} //GParted } //GParted

View File

@ -166,27 +166,6 @@ bool btrfs::write_label( const Partition & partition, OperationDetail & operatio
return ! execute_command( "btrfs filesystem label " + partition .get_path() + " \"" + partition .get_label() + "\"", operationdetail ) ; return ! execute_command( "btrfs filesystem label " + partition .get_path() + " \"" + partition .get_label() + "\"", operationdetail ) ;
} }
bool btrfs::write_uuid( const Partition & partition, OperationDetail & operationdetail )
{
return true ;
}
bool btrfs::move( const Partition & partition_new
, const Partition & partition_old
, OperationDetail & operationdetail
)
{
return true ;
}
bool btrfs::copy( const Glib::ustring & src_part_path,
const Glib::ustring & dest_part_path,
OperationDetail & operationdetail )
{
// TODO
return true ;
}
bool btrfs::resize( const Partition & partition_new, OperationDetail & operationdetail, bool fill_partition ) bool btrfs::resize( const Partition & partition_new, OperationDetail & operationdetail, bool fill_partition )
{ {
bool success = true ; bool success = true ;
@ -313,11 +292,6 @@ void btrfs::read_uuid( Partition & partition )
} }
} }
bool btrfs::remove( const Partition & partition, OperationDetail & operationdetail )
{
return true ;
}
//Private methods //Private methods
//Return the value of a btrfs tool formatted size, including reversing //Return the value of a btrfs tool formatted size, including reversing

View File

@ -34,65 +34,5 @@ FS exfat::get_filesystem_support()
return fs ; return fs ;
} }
void exfat::set_used_sectors( Partition & partition )
{
}
void exfat::read_label( Partition & partition )
{
}
bool exfat::write_label( const Partition & partition, OperationDetail & operationdetail )
{
return true ;
}
void exfat::read_uuid( Partition & partition )
{
}
bool exfat::write_uuid( const Partition & partition, OperationDetail & operationdetail )
{
return true ;
}
bool exfat::create( const Partition & new_partition, OperationDetail & operationdetail )
{
return true ;
}
bool exfat::resize( const Partition & partition_new
, OperationDetail & operationdetail
, bool fill_partition )
{
return true ;
}
bool exfat::move( const Partition & partition_new
, const Partition & partition_old
, OperationDetail & operationdetail
)
{
return true ;
}
bool exfat::copy( const Glib::ustring & src_part_path
, const Glib::ustring & dest_part_path
, OperationDetail & operationdetail
)
{
return true ;
}
bool exfat::check_repair( const Partition & partition, OperationDetail & operationdetail )
{
return true ;
}
bool exfat::remove( const Partition & partition, OperationDetail & operationdetail )
{
return true ;
}
} //GParted } //GParted

View File

@ -191,21 +191,6 @@ bool ext2::resize( const Partition & partition_new, OperationDetail & operationd
return ! execute_command( str_temp, operationdetail ) ; return ! execute_command( str_temp, operationdetail ) ;
} }
bool ext2::move( const Partition & partition_new
, const Partition & partition_old
, OperationDetail & operationdetail
)
{
return true ;
}
bool ext2::copy( const Glib::ustring & src_part_path,
const Glib::ustring & dest_part_path,
OperationDetail & operationdetail )
{
return true ;
}
bool ext2::check_repair( const Partition & partition, OperationDetail & operationdetail ) bool ext2::check_repair( const Partition & partition, OperationDetail & operationdetail )
{ {
exit_status = execute_command( "e2fsck -f -y -v " + partition.get_path(), operationdetail, exit_status = execute_command( "e2fsck -f -y -v " + partition.get_path(), operationdetail,
@ -216,11 +201,6 @@ bool ext2::check_repair( const Partition & partition, OperationDetail & operatio
return ( exit_status == 0 || exit_status == 1 || exit_status == 2 || exit_status == 256 ) ; return ( exit_status == 0 || exit_status == 1 || exit_status == 2 || exit_status == 256 ) ;
} }
bool ext2::remove( const Partition & partition, OperationDetail & operationdetail )
{
return true ;
}
} //GParted } //GParted

View File

@ -234,26 +234,6 @@ bool fat16::create( const Partition & new_partition, OperationDetail & operation
true ); true );
} }
bool fat16::resize( const Partition & partition_new, OperationDetail & operationdetail, bool fill_partition )
{
return true ;
}
bool fat16::move( const Partition & partition_new
, const Partition & partition_old
, OperationDetail & operationdetail
)
{
return true ;
}
bool fat16::copy( const Glib::ustring & src_part_path,
const Glib::ustring & dest_part_path,
OperationDetail & operationdetail )
{
return true ;
}
bool fat16::check_repair( const Partition & partition, OperationDetail & operationdetail ) bool fat16::check_repair( const Partition & partition, OperationDetail & operationdetail )
{ {
exit_status = execute_command( "dosfsck -a -w -v " + partition .get_path(), operationdetail, exit_status = execute_command( "dosfsck -a -w -v " + partition .get_path(), operationdetail,
@ -262,11 +242,6 @@ bool fat16::check_repair( const Partition & partition, OperationDetail & operati
return ( exit_status == 0 || exit_status == 1 || exit_status == 256 ) ; return ( exit_status == 0 || exit_status == 1 || exit_status == 256 ) ;
} }
bool fat16::remove( const Partition & partition, OperationDetail & operationdetail )
{
return true ;
}
} //GParted } //GParted

View File

@ -223,26 +223,6 @@ bool fat32::create( const Partition & new_partition, OperationDetail & operation
false, true ); false, true );
} }
bool fat32::resize( const Partition & partition_new, OperationDetail & operationdetail, bool fill_partition )
{
return true ;
}
bool fat32::move( const Partition & partition_new
, const Partition & partition_old
, OperationDetail & operationdetail
)
{
return true ;
}
bool fat32::copy( const Glib::ustring & src_part_path,
const Glib::ustring & dest_part_path,
OperationDetail & operationdetail )
{
return true ;
}
bool fat32::check_repair( const Partition & partition, OperationDetail & operationdetail ) bool fat32::check_repair( const Partition & partition, OperationDetail & operationdetail )
{ {
exit_status = execute_command( "dosfsck -a -w -v " + partition.get_path(), operationdetail, exit_status = execute_command( "dosfsck -a -w -v " + partition.get_path(), operationdetail,
@ -251,9 +231,4 @@ bool fat32::check_repair( const Partition & partition, OperationDetail & operati
return ( exit_status == 0 || exit_status == 1 || exit_status == 256 ) ; return ( exit_status == 0 || exit_status == 1 || exit_status == 256 ) ;
} }
bool fat32::remove( const Partition & partition, OperationDetail & operationdetail )
{
return true ;
}
} //GParted } //GParted

View File

@ -51,10 +51,6 @@ FS hfs::get_filesystem_support()
return fs ; return fs ;
} }
void hfs::set_used_sectors( Partition & partition )
{
}
void hfs::read_label( Partition & partition ) void hfs::read_label( Partition & partition )
{ {
if ( ! Utils::execute_command( "vol_id " + partition .get_path(), output, error, true ) ) if ( ! Utils::execute_command( "vol_id " + partition .get_path(), output, error, true ) )
@ -76,20 +72,6 @@ void hfs::read_label( Partition & partition )
} }
} }
bool hfs::write_label( const Partition & partition, OperationDetail & operationdetail )
{
return true ;
}
void hfs::read_uuid( Partition & partition )
{
}
bool hfs::write_uuid( const Partition & partition, OperationDetail & operationdetail )
{
return true ;
}
bool hfs::create( const Partition & new_partition, OperationDetail & operationdetail ) bool hfs::create( const Partition & new_partition, OperationDetail & operationdetail )
{ {
Glib::ustring cmd = ""; Glib::ustring cmd = "";
@ -100,35 +82,10 @@ bool hfs::create( const Partition & new_partition, OperationDetail & operationde
return ! execute_command( cmd , operationdetail ) ; return ! execute_command( cmd , operationdetail ) ;
} }
bool hfs::resize( const Partition & partition_new, OperationDetail & operationdetail, bool fill_partition )
{
return true ;
}
bool hfs::move( const Partition & partition_new
, const Partition & partition_old
, OperationDetail & operationdetail
)
{
return true ;
}
bool hfs::copy( const Glib::ustring & src_part_path,
const Glib::ustring & dest_part_path,
OperationDetail & operationdetail )
{
return true ;
}
bool hfs::check_repair( const Partition & partition, OperationDetail & operationdetail ) bool hfs::check_repair( const Partition & partition, OperationDetail & operationdetail )
{ {
//FIXME: find out what the returnvalue is in case of modified.. also check what the -a flag does.. (there is no manpage) //FIXME: find out what the returnvalue is in case of modified.. also check what the -a flag does.. (there is no manpage)
return ! execute_command( "hfsck -v " + partition .get_path(), operationdetail ) ; return ! execute_command( "hfsck -v " + partition .get_path(), operationdetail ) ;
} }
bool hfs::remove( const Partition & partition, OperationDetail & operationdetail )
{
return true ;
}
} //GParted } //GParted

View File

@ -49,10 +49,6 @@ FS hfsplus::get_filesystem_support()
return fs ; return fs ;
} }
void hfsplus::set_used_sectors( Partition & partition )
{
}
void hfsplus::read_label( Partition & partition ) void hfsplus::read_label( Partition & partition )
{ {
if ( ! Utils::execute_command( "vol_id " + partition .get_path(), output, error, true ) ) if ( ! Utils::execute_command( "vol_id " + partition .get_path(), output, error, true ) )
@ -74,20 +70,6 @@ void hfsplus::read_label( Partition & partition )
} }
} }
bool hfsplus::write_label( const Partition & partition, OperationDetail & operationdetail )
{
return true ;
}
void hfsplus::read_uuid( Partition & partition )
{
}
bool hfsplus::write_uuid( const Partition & partition, OperationDetail & operationdetail )
{
return true ;
}
bool hfsplus::create( const Partition & new_partition, OperationDetail & operationdetail ) bool hfsplus::create( const Partition & new_partition, OperationDetail & operationdetail )
{ {
Glib::ustring cmd = ""; Glib::ustring cmd = "";
@ -98,34 +80,9 @@ bool hfsplus::create( const Partition & new_partition, OperationDetail & operati
return ! execute_command( cmd , operationdetail ) ; return ! execute_command( cmd , operationdetail ) ;
} }
bool hfsplus::resize( const Partition & partition_new, OperationDetail & operationdetail, bool fill_partition )
{
return true ;
}
bool hfsplus::move( const Partition & partition_new
, const Partition & partition_old
, OperationDetail & operationdetail
)
{
return true ;
}
bool hfsplus::copy( const Glib::ustring & src_part_path,
const Glib::ustring & dest_part_path,
OperationDetail & operationdetail )
{
return true ;
}
bool hfsplus::check_repair( const Partition & partition, OperationDetail & operationdetail ) bool hfsplus::check_repair( const Partition & partition, OperationDetail & operationdetail )
{ {
return ! execute_command( "fsck.hfsplus -f -y " + partition .get_path(), operationdetail ) ; return ! execute_command( "fsck.hfsplus -f -y " + partition .get_path(), operationdetail ) ;
} }
bool hfsplus::remove( const Partition & partition, OperationDetail & operationdetail )
{
return true ;
}
} //GParted } //GParted

View File

@ -178,21 +178,6 @@ bool jfs::resize( const Partition & partition_new, OperationDetail & operationde
return success ; return success ;
} }
bool jfs::move( const Partition & partition_new
, const Partition & partition_old
, OperationDetail & operationdetail
)
{
return true ;
}
bool jfs::copy( const Glib::ustring & src_part_path,
const Glib::ustring & dest_part_path,
OperationDetail & operationdetail )
{
return true ;
}
bool jfs::check_repair( const Partition & partition, OperationDetail & operationdetail ) bool jfs::check_repair( const Partition & partition, OperationDetail & operationdetail )
{ {
exit_status = execute_command( "jfs_fsck -f " + partition.get_path(), operationdetail, exit_status = execute_command( "jfs_fsck -f " + partition.get_path(), operationdetail,
@ -201,11 +186,6 @@ bool jfs::check_repair( const Partition & partition, OperationDetail & operation
return ( exit_status == 0 || exit_status == 1 ) ; return ( exit_status == 0 || exit_status == 1 ) ;
} }
bool jfs::remove( const Partition & partition, OperationDetail & operationdetail )
{
return true ;
}
} //GParted } //GParted

View File

@ -64,10 +64,6 @@ FS linux_swap::get_filesystem_support()
return fs ; return fs ;
} }
void linux_swap::set_used_sectors( Partition & partition )
{
}
void linux_swap::read_label( Partition & partition ) void linux_swap::read_label( Partition & partition )
{ {
if ( ! Utils::execute_command( "swaplabel " + partition .get_path(), output, error, true ) ) if ( ! Utils::execute_command( "swaplabel " + partition .get_path(), output, error, true ) )
@ -172,14 +168,4 @@ bool linux_swap::copy( const Glib::ustring & src_part_path,
return true ; return true ;
} }
bool linux_swap::check_repair( const Partition & partition, OperationDetail & operationdetail )
{
return true ;
}
bool linux_swap::remove( const Partition & partition, OperationDetail & operationdetail )
{
return true ;
}
} //GParted } //GParted

View File

@ -86,25 +86,6 @@ void lvm2_pv::set_used_sectors( Partition & partition )
} }
} }
void lvm2_pv::read_label( Partition & partition )
{
return ;
}
bool lvm2_pv::write_label( const Partition & partition, OperationDetail & operationdetail )
{
return true ;
}
void lvm2_pv::read_uuid( Partition & partition )
{
}
bool lvm2_pv::write_uuid( const Partition & partition, OperationDetail & operationdetail )
{
return true ;
}
bool lvm2_pv::create( const Partition & new_partition, OperationDetail & operationdetail ) bool lvm2_pv::create( const Partition & new_partition, OperationDetail & operationdetail )
{ {
return ! execute_command( "lvm pvcreate -M 2 " + new_partition .get_path(), operationdetail ) ; return ! execute_command( "lvm pvcreate -M 2 " + new_partition .get_path(), operationdetail ) ;
@ -120,34 +101,6 @@ bool lvm2_pv::resize( const Partition & partition_new, OperationDetail & operati
return ! execute_command( "lvm pvresize -v " + size + partition_new .get_path(), operationdetail ) ; return ! execute_command( "lvm pvresize -v " + size + partition_new .get_path(), operationdetail ) ;
} }
bool lvm2_pv::move( const Partition & partition_new
, const Partition & partition_old
, OperationDetail & operationdetail
)
{
return true ;
}
bool lvm2_pv::copy( const Glib::ustring & src_part_path
, const Glib::ustring & dest_part_path
, OperationDetail & operationdetail )
{
//Copy not implemented.
// Metadata fully describing a Volume Group is stored at the start of
// each Physical Volume member. Internally LVM2 primarily uses UUIDs
// to uniquely identify all objects (PVs, VG and LVs) but the interface
// uses device names and VG and LV names. The general case of copying
// a PV could confuse LVM2 because it will result in duplicate objects,
// or even duplicate partial VGs and LVs if they span multiple PVs, so
// it is not safe and should be achieved using other LVM2 commands. A
// specific case of copying a PV is the right action when it is as part
// of the transfer of an exported VG to a remote machine via storage
// which will be detached from the local machine and attached to the
// remote machine, but would probably fit better at a VG manipulation
// layer. Thus copying of PVs is not implemented.
return true ;
}
bool lvm2_pv::check_repair( const Partition & partition, OperationDetail & operationdetail ) bool lvm2_pv::check_repair( const Partition & partition, OperationDetail & operationdetail )
{ {
return ! execute_command( "lvm pvck -v " + partition .get_path(), operationdetail ) ; return ! execute_command( "lvm pvck -v " + partition .get_path(), operationdetail ) ;

View File

@ -185,30 +185,4 @@ bool nilfs2::resize( const Partition & partition_new, OperationDetail & operatio
return success ; return success ;
} }
bool nilfs2::move( const Partition & partition_new
, const Partition & partition_old
, OperationDetail & operationdetail
)
{
return true ;
}
bool nilfs2::copy( const Glib::ustring & src_part_path
, const Glib::ustring & dest_part_path
, OperationDetail & operationdetail
)
{
return true ;
}
bool nilfs2::check_repair( const Partition & partition, OperationDetail & operationdetail )
{
return true ;
}
bool nilfs2::remove( const Partition & partition, OperationDetail & operationdetail )
{
return true ;
}
} //GParted } //GParted

View File

@ -224,14 +224,6 @@ bool ntfs::resize( const Partition & partition_new, OperationDetail & operationd
return return_value ; return return_value ;
} }
bool ntfs::move( const Partition & partition_new
, const Partition & partition_old
, OperationDetail & operationdetail
)
{
return true ;
}
bool ntfs::copy( const Glib::ustring & src_part_path, bool ntfs::copy( const Glib::ustring & src_part_path,
const Glib::ustring & dest_part_path, const Glib::ustring & dest_part_path,
OperationDetail & operationdetail ) OperationDetail & operationdetail )
@ -247,11 +239,6 @@ bool ntfs::check_repair( const Partition & partition, OperationDetail & operatio
return ! execute_command( "ntfsresize -P -i -f -v " + partition .get_path(), operationdetail ) ; return ! execute_command( "ntfsresize -P -i -f -v " + partition .get_path(), operationdetail ) ;
} }
bool ntfs::remove( const Partition & partition, OperationDetail & operationdetail )
{
return true ;
}
} //GParted } //GParted

View File

@ -115,11 +115,6 @@ void reiser4::read_label( Partition & partition )
} }
} }
bool reiser4::write_label( const Partition & partition, OperationDetail & operationdetail )
{
return true ;
}
void reiser4::read_uuid( Partition & partition ) void reiser4::read_uuid( Partition & partition )
{ {
if ( ! Utils::execute_command( "debugfs.reiser4 " + partition .get_path(), output, error, true ) ) if ( ! Utils::execute_command( "debugfs.reiser4 " + partition .get_path(), output, error, true ) )
@ -136,11 +131,6 @@ void reiser4::read_uuid( Partition & partition )
} }
} }
bool reiser4::write_uuid( const Partition & partition, OperationDetail & operationdetail )
{
return true ;
}
bool reiser4::create( const Partition & new_partition, OperationDetail & operationdetail ) bool reiser4::create( const Partition & new_partition, OperationDetail & operationdetail )
{ {
return ! execute_command( "mkfs.reiser4 --yes --label \"" + new_partition.get_label() + return ! execute_command( "mkfs.reiser4 --yes --label \"" + new_partition.get_label() +
@ -148,37 +138,12 @@ bool reiser4::create( const Partition & new_partition, OperationDetail & operati
false, true ); false, true );
} }
bool reiser4::resize( const Partition & partition_new, OperationDetail & operationdetail, bool fill_partition )
{
return true ;
}
bool reiser4::move( const Partition & partition_new
, const Partition & partition_old
, OperationDetail & operationdetail
)
{
return true ;
}
bool reiser4::copy( const Glib::ustring & src_part_path,
const Glib::ustring & dest_part_path,
OperationDetail & operationdetail )
{
return true ;
}
bool reiser4::check_repair( const Partition & partition, OperationDetail & operationdetail ) bool reiser4::check_repair( const Partition & partition, OperationDetail & operationdetail )
{ {
return ! execute_command( "fsck.reiser4 --yes --fix --quiet " + partition.get_path(), return ! execute_command( "fsck.reiser4 --yes --fix --quiet " + partition.get_path(),
operationdetail, false, true ); operationdetail, false, true );
} }
bool reiser4::remove( const Partition & partition, OperationDetail & operationdetail )
{
return true ;
}
} //GParted } //GParted

View File

@ -169,21 +169,6 @@ bool reiserfs::resize( const Partition & partition_new, OperationDetail & operat
return ( exit_status == 0 || exit_status == 256 ) ; return ( exit_status == 0 || exit_status == 256 ) ;
} }
bool reiserfs::move( const Partition & partition_new
, const Partition & partition_old
, OperationDetail & operationdetail
)
{
return true ;
}
bool reiserfs::copy( const Glib::ustring & src_part_path,
const Glib::ustring & dest_part_path,
OperationDetail & operationdetail )
{
return true ;
}
bool reiserfs::check_repair( const Partition & partition, OperationDetail & operationdetail ) bool reiserfs::check_repair( const Partition & partition, OperationDetail & operationdetail )
{ {
exit_status = execute_command( "reiserfsck --yes --fix-fixable --quiet " + partition.get_path(), exit_status = execute_command( "reiserfsck --yes --fix-fixable --quiet " + partition.get_path(),
@ -192,9 +177,4 @@ bool reiserfs::check_repair( const Partition & partition, OperationDetail & oper
return ( exit_status == 0 || exit_status == 1 || exit_status == 256 ) ; return ( exit_status == 0 || exit_status == 1 || exit_status == 256 ) ;
} }
bool reiserfs::remove( const Partition & partition, OperationDetail & operationdetail )
{
return true ;
}
} //GParted } //GParted

View File

@ -35,63 +35,6 @@ FS ufs::get_filesystem_support()
return fs ; return fs ;
} }
void ufs::set_used_sectors( Partition & partition )
{
}
void ufs::read_label( Partition & partition )
{
}
bool ufs::write_label( const Partition & partition, OperationDetail & operationdetail )
{
return true ;
}
void ufs::read_uuid( Partition & partition )
{
}
bool ufs::write_uuid( const Partition & partition, OperationDetail & operationdetail )
{
return true ;
}
bool ufs::create( const Partition & new_partition, OperationDetail & operationdetail )
{
return true ;
}
bool ufs::resize( const Partition & partition_new, OperationDetail & operationdetail, bool fill_partition )
{
return true ;
}
bool ufs::move( const Partition & partition_new
, const Partition & partition_old
, OperationDetail & operationdetail
)
{
return true ;
}
bool ufs::copy( const Glib::ustring & src_part_path,
const Glib::ustring & dest_part_path,
OperationDetail & operationdetail )
{
return true ;
}
bool ufs::check_repair( const Partition & partition, OperationDetail & operationdetail )
{
return true ;
}
bool ufs::remove( const Partition & partition, OperationDetail & operationdetail )
{
return true ;
}
} //GParted } //GParted

View File

@ -194,14 +194,6 @@ bool xfs::resize( const Partition & partition_new, OperationDetail & operationde
return success ; return success ;
} }
bool xfs::move( const Partition & partition_new
, const Partition & partition_old
, OperationDetail & operationdetail
)
{
return true ;
}
bool xfs::copy( const Glib::ustring & src_part_path, bool xfs::copy( const Glib::ustring & src_part_path,
const Glib::ustring & dest_part_path, const Glib::ustring & dest_part_path,
OperationDetail & operationdetail ) OperationDetail & operationdetail )
@ -256,11 +248,6 @@ bool xfs::check_repair( const Partition & partition, OperationDetail & operation
false, true ); false, true );
} }
bool xfs::remove( const Partition & partition, OperationDetail & operationdetail )
{
return true ;
}
} //GParted } //GParted