Renamed set_label and get_label methods to write_label and read_label respectively.

svn path=/trunk/; revision=957
This commit is contained in:
Curtis Gedak 2008-11-08 23:55:17 +00:00
parent aec7461a8b
commit 55952fe621
34 changed files with 130 additions and 90 deletions

View File

@ -13,11 +13,11 @@ We need to keep track of copyright (see the Maintainer HOWTO on www.gnu.org).
Curtis Gedak <gedakc@users.sourceforge.net>
* Wrote Utils::cleanup_cursor() function
* Rewrote get_label functionality for hfs
* Wrote create, get_label, and check_repair functionality for hfs+
* Wrote get_label functionality for fat16 and fat32 filesystems
* Rewrote read_label functionality for hfs
* Wrote create, read_label, and check_repair functionality for hfs+
* Wrote read_label functionality for fat16 and fat32 filesystems
* Wrote Utils::regexp_label() function
* Wrote set partition label functionality
* Wrote write partition label functionality
* Created Dialog_Partion_Label.h, Dialog_Partition_Label.cc
* Created OperationLabelPartition.h, OperationLabelPartition.cc
* Maintained from official 0.3.5 release onward

View File

@ -1,3 +1,43 @@
2008-11-08 Curtis Gedak <gedakc@gmail.com>
* include/ext2.h,
include/ext3.h,
include/fat16.h,
include/fat32.h,
include/hfs.h,
include/hfsplus.h,
include/jfs.h,
include/linux_swap.h,
include/ntfs.h,
include/reiser4.h,
include/reiserfs.h,
include/xfs.h,
include/ufs.h: Renamed set_label and get_label methods.
* src/ext2.cc,
src/ext3.cc,
src/fat16.cc,
src/fat32.cc,
src/hfs.cc,
src/hfsplus.cc,
src/jfs.cc,
src/linux_swap.cc,
src/ntfs.cc,
src/reiser4.cc,
src/reiserfs.cc,
src/ufs.cc,
src/xfs.cc: Renamed set_label and get_label methods.
* include/FileSystem.h,
include/GParted_Core.h,
include/Utils.h: Renamed set_label and get_label methods.
* src/DialogFeatures.cc
src/FileSystem.cc,
src/GParted_Core.cc: Renamed set_label and get_label methods.
- Renamed set_label to write_label, renamed get_label to read_label.
- Preference is to reserve set/get for object attribute handling.
2008-11-05 Curtis Gedak <gedakc@gmail.com>
* src/Dialog_Partition_Copy.cc: Fixed copy and paste partition problem.

View File

@ -35,8 +35,8 @@ public:
virtual FS get_filesystem_support() = 0 ;
virtual void set_used_sectors( Partition & partition ) = 0 ;
virtual void get_label( Partition & partition ) = 0 ;
virtual bool set_label( const Partition & partition, OperationDetail & operationdetail ) = 0 ;
virtual void read_label( Partition & partition ) = 0 ;
virtual bool write_label( const Partition & partition, OperationDetail & operationdetail ) = 0 ;
virtual bool create( const Partition & new_partition, OperationDetail & operationdetail ) = 0 ;
virtual bool resize( const Partition & partition_new,
OperationDetail & operationdetail,

View File

@ -62,7 +62,7 @@ private:
std::vector<Glib::ustring> get_alternate_paths( const Glib::ustring & path ) ;
void set_device_partitions( Device & device ) ;
GParted::FILESYSTEM get_filesystem() ;
void get_label( Partition & partition ) ;
void read_label( Partition & partition ) ;
void insert_unallocated( const Glib::ustring & device_path,
std::vector<Partition> & partitions,
Sector start,

View File

@ -92,8 +92,8 @@ struct FS
FILESYSTEM filesystem ;
Support read ; //can we get the amount of used sectors?
Support get_label ;
Support set_label ;
Support read_label ;
Support write_label ;
Support create ;
Support grow ;
Support shrink ;
@ -106,7 +106,7 @@ struct FS
FS()
{
read = get_label = set_label = create = grow = shrink = move = check = copy = NONE;
read = read_label = write_label = create = grow = shrink = move = check = copy = NONE;
MIN = MAX = 0 ;
}
} ;

View File

@ -29,8 +29,8 @@ class ext2 : public FileSystem
public:
FS get_filesystem_support() ;
void set_used_sectors( Partition & partition ) ;
void get_label( Partition & partition ) ;
bool set_label( const Partition & partition, OperationDetail & operationdetail ) ;
void read_label( Partition & partition ) ;
bool write_label( 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 copy( const Glib::ustring & src_part_path,

View File

@ -29,8 +29,8 @@ class ext3 : public FileSystem
public:
FS get_filesystem_support() ;
void set_used_sectors( Partition & partition ) ;
void get_label( Partition & partition ) ;
bool set_label( const Partition & partition, OperationDetail & operationdetail ) ;
void read_label( Partition & partition ) ;
bool write_label( 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 copy( const Glib::ustring & src_part_path,

View File

@ -29,8 +29,8 @@ class fat16 : public FileSystem
public:
FS get_filesystem_support() ;
void set_used_sectors( Partition & partition ) ;
void get_label( Partition & partition ) ;
bool set_label( const Partition & partition, OperationDetail & operationdetail ) ;
void read_label( Partition & partition ) ;
bool write_label( 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 copy( const Glib::ustring & src_part_path,

View File

@ -29,8 +29,8 @@ class fat32 : public FileSystem
public:
FS get_filesystem_support();
void set_used_sectors( Partition & partition ) ;
void get_label( Partition & partition ) ;
bool set_label( const Partition & partition, OperationDetail & operationdetail ) ;
void read_label( Partition & partition ) ;
bool write_label( 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 copy( const Glib::ustring & src_part_path,

View File

@ -29,8 +29,8 @@ class hfs : public FileSystem
public:
FS get_filesystem_support() ;
void set_used_sectors( Partition & partition ) ;
void get_label( Partition & partition ) ;
bool set_label( const Partition & partition, OperationDetail & operationdetail ) ;
void read_label( Partition & partition ) ;
bool write_label( 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 copy( const Glib::ustring & src_part_path,

View File

@ -29,8 +29,8 @@ class hfsplus : public FileSystem
public:
FS get_filesystem_support() ;
void set_used_sectors( Partition & partition ) ;
void get_label( Partition & partition ) ;
bool set_label( const Partition & partition, OperationDetail & operationdetail ) ;
void read_label( Partition & partition ) ;
bool write_label( 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 copy( const Glib::ustring & src_part_path,

View File

@ -29,8 +29,8 @@ class jfs : public FileSystem
public:
FS get_filesystem_support() ;
void set_used_sectors( Partition & partition ) ;
void get_label( Partition & partition ) ;
bool set_label( const Partition & partition, OperationDetail & operationdetail ) ;
void read_label( Partition & partition ) ;
bool write_label( 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 copy( const Glib::ustring & src_part_path,

View File

@ -29,8 +29,8 @@ class linux_swap : public FileSystem
public:
FS get_filesystem_support() ;
void set_used_sectors( Partition & partition ) ;
void get_label( Partition & partition ) ;
bool set_label( const Partition & partition, OperationDetail & operationdetail ) ;
void read_label( Partition & partition ) ;
bool write_label( 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 copy( const Glib::ustring & src_part_path,

View File

@ -29,8 +29,8 @@ class ntfs : public FileSystem
public:
FS get_filesystem_support() ;
void set_used_sectors( Partition & partition ) ;
void get_label( Partition & partition ) ;
bool set_label( const Partition & partition, OperationDetail & operationdetail ) ;
void read_label( Partition & partition ) ;
bool write_label( 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 copy( const Glib::ustring & src_part_path,

View File

@ -29,8 +29,8 @@ class reiser4 : public FileSystem
public:
FS get_filesystem_support() ;
void set_used_sectors( Partition & partition ) ;
void get_label( Partition & partition ) ;
bool set_label( const Partition & partition, OperationDetail & operationdetail ) ;
void read_label( Partition & partition ) ;
bool write_label( 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 copy( const Glib::ustring & src_part_path,

View File

@ -29,8 +29,8 @@ class reiserfs : public FileSystem
public:
FS get_filesystem_support() ;
void set_used_sectors( Partition & partition ) ;
void get_label( Partition & partition ) ;
bool set_label( const Partition & partition, OperationDetail & operationdetail ) ;
void read_label( Partition & partition ) ;
bool write_label( 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 copy( const Glib::ustring & src_part_path,

View File

@ -29,8 +29,8 @@ class ufs : public FileSystem
public:
FS get_filesystem_support() ;
void set_used_sectors( Partition & partition ) ;
void get_label( Partition & partition ) ;
bool set_label( const Partition & partition, OperationDetail & operationdetail ) ;
void read_label( Partition & partition ) ;
bool write_label( 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 copy( const Glib::ustring & src_part_path,

View File

@ -29,8 +29,8 @@ class xfs : public FileSystem
public:
FS get_filesystem_support() ;
void set_used_sectors( Partition & partition ) ;
void get_label( Partition & partition ) ;
bool set_label( const Partition & partition, OperationDetail & operationdetail ) ;
void read_label( Partition & partition ) ;
bool write_label( 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 copy( const Glib::ustring & src_part_path,

View File

@ -93,7 +93,7 @@ void DialogFeatures::show_filesystem( const FS & fs )
treerow[ treeview_filesystems_columns .move ] = fs .move ? icon_yes : icon_no ;
treerow[ treeview_filesystems_columns .copy ] = fs .copy ? icon_yes : icon_no ;
treerow[ treeview_filesystems_columns .check ] = fs .check ? icon_yes : icon_no ;
treerow[ treeview_filesystems_columns .label ] = fs .set_label ? icon_yes : icon_no ;
treerow[ treeview_filesystems_columns .label ] = fs .write_label ? icon_yes : icon_no ;
}
DialogFeatures::~DialogFeatures()

View File

@ -733,7 +733,7 @@ void GParted_Core::set_device_partitions( Device & device )
break;
}
get_label( partition_temp ) ;
read_label( partition_temp ) ;
partition_temp .messages .insert( partition_temp .messages .end(),
libparted_messages. begin(),
@ -822,15 +822,15 @@ GParted::FILESYSTEM GParted_Core::get_filesystem()
return GParted::FS_UNKNOWN ;
}
void GParted_Core::get_label( Partition & partition )
void GParted_Core::read_label( Partition & partition )
{
if ( partition .type != TYPE_EXTENDED )
{
switch( get_fs( partition .filesystem ) .get_label )
switch( get_fs( partition .filesystem ) .read_label )
{
case FS::EXTERNAL:
if ( set_proper_filesystem( partition .filesystem ) )
p_filesystem ->get_label( partition ) ;
p_filesystem ->read_label( partition ) ;
break ;
case FS::LIBPARTED:
break ;
@ -1209,11 +1209,11 @@ bool GParted_Core::label_partition( const Partition & partition, OperationDetail
bool succes = false ;
if ( partition .type != TYPE_EXTENDED )
{
switch( get_fs( partition .filesystem ) .set_label )
switch( get_fs( partition .filesystem ) .write_label )
{
case FS::EXTERNAL:
succes = set_proper_filesystem( partition .filesystem ) &&
p_filesystem ->set_label( partition, operationdetail .get_last_child() ) ;
p_filesystem ->write_label( partition, operationdetail .get_last_child() ) ;
break ;
case FS::LIBPARTED:
break ;

View File

@ -856,7 +856,7 @@ void Win_GParted::set_valid_operations()
allow_copy( true ) ;
//only allow labelling of real partitions that support labelling
if ( selected_partition .status == GParted::STAT_REAL && fs .set_label )
if ( selected_partition .status == GParted::STAT_REAL && fs .write_label )
allow_label_partition( true ) ;
if ( selected_partition .get_mountpoints() .size() )

View File

@ -29,8 +29,8 @@ FS ext2::get_filesystem_support()
fs .read = FS::EXTERNAL ;
if ( ! Glib::find_program_in_path( "e2label" ) .empty() ) {
fs .get_label = FS::EXTERNAL ;
fs .set_label = FS::EXTERNAL ;
fs .read_label = FS::EXTERNAL ;
fs .write_label = FS::EXTERNAL ;
}
if ( ! Glib::find_program_in_path( "mkfs.ext2" ) .empty() )
@ -83,7 +83,7 @@ void ext2::set_used_sectors( Partition & partition )
}
}
void ext2::get_label( Partition & partition )
void ext2::read_label( Partition & partition )
{
if ( ! Utils::execute_command( "e2label " + partition .get_path(), output, error, true ) )
{
@ -99,7 +99,7 @@ void ext2::get_label( Partition & partition )
}
}
bool ext2::set_label( const Partition & partition, OperationDetail & operationdetail )
bool ext2::write_label( const Partition & partition, OperationDetail & operationdetail )
{
return ! execute_command( "e2label " + partition .get_path() + " \"" + partition .label + "\"", operationdetail ) ;
}

View File

@ -30,8 +30,8 @@ FS ext3::get_filesystem_support()
fs .read = GParted::FS::EXTERNAL ;
if ( ! Glib::find_program_in_path( "e2label" ) .empty() ) {
fs .get_label = FS::EXTERNAL ;
fs .set_label = FS::EXTERNAL ;
fs .read_label = FS::EXTERNAL ;
fs .write_label = FS::EXTERNAL ;
}
if ( ! Glib::find_program_in_path( "mkfs.ext3" ) .empty() )
@ -84,7 +84,7 @@ void ext3::set_used_sectors( Partition & partition )
}
}
void ext3::get_label( Partition & partition )
void ext3::read_label( Partition & partition )
{
if ( ! Utils::execute_command( "e2label " + partition .get_path(), output, error, true ) )
{
@ -100,7 +100,7 @@ void ext3::get_label( Partition & partition )
}
}
bool ext3::set_label( const Partition & partition, OperationDetail & operationdetail )
bool ext3::write_label( const Partition & partition, OperationDetail & operationdetail )
{
return ! execute_command( "e2label " + partition .get_path() + " \"" + partition .label + "\"", operationdetail ) ;
}

View File

@ -44,8 +44,8 @@ FS fat16::get_filesystem_support()
}
if ( ! Glib::find_program_in_path( "mlabel" ) .empty() ) {
fs .get_label = FS::EXTERNAL ;
fs .set_label = FS::EXTERNAL ;
fs .read_label = FS::EXTERNAL ;
fs .write_label = FS::EXTERNAL ;
}
//resizing of start and endpoint are provided by libparted
@ -91,7 +91,7 @@ void fat16::set_used_sectors( Partition & partition )
}
}
void fat16::get_label( Partition & partition )
void fat16::read_label( Partition & partition )
{
//Create mtools config file
char fname[] = "/tmp/gparted-XXXXXXXX" ;
@ -120,7 +120,7 @@ void fat16::get_label( Partition & partition )
err_msg = Utils::delete_mtoolsrc_file( fname );
}
bool fat16::set_label( const Partition & partition, OperationDetail & operationdetail )
bool fat16::write_label( const Partition & partition, OperationDetail & operationdetail )
{
//Create mtools config file
char fname[] = "/tmp/gparted-XXXXXXXX" ;

View File

@ -44,8 +44,8 @@ FS fat32::get_filesystem_support()
}
if ( ! Glib::find_program_in_path( "mlabel" ) .empty() ) {
fs .get_label = FS::EXTERNAL ;
fs .set_label = FS::EXTERNAL ;
fs .read_label = FS::EXTERNAL ;
fs .write_label = FS::EXTERNAL ;
}
//resizing of start and endpoint are provided by libparted
@ -91,7 +91,7 @@ void fat32::set_used_sectors( Partition & partition )
}
}
void fat32::get_label( Partition & partition )
void fat32::read_label( Partition & partition )
{
//Create mtools config file
char fname[] = "/tmp/gparted-XXXXXXXX" ;
@ -120,7 +120,7 @@ void fat32::get_label( Partition & partition )
err_msg = Utils::delete_mtoolsrc_file( fname );
}
bool fat32::set_label( const Partition & partition, OperationDetail & operationdetail )
bool fat32::write_label( const Partition & partition, OperationDetail & operationdetail )
{
//Create mtools config file
char fname[] = "/tmp/gparted-XXXXXXXX" ;

View File

@ -37,7 +37,7 @@ FS hfs::get_filesystem_support()
fs .check = FS::EXTERNAL ;
if ( ! Glib::find_program_in_path( "vol_id" ) .empty() )
fs .get_label = FS::EXTERNAL ;
fs .read_label = FS::EXTERNAL ;
fs .copy = GParted::FS::GPARTED ;
fs .move = GParted::FS::GPARTED ;
@ -51,7 +51,7 @@ void hfs::set_used_sectors( Partition & partition )
{
}
void hfs::get_label( Partition & partition )
void hfs::read_label( Partition & partition )
{
if ( ! Utils::execute_command( "vol_id " + partition .get_path(), output, error, true ) )
{
@ -70,7 +70,7 @@ void hfs::get_label( Partition & partition )
}
}
bool hfs::set_label( const Partition & partition, OperationDetail & operationdetail )
bool hfs::write_label( const Partition & partition, OperationDetail & operationdetail )
{
return true ;
}

View File

@ -37,7 +37,7 @@ FS hfsplus::get_filesystem_support()
fs .check = FS::EXTERNAL ;
if ( ! Glib::find_program_in_path( "vol_id" ) .empty() )
fs .get_label = FS::EXTERNAL ;
fs .read_label = FS::EXTERNAL ;
fs .copy = GParted::FS::GPARTED ;
fs .move = GParted::FS::GPARTED ;
@ -49,7 +49,7 @@ void hfsplus::set_used_sectors( Partition & partition )
{
}
void hfsplus::get_label( Partition & partition )
void hfsplus::read_label( Partition & partition )
{
if ( ! Utils::execute_command( "vol_id " + partition .get_path(), output, error, true ) )
{
@ -68,7 +68,7 @@ void hfsplus::get_label( Partition & partition )
}
}
bool hfsplus::set_label( const Partition & partition, OperationDetail & operationdetail )
bool hfsplus::write_label( const Partition & partition, OperationDetail & operationdetail )
{
return true ;
}

View File

@ -32,8 +32,8 @@ FS jfs::get_filesystem_support()
fs .read = GParted::FS::EXTERNAL ;
if ( ! Glib::find_program_in_path( "jfs_tune" ) .empty() ) {
fs .get_label = FS::EXTERNAL ;
fs .set_label = FS::EXTERNAL ;
fs .read_label = FS::EXTERNAL ;
fs .write_label = FS::EXTERNAL ;
}
if ( ! Glib::find_program_in_path( "mkfs.jfs" ) .empty() )
@ -104,7 +104,7 @@ void jfs::set_used_sectors( Partition & partition )
}
}
void jfs::get_label( Partition & partition )
void jfs::read_label( Partition & partition )
{
if ( ! Utils::execute_command( "jfs_tune -l " + partition .get_path(), output, error, true ) )
{
@ -120,7 +120,7 @@ void jfs::get_label( Partition & partition )
}
}
bool jfs::set_label( const Partition & partition, OperationDetail & operationdetail )
bool jfs::write_label( const Partition & partition, OperationDetail & operationdetail )
{
return ! execute_command( "jfs_tune -L \"" + partition .label + "\" " + partition .get_path(), operationdetail ) ;
}

View File

@ -34,7 +34,7 @@ FS linux_swap::get_filesystem_support()
}
if ( ! Glib::find_program_in_path( "vol_id" ) .empty() )
fs .get_label = FS::EXTERNAL ;
fs .read_label = FS::EXTERNAL ;
fs .copy = GParted::FS::GPARTED ;
fs .move = GParted::FS::GPARTED ;
@ -46,7 +46,7 @@ void linux_swap::set_used_sectors( Partition & partition )
{
}
void linux_swap::get_label( Partition & partition )
void linux_swap::read_label( Partition & partition )
{
if ( ! Utils::execute_command( "vol_id " + partition .get_path(), output, error, true ) )
{
@ -62,7 +62,7 @@ void linux_swap::get_label( Partition & partition )
}
}
bool linux_swap::set_label( const Partition & partition, OperationDetail & operationdetail )
bool linux_swap::write_label( const Partition & partition, OperationDetail & operationdetail )
{
return true ;
}

View File

@ -33,8 +33,8 @@ FS ntfs::get_filesystem_support()
}
if ( ! Glib::find_program_in_path( "ntfslabel" ) .empty() ) {
fs .get_label = FS::EXTERNAL ;
fs .set_label = FS::EXTERNAL ;
fs .read_label = FS::EXTERNAL ;
fs .write_label = FS::EXTERNAL ;
}
if ( ! Glib::find_program_in_path( "mkntfs" ) .empty() )
@ -82,7 +82,7 @@ void ntfs::set_used_sectors( Partition & partition )
}
}
void ntfs::get_label( Partition & partition )
void ntfs::read_label( Partition & partition )
{
if ( ! Utils::execute_command( "ntfslabel --force " + partition .get_path(), output, error, true ) )
{
@ -98,7 +98,7 @@ void ntfs::get_label( Partition & partition )
}
}
bool ntfs::set_label( const Partition & partition, OperationDetail & operationdetail )
bool ntfs::write_label( const Partition & partition, OperationDetail & operationdetail )
{
return ! execute_command( "ntfslabel --force " + partition .get_path() + " \"" + partition .label + "\"", operationdetail ) ;
}

View File

@ -30,7 +30,7 @@ FS reiser4::get_filesystem_support()
fs .read = GParted::FS::EXTERNAL ;
if ( ! Glib::find_program_in_path( "vol_id" ) .empty() )
fs .get_label = FS::EXTERNAL ;
fs .read_label = FS::EXTERNAL ;
if ( ! Glib::find_program_in_path( "mkfs.reiser4" ) .empty() )
fs .create = GParted::FS::EXTERNAL ;
@ -80,7 +80,7 @@ void reiser4::set_used_sectors( Partition & partition )
}
}
void reiser4::get_label( Partition & partition )
void reiser4::read_label( Partition & partition )
{
if ( ! Utils::execute_command( "vol_id " + partition .get_path(), output, error, true ) )
{
@ -96,7 +96,7 @@ void reiser4::get_label( Partition & partition )
}
}
bool reiser4::set_label( const Partition & partition, OperationDetail & operationdetail )
bool reiser4::write_label( const Partition & partition, OperationDetail & operationdetail )
{
return true ;
}

View File

@ -29,11 +29,11 @@ FS reiserfs::get_filesystem_support()
if ( ! Glib::find_program_in_path( "debugreiserfs" ) .empty() )
{
fs .read = GParted::FS::EXTERNAL ;
fs .get_label = FS::EXTERNAL ;
fs .read_label = FS::EXTERNAL ;
}
if ( ! Glib::find_program_in_path( "reiserfstune" ) .empty() )
fs .set_label = FS::EXTERNAL ;
fs .write_label = FS::EXTERNAL ;
if ( ! Glib::find_program_in_path( "mkreiserfs" ) .empty() )
fs .create = GParted::FS::EXTERNAL ;
@ -88,7 +88,7 @@ void reiserfs::set_used_sectors( Partition & partition )
}
}
void reiserfs::get_label( Partition & partition )
void reiserfs::read_label( Partition & partition )
{
//FIXME: i think running debugreiserfs takes a long time on filled filesystems, test for this...
if ( ! Utils::execute_command( "debugreiserfs " + partition .get_path(), output, error, true ) )
@ -105,7 +105,7 @@ void reiserfs::get_label( Partition & partition )
}
}
bool reiserfs::set_label( const Partition & partition, OperationDetail & operationdetail )
bool reiserfs::write_label( const Partition & partition, OperationDetail & operationdetail )
{
return ! execute_command( "reiserfstune --label \"" + partition .label + "\" " + partition .get_path(), operationdetail ) ;
}

View File

@ -37,11 +37,11 @@ void ufs::set_used_sectors( Partition & partition )
{
}
void ufs::get_label( Partition & partition )
void ufs::read_label( Partition & partition )
{
}
bool ufs::set_label( const Partition & partition, OperationDetail & operationdetail )
bool ufs::write_label( const Partition & partition, OperationDetail & operationdetail )
{
return true ;
}

View File

@ -31,11 +31,11 @@ FS xfs::get_filesystem_support()
if ( ! Glib::find_program_in_path( "xfs_db" ) .empty() )
{
fs .read = GParted::FS::EXTERNAL ;
fs .get_label = FS::EXTERNAL ;
fs .read_label = FS::EXTERNAL ;
}
if ( ! Glib::find_program_in_path( "xfs_admin" ) .empty() )
fs .set_label = FS::EXTERNAL ;
fs .write_label = FS::EXTERNAL ;
if ( ! Glib::find_program_in_path( "mkfs.xfs" ) .empty() )
fs .create = GParted::FS::EXTERNAL ;
@ -107,7 +107,7 @@ void xfs::set_used_sectors( Partition & partition )
}
}
void xfs::get_label( Partition & partition )
void xfs::read_label( Partition & partition )
{
if ( ! Utils::execute_command( "xfs_db -r -c 'label' " + partition .get_path(), output, error, true ) )
{
@ -123,7 +123,7 @@ void xfs::get_label( Partition & partition )
}
}
bool xfs::set_label( const Partition & partition, OperationDetail & operationdetail )
bool xfs::write_label( const Partition & partition, OperationDetail & operationdetail )
{
Glib::ustring cmd = "" ;
if( partition .label .empty() )