[gparted] Rename member variables and methods in Partition class (#741424)



commit 63aeb150ace06f678241f514c550e51b22d2f823
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date:   Tue Dec 16 22:04:34 2014 +0000

    Rename member variables and methods in Partition class (#741424)
    
    class Partition:
        have_label    -> have_filesystem_label
        label         -> filesystem_label
        label_known() -> filesystem_label_known()
        get_label()   -> get_filesystem_label()
        set_label()   -> set_filesystem_label()
    
    Bug 741424 - Add support for GPT partition names

 include/Partition.h            |   10 +++++-----
 src/Dialog_Partition_Info.cc   |    2 +-
 src/Dialog_Partition_Label.cc  |    2 +-
 src/Dialog_Partition_New.cc    |    4 ++--
 src/GParted_Core.cc            |    8 ++++----
 src/OperationLabelPartition.cc |    4 ++--
 src/Partition.cc               |   22 +++++++++++-----------
 src/TreeView_Detail.cc         |    4 ++--
 src/Win_GParted.cc             |    9 +++++----
 src/btrfs.cc                   |   10 ++++++----
 src/ext2.cc                    |   14 ++++++++------
 src/f2fs.cc                    |    3 ++-
 src/fat16.cc                   |   17 +++++++++--------
 src/hfs.cc                     |    8 ++++----
 src/hfsplus.cc                 |    8 ++++----
 src/jfs.cc                     |    9 +++++----
 src/linux_swap.cc              |   11 +++++++----
 src/nilfs2.cc                  |   12 ++++++++----
 src/ntfs.cc                    |   16 +++++++++-------
 src/reiser4.cc                 |    6 +++---
 src/reiserfs.cc                |   12 +++++++-----
 src/xfs.cc                     |    8 ++++----
 22 files changed, 109 insertions(+), 90 deletions(-)
---
diff --git a/include/Partition.h b/include/Partition.h
index 8fa9361..4b32e1f 100644
--- a/include/Partition.h
+++ b/include/Partition.h
@@ -101,9 +101,9 @@ public:
        std::vector<Glib::ustring> get_mountpoints() const ;
        Sector get_sector() const ;
        bool test_overlap( const Partition & partition ) const ;
-       bool label_known() const ;
-       Glib::ustring get_label() const ;
-       void set_label( const Glib::ustring & label ) ;
+       bool filesystem_label_known() const;
+       Glib::ustring get_filesystem_label() const;
+       void set_filesystem_label( const Glib::ustring & filesystem_label );
 
        bool operator==( const Partition & partition ) const ;
        bool operator!=( const Partition & partition ) const ;
@@ -145,8 +145,8 @@ private:
        
        std::vector<Glib::ustring> paths ;
        std::vector<Glib::ustring> mountpoints ;
-       bool have_label ;
-       Glib::ustring label ;
+       bool have_filesystem_label;
+       Glib::ustring filesystem_label;
 };
 
 }//GParted
diff --git a/src/Dialog_Partition_Info.cc b/src/Dialog_Partition_Info.cc
index 9b33a95..5264f21 100644
--- a/src/Dialog_Partition_Info.cc
+++ b/src/Dialog_Partition_Info.cc
@@ -262,7 +262,7 @@ void Dialog_Partition_Info::Display_Info()
                                1, 2,
                                top, bottom,
                                Gtk::FILL) ;
-               table ->attach( * Utils::mk_label( partition .get_label(), true, false, true ),
+               table ->attach( * Utils::mk_label( partition.get_filesystem_label(), true, false, true ),
                                2, 3,
                                top++, bottom++,
                                Gtk::FILL) ;
diff --git a/src/Dialog_Partition_Label.cc b/src/Dialog_Partition_Label.cc
index 80b20cd..d5b97f4 100644
--- a/src/Dialog_Partition_Label.cc
+++ b/src/Dialog_Partition_Label.cc
@@ -46,7 +46,7 @@ Dialog_Partition_Label::Dialog_Partition_Label( const Partition & partition )
                entry->set_max_length( Utils::get_filesystem_label_maxlength( partition.filesystem ) ) ;
                entry->set_width_chars(20);
                entry->set_activates_default(true);
-               entry->set_text(partition.get_label());
+               entry->set_text(partition.get_filesystem_label());
                entry->select_region(0, entry ->get_text_length());
                //Add entry box to table
                table->attach(*entry,
diff --git a/src/Dialog_Partition_New.cc b/src/Dialog_Partition_New.cc
index ff82879..3f66abf 100644
--- a/src/Dialog_Partition_New.cc
+++ b/src/Dialog_Partition_New.cc
@@ -133,7 +133,7 @@ void Dialog_Partition_New::Set_Data( const Partition & partition,
        //Create Text entry box
        entry .set_width_chars( 20 );
        entry .set_activates_default( true );
-       entry .set_text( partition .get_label() );
+       entry .set_text( partition.get_filesystem_label() );
        entry .select_region( 0, entry .get_text_length() );
        //Add entry box to table
        table_create .attach( entry, 1, 2, 3, 4, Gtk::FILL ) ;
@@ -202,7 +202,7 @@ Partition Dialog_Partition_New::Get_New_Partition( Byte_Value sector_size )
                        selected_partition .inside_extended, false ) ;
 
        //Retrieve Label info
-       part_temp .set_label( Utils::trim( entry .get_text() ) ) ;
+       part_temp.set_filesystem_label( Utils::trim( entry.get_text() ) );
        
        //grow new partition a bit if freespaces are < 1 MiB
        if ( (part_temp.sector_start - selected_partition.sector_start) < (MEBIBYTE / sector_size) ) 
diff --git a/src/GParted_Core.cc b/src/GParted_Core.cc
index 173777f..0e5592f 100644
--- a/src/GParted_Core.cc
+++ b/src/GParted_Core.cc
@@ -1173,12 +1173,12 @@ void GParted_Core::set_device_partitions( Device & device, PedDevice* lp_device,
                        //  Use file system specific method first in an effort to ensure multi-byte
                        //  character sets are properly displayed.
                        read_label( partition_temp ) ;
-                       if ( ! partition_temp .label_known() )
+                       if ( ! partition_temp.filesystem_label_known() )
                        {
                                bool label_found = false ;
                                Glib::ustring label = fs_info .get_label( partition_temp .get_path(), 
label_found ) ;
                                if ( label_found )
-                                       partition_temp .set_label( label ) ;
+                                       partition_temp.set_filesystem_label( label );
                        }
 
                        //Retrieve file system UUID
@@ -2071,13 +2071,13 @@ bool GParted_Core::remove_filesystem( const Partition & partition, OperationDeta
 
 bool GParted_Core::label_partition( const Partition & partition, OperationDetail & operationdetail )   
 {
-       if( partition .get_label() .empty() ) {
+       if( partition.get_filesystem_label().empty() ) {
                operationdetail.add_child( OperationDetail(
                        String::ucompose( _("Clear file system label on %1"), partition.get_path() ) ) );
        } else {
                operationdetail.add_child( OperationDetail(
                        String::ucompose( _("Set file system label to \"%1\" on %2"),
-                                         partition.get_label(), partition.get_path() ) ) );
+                                         partition.get_filesystem_label(), partition.get_path() ) ) );
        }
 
        bool succes = false ;
diff --git a/src/OperationLabelPartition.cc b/src/OperationLabelPartition.cc
index 2a8aea4..2be7d9a 100644
--- a/src/OperationLabelPartition.cc
+++ b/src/OperationLabelPartition.cc
@@ -53,14 +53,14 @@ void OperationLabelPartition::apply_to_visual( std::vector<Partition> & partitio
 
 void OperationLabelPartition::create_description() 
 {
-       if( partition_new .get_label() .empty() ) {
+       if( partition_new.get_filesystem_label().empty() ) {
                /* TO TRANSLATORS: looks like   Clear file system Label on /dev/hda3 */
                description = String::ucompose( _("Clear file system label on %1"),
                                                partition_new.get_path() );
        } else {
                /* TO TRANSLATORS: looks like   Set file system label "My Label" on /dev/hda3 */
                description = String::ucompose( _("Set file system label \"%1\" on %2"),
-                                               partition_new.get_label(),
+                                               partition_new.get_filesystem_label(),
                                                partition_new.get_path() );
        }
 }
diff --git a/src/Partition.cc b/src/Partition.cc
index a42833b..26da4c9 100644
--- a/src/Partition.cc
+++ b/src/Partition.cc
@@ -40,7 +40,7 @@ void Partition::Reset()
        type = GParted::TYPE_UNALLOCATED ;
        alignment = ALIGN_STRICT ;
        filesystem = GParted::FS_UNALLOCATED ;
-       have_label = false ;
+       have_filesystem_label = false;
        uuid .clear() ;
        partition_number = sector_start = sector_end = sectors_used = sectors_unused = -1;
        sectors_unallocated = 0 ;
@@ -248,23 +248,23 @@ std::vector<Glib::ustring> Partition::get_paths() const
        return paths ;
 }
 
-bool Partition::label_known() const
+bool Partition::filesystem_label_known() const
 {
-       return have_label ;
+       return have_filesystem_label;
 }
 
-//Return the label or "" if label is unknown.
-Glib::ustring Partition::get_label() const
+//Return the file system label or "" if unknown.
+Glib::ustring Partition::get_filesystem_label() const
 {
-       if ( have_label )
-               return label ;
-       return "" ;
+       if ( have_filesystem_label )
+               return filesystem_label;
+       return "";
 }
 
-void Partition::set_label( const Glib::ustring & label )
+void Partition::set_filesystem_label( const Glib::ustring & filesystem_label )
 {
-       this ->label = label ;
-       have_label = true ;
+       this->filesystem_label = filesystem_label;
+       have_filesystem_label = true;
 }
 
 bool Partition::operator==( const Partition & partition ) const
diff --git a/src/TreeView_Detail.cc b/src/TreeView_Detail.cc
index 2bd2227..1101dfc 100644
--- a/src/TreeView_Detail.cc
+++ b/src/TreeView_Detail.cc
@@ -126,7 +126,7 @@ void TreeView_Detail::load_partitions( const std::vector<Partition> & partitions
                if ( partitions[ i ] .get_mountpoints() .size() )
                        mountpoints = true ;
                                        
-               if ( ! partitions[ i ] .get_label() .empty() )
+               if ( ! partitions[ i ].get_filesystem_label().empty() )
                        labels = true ;
        }
 }
@@ -183,7 +183,7 @@ void TreeView_Detail::create_row( const Gtk::TreeRow & treerow, const Partition
        treerow[ treeview_detail_columns .mountpoint ] = Glib::build_path( ", ", partition .get_mountpoints() 
) ;
 
        //label
-       treerow[ treeview_detail_columns .label ] = partition .get_label() ;
+       treerow[ treeview_detail_columns .label ] = partition.get_filesystem_label();
                
        //size
        treerow[ treeview_detail_columns .size ] = Utils::format_size( partition .get_sector_length(), 
partition .sector_size ) ;
diff --git a/src/Win_GParted.cc b/src/Win_GParted.cc
index c4b55c5..b03e92e 100644
--- a/src/Win_GParted.cc
+++ b/src/Win_GParted.cc
@@ -747,7 +747,8 @@ bool Win_GParted::Merge_Operations( unsigned int first, unsigned int second )
                  operations[ first ]->partition_new == operations[ second ]->partition_original
                )
        {
-               operations[ first ]->partition_new.set_label( operations[ second ]->partition_new 
.get_label() ) ;
+               operations[ first ]->partition_new.set_filesystem_label(
+                                       operations[ second ]->partition_new.get_filesystem_label() );
                operations[ first ]->create_description() ;
                remove_operation( second );
 
@@ -1728,7 +1729,7 @@ void Win_GParted::activate_paste()
                Partition partition_new = selected_partition ;
                partition_new .alignment = ALIGN_STRICT ;
                partition_new .filesystem = copied_partition .filesystem ;
-               partition_new .set_label( copied_partition .get_label() ) ;
+               partition_new.set_filesystem_label( copied_partition.get_filesystem_label() );
                partition_new .uuid = copied_partition .uuid ;
                partition_new .color = copied_partition .color ;
                Sector new_size = partition_new .get_sector_length() ;
@@ -2476,13 +2477,13 @@ void Win_GParted::activate_label_partition()
        dialog .set_transient_for( *this );
 
        if (    ( dialog .run() == Gtk::RESPONSE_OK )
-            && ( dialog .get_new_label() != selected_partition .get_label() ) )
+            && ( dialog.get_new_label() != selected_partition.get_filesystem_label() ) )
        {
                dialog .hide() ;
                //Make a duplicate of the selected partition (used in UNDO)
                Partition part_temp = selected_partition ;
 
-               part_temp .set_label( dialog .get_new_label() ) ;
+               part_temp.set_filesystem_label( dialog.get_new_label() );
 
                Operation * operation = new OperationLabelPartition( devices[ current_device ],
                                                                        selected_partition, part_temp ) ;
diff --git a/src/btrfs.cc b/src/btrfs.cc
index ba27f9c..b3f141f 100644
--- a/src/btrfs.cc
+++ b/src/btrfs.cc
@@ -146,7 +146,8 @@ bool btrfs::is_busy( const Glib::ustring & path )
 
 bool btrfs::create( const Partition & new_partition, OperationDetail & operationdetail )
 {
-       return (! execute_command( "mkfs.btrfs -L \"" + new_partition .get_label() + "\" " + new_partition 
.get_path(), operationdetail ) );
+       return ! execute_command( "mkfs.btrfs -L \"" + new_partition.get_filesystem_label() + "\" " +
+                                 new_partition.get_path(), operationdetail );
 }
 
 bool btrfs::check_repair( const Partition & partition, OperationDetail & operationdetail )
@@ -285,7 +286,8 @@ void btrfs::set_used_sectors( Partition & partition )
 
 bool btrfs::write_label( const Partition & partition, OperationDetail & operationdetail )
 {
-       return ! execute_command( "btrfs filesystem label " + partition .get_path() + " \"" + partition 
.get_label() + "\"", operationdetail ) ;
+       return ! execute_command( "btrfs filesystem label " + partition.get_path() +
+                                 " \"" + partition.get_filesystem_label() + "\"", operationdetail );
 }
 
 bool btrfs::resize( const Partition & partition_new, OperationDetail & operationdetail, bool fill_partition )
@@ -375,7 +377,7 @@ void btrfs::read_label( Partition & partition )
        {
                //Indistinguishable cases of either no label or the label is actually set
                //  to "none".  Assume no label case.
-               partition .set_label( "" ) ;
+               partition.set_filesystem_label( "" );
        }
        else
        {
@@ -386,7 +388,7 @@ void btrfs::read_label( Partition & partition )
                        label = Utils::regexp_label( output, "^Label: (.*)  uuid:" ) ;
 
                if ( ! label .empty() )
-                       partition .set_label( label ) ;
+                       partition.set_filesystem_label( label );
                else
                {
                        if ( ! output .empty() )
diff --git a/src/ext2.cc b/src/ext2.cc
index 4cf2523..f4147aa 100644
--- a/src/ext2.cc
+++ b/src/ext2.cc
@@ -177,7 +177,7 @@ void ext2::read_label( Partition & partition )
 {
        if ( ! Utils::execute_command( label_cmd + " " + partition .get_path(), output, error, true ) )
        {
-               partition .set_label( Utils::trim( output ) ) ;
+               partition.set_filesystem_label( Utils::trim( output ) );
        }
        else
        {
@@ -191,7 +191,8 @@ void ext2::read_label( Partition & partition )
 
 bool ext2::write_label( const Partition & partition, OperationDetail & operationdetail )
 {
-       return ! execute_command( label_cmd + " " + partition .get_path() + " \"" + partition .get_label() + 
"\"", operationdetail ) ;
+       return ! execute_command( label_cmd + " " + partition.get_path() +
+                                 " \"" + partition.get_filesystem_label() + "\"", operationdetail ) ;
 }
 
 void ext2::read_uuid( Partition & partition )
@@ -217,10 +218,11 @@ bool ext2::write_uuid( const Partition & partition, OperationDetail & operationd
 
 bool ext2::create( const Partition & new_partition, OperationDetail & operationdetail )
 {
-       return ! execute_command( mkfs_cmd + " -L \"" + new_partition.get_label() + "\" " + 
new_partition.get_path(),
-                                 operationdetail,
-                                 false,
-                                 true );
+       return ! execute_command( mkfs_cmd + " -L \"" + new_partition.get_filesystem_label() + "\" " +
+                                 new_partition.get_path(),
+                                 operationdetail,
+                                 false,
+                                 true );
 }
 
 bool ext2::resize( const Partition & partition_new, OperationDetail & operationdetail, bool fill_partition )
diff --git a/src/f2fs.cc b/src/f2fs.cc
index 61a5131..cf66bf3 100644
--- a/src/f2fs.cc
+++ b/src/f2fs.cc
@@ -43,7 +43,8 @@ FS f2fs::get_filesystem_support()
 
 bool f2fs::create( const Partition & new_partition, OperationDetail & operationdetail )
 {
-       return (! execute_command( "mkfs.f2fs -l \"" + new_partition .get_label() + "\" " + new_partition 
.get_path(), operationdetail ) );
+       return ! execute_command( "mkfs.f2fs -l \"" + new_partition.get_filesystem_label() + "\" " +
+                                 new_partition .get_path(), operationdetail );
 }
 
 } //GParted
diff --git a/src/fat16.cc b/src/fat16.cc
index 772658c..2e46601 100644
--- a/src/fat16.cc
+++ b/src/fat16.cc
@@ -175,7 +175,7 @@ void fat16::read_label( Partition & partition )
 {
        if ( ! Utils::execute_command( "mlabel -s :: -i " + partition.get_path(), output, error, true ) )
        {
-               partition .set_label( Utils::trim( Utils::regexp_label( output, "Volume label is ([^(]*)" ) ) 
) ;
+               partition.set_filesystem_label( Utils::trim( Utils::regexp_label( output, "Volume label is 
([^(]*)" ) ) );
        }
        else
        {
@@ -190,10 +190,10 @@ void fat16::read_label( Partition & partition )
 bool fat16::write_label( const Partition & partition, OperationDetail & operationdetail )
 {
        Glib::ustring cmd = "" ;
-       if ( partition .get_label() .empty() )
+       if ( partition.get_filesystem_label().empty() )
                cmd = "mlabel -c :: -i " + partition.get_path();
        else
-               cmd = "mlabel ::\"" + pad_label( partition.get_label() ) + "\" -i " + partition.get_path();
+               cmd = "mlabel ::\"" + pad_label( partition.get_filesystem_label() ) + "\" -i " + 
partition.get_path();
 
        operationdetail .add_child( OperationDetail( cmd, STATUS_NONE, FONT_BOLD_ITALIC ) ) ;
 
@@ -248,11 +248,12 @@ bool fat16::write_uuid( const Partition & partition, OperationDetail & operation
 bool fat16::create( const Partition & new_partition, OperationDetail & operationdetail )
 {
        Glib::ustring fat_size = specific_type == FS_FAT16 ? "16" : "32" ;
-       return ! execute_command( create_cmd + " -F" + fat_size + " -v -I -n \"" + pad_label( new_partition 
.get_label() ) +
-                                 "\" " + new_partition .get_path(),
-                                 operationdetail,
-                                 false,
-                                 true );
+       return ! execute_command( create_cmd + " -F" + fat_size + " -v -I -n \"" +
+                                 pad_label( new_partition.get_filesystem_label() ) + "\" " +
+                                 new_partition.get_path(),
+                                 operationdetail,
+                                 false,
+                                 true );
 }
 
 bool fat16::check_repair( const Partition & partition, OperationDetail & operationdetail )
diff --git a/src/hfs.cc b/src/hfs.cc
index 0e4d13a..33dd12b 100644
--- a/src/hfs.cc
+++ b/src/hfs.cc
@@ -61,9 +61,9 @@ void hfs::read_label( Partition & partition )
                Glib::ustring label = Utils::regexp_label( output, "ID_FS_LABEL=([^\n]*)" ) ;
                //FIXME: find a better way to see if label is empty.. imagine someone uses 'untitled' as 
label.... ;)
                if ( label != "untitled" )
-                       partition .set_label( label ) ;
+                       partition.set_filesystem_label( label );
                else
-                       partition .set_label( "" ) ;
+                       partition.set_filesystem_label( "" );
        }
        else
        {
@@ -78,10 +78,10 @@ void hfs::read_label( Partition & partition )
 bool hfs::create( const Partition & new_partition, OperationDetail & operationdetail )
 {
        Glib::ustring cmd = "";
-       if( new_partition .get_label() .empty() )
+       if( new_partition.get_filesystem_label().empty() )
                cmd = "hformat " + new_partition .get_path() ;
        else
-               cmd = "hformat -l \"" + new_partition .get_label() + "\" " + new_partition .get_path() ;
+               cmd = "hformat -l \"" + new_partition.get_filesystem_label() + "\" " + 
new_partition.get_path();
        return ! execute_command( cmd , operationdetail ) ;
 }
 
diff --git a/src/hfsplus.cc b/src/hfsplus.cc
index bdeed34..545c90e 100644
--- a/src/hfsplus.cc
+++ b/src/hfsplus.cc
@@ -59,9 +59,9 @@ void hfsplus::read_label( Partition & partition )
                Glib::ustring label = Utils::regexp_label( output, "ID_FS_LABEL=([^\n]*)" ) ;
                //FIXME: find a better way to see if label is empty.. imagine someone uses 'untitled' as 
label.... ;)
                if ( label != "untitled" )
-                       partition .set_label( label ) ;
+                       partition.set_filesystem_label( label );
                else
-                       partition .set_label( "" ) ;
+                       partition.set_filesystem_label( "" );
        }
        else
        {
@@ -76,10 +76,10 @@ void hfsplus::read_label( Partition & partition )
 bool hfsplus::create( const Partition & new_partition, OperationDetail & operationdetail )
 {
        Glib::ustring cmd = "";
-       if( new_partition .get_label() .empty() )
+       if( new_partition.get_filesystem_label().empty() )
                cmd = "mkfs.hfsplus " + new_partition .get_path() ;
        else
-               cmd = "mkfs.hfsplus -v \"" + new_partition .get_label() + "\" " + new_partition .get_path() ;
+               cmd = "mkfs.hfsplus -v \"" + new_partition.get_filesystem_label() + "\" " + 
new_partition.get_path();
        return ! execute_command( cmd , operationdetail ) ;
 }
 
diff --git a/src/jfs.cc b/src/jfs.cc
index 8207b83..83d1254 100644
--- a/src/jfs.cc
+++ b/src/jfs.cc
@@ -117,7 +117,7 @@ void jfs::read_label( Partition & partition )
 {
        if ( ! Utils::execute_command( "jfs_tune -l " + partition .get_path(), output, error, true ) )
        {
-               partition .set_label( Utils::regexp_label( output, "^Volume label:[\t ]*'(.*)'" ) ) ;
+               partition.set_filesystem_label( Utils::regexp_label( output, "^Volume label:[\t ]*'(.*)'" ) );
        }
        else
        {
@@ -131,7 +131,8 @@ void jfs::read_label( Partition & partition )
 
 bool jfs::write_label( const Partition & partition, OperationDetail & operationdetail )
 {
-       return ! execute_command( "jfs_tune -L \"" + partition .get_label() + "\" " + partition .get_path(), 
operationdetail ) ;
+       return ! execute_command( "jfs_tune -L \"" + partition.get_filesystem_label() + "\" " + 
partition.get_path(),
+                                 operationdetail );
 }
 
 void jfs::read_uuid( Partition & partition )
@@ -157,8 +158,8 @@ bool jfs::write_uuid( const Partition & partition, OperationDetail & operationde
 
 bool jfs::create( const Partition & new_partition, OperationDetail & operationdetail )
 {
-       return ! execute_command( "mkfs.jfs -q -L \"" + new_partition.get_label() +
-                                 "\" " + new_partition.get_path(), operationdetail,
+       return ! execute_command( "mkfs.jfs -q -L \"" + new_partition.get_filesystem_label() + "\" " +
+                                 new_partition.get_path(), operationdetail,
                                  false, true );
 }
 
diff --git a/src/linux_swap.cc b/src/linux_swap.cc
index 11f4c72..385a9b4 100644
--- a/src/linux_swap.cc
+++ b/src/linux_swap.cc
@@ -118,7 +118,7 @@ void linux_swap::read_label( Partition & partition )
 {
        if ( ! Utils::execute_command( "swaplabel " + partition .get_path(), output, error, true ) )
        {
-               partition .set_label( Utils::regexp_label( output, "^LABEL:[[:blank:]]*(.*)$" ) ) ;
+               partition.set_filesystem_label( Utils::regexp_label( output, "^LABEL:[[:blank:]]*(.*)$" ) );
        }
        else
        {
@@ -132,7 +132,8 @@ void linux_swap::read_label( Partition & partition )
 
 bool linux_swap::write_label( const Partition & partition, OperationDetail & operationdetail )
 {
-       return ! execute_command( "swaplabel -L \"" + partition .get_label() + "\" " + partition .get_path(), 
operationdetail ) ;
+       return ! execute_command( "swaplabel -L \"" + partition.get_filesystem_label() + "\" " + 
partition.get_path(),
+                                 operationdetail );
 }
 
 void linux_swap::read_uuid( Partition & partition )
@@ -159,7 +160,9 @@ bool linux_swap::write_uuid( const Partition & partition, OperationDetail & oper
 
 bool linux_swap::create( const Partition & new_partition, OperationDetail & operationdetail )
 {
-       return ! execute_command( "mkswap -L \"" + new_partition .get_label() + "\" " + new_partition 
.get_path(), operationdetail ) ;
+       return ! execute_command( "mkswap -L \"" + new_partition.get_filesystem_label() + "\" " +
+                                 new_partition.get_path(),
+                                 operationdetail );
 }
 
 bool linux_swap::resize( const Partition & partition_new, OperationDetail & operationdetail, bool 
fill_partition )
@@ -169,7 +172,7 @@ bool linux_swap::resize( const Partition & partition_new, OperationDetail & oper
                String::ucompose( _("create new %1 file system"), Utils::get_filesystem_string( FS_LINUX_SWAP 
) ) ) ) ;
 
        //Maintain label and uuid when recreating swap
-       Glib::ustring command = "mkswap -L \"" + partition_new .get_label() + "\" " ;
+       Glib::ustring command = "mkswap -L \"" + partition_new.get_filesystem_label() + "\" ";
        if ( ! partition_new .uuid .empty() )
                command +=  " -U \"" + partition_new .uuid + "\" " ;
        command += partition_new .get_path() ;
diff --git a/src/nilfs2.cc b/src/nilfs2.cc
index 1acfc71..1ef04e4 100644
--- a/src/nilfs2.cc
+++ b/src/nilfs2.cc
@@ -119,9 +119,9 @@ void nilfs2::read_label( Partition & partition )
        {
                Glib::ustring label = Utils::regexp_label( output, "^Filesystem volume name:[\t ]*(.*)$" ) ;
                if ( label != "(none)" )
-                       partition .set_label( label ) ;
+                       partition.set_filesystem_label( label );
                else
-                       partition .set_label( "" ) ;
+                       partition.set_filesystem_label( "" );
        }
        else
        {
@@ -135,7 +135,9 @@ void nilfs2::read_label( Partition & partition )
 
 bool nilfs2::write_label( const Partition & partition, OperationDetail & operationdetail )
 {
-       return ! execute_command( "nilfs-tune -L \"" + partition .get_label() + "\" " + partition 
.get_path(), operationdetail ) ;
+       return ! execute_command( "nilfs-tune -L \"" + partition.get_filesystem_label() + "\" " +
+                                 partition.get_path(),
+                                 operationdetail );
 }
 
 void nilfs2::read_uuid( Partition & partition )
@@ -161,7 +163,9 @@ bool nilfs2::write_uuid( const Partition & partition, OperationDetail & operatio
 
 bool nilfs2::create( const Partition & new_partition, OperationDetail & operationdetail )
 {
-       return ! execute_command( "mkfs.nilfs2 -L \"" + new_partition .get_label() + "\" " + new_partition 
.get_path(), operationdetail ) ;
+       return ! execute_command( "mkfs.nilfs2 -L \"" + new_partition.get_filesystem_label() + "\" " +
+                                 new_partition.get_path(),
+                                 operationdetail );
 }
 
 bool nilfs2::resize( const Partition & partition_new, OperationDetail & operationdetail, bool fill_partition 
)
diff --git a/src/ntfs.cc b/src/ntfs.cc
index 1cccd23..e25e0a3 100644
--- a/src/ntfs.cc
+++ b/src/ntfs.cc
@@ -159,7 +159,7 @@ void ntfs::read_label( Partition & partition )
 {
        if ( ! Utils::execute_command( "ntfslabel --force " + partition .get_path(), output, error, false ) )
        {
-               partition .set_label( Utils::trim( output ) ) ;
+               partition.set_filesystem_label( Utils::trim( output ) );
        }
        else
        {
@@ -173,7 +173,9 @@ void ntfs::read_label( Partition & partition )
 
 bool ntfs::write_label( const Partition & partition, OperationDetail & operationdetail )
 {
-       return ! execute_command( "ntfslabel --force " + partition .get_path() + " \"" + partition 
.get_label() + "\"", operationdetail ) ;
+       return ! execute_command( "ntfslabel --force " + partition.get_path() +
+                                 " \"" + partition.get_filesystem_label() + "\"",
+                                 operationdetail );
 }
 
 void ntfs::read_uuid( Partition & partition )
@@ -192,11 +194,11 @@ bool ntfs::write_uuid( const Partition & partition, OperationDetail & operationd
 
 bool ntfs::create( const Partition & new_partition, OperationDetail & operationdetail )
 {
-       return ! execute_command( "mkntfs -Q -v -L \"" + new_partition.get_label() +
-                                 "\" " + new_partition.get_path(),
-                                 operationdetail,
-                                 false,
-                                 true );
+       return ! execute_command( "mkntfs -Q -v -L \"" + new_partition.get_filesystem_label() + "\" " +
+                                 new_partition.get_path(),
+                                 operationdetail,
+                                 false,
+                                 true );
 }
 
 bool ntfs::resize( const Partition & partition_new, OperationDetail & operationdetail, bool fill_partition )
diff --git a/src/reiser4.cc b/src/reiser4.cc
index 657b01c..5874b1a 100644
--- a/src/reiser4.cc
+++ b/src/reiser4.cc
@@ -106,9 +106,9 @@ void reiser4::read_label( Partition & partition )
                if ( label .length() > maxlen )
                        label .resize( maxlen ) ;
                if ( label != "<none>" )
-                       partition .set_label( label ) ;
+                       partition.set_filesystem_label( label );
                else
-                       partition .set_label( "" ) ;
+                       partition.set_filesystem_label( "" );
        }
        else
        {
@@ -138,7 +138,7 @@ void reiser4::read_uuid( Partition & partition )
 
 bool reiser4::create( const Partition & new_partition, OperationDetail & operationdetail )
 {
-       return ! execute_command( "mkfs.reiser4 --force --yes --label \"" + new_partition.get_label() + "\" " 
+
+       return ! execute_command( "mkfs.reiser4 --force --yes --label \"" + 
new_partition.get_filesystem_label() + "\" " +
                                  new_partition.get_path(), operationdetail,
                                  false, true );
 }
diff --git a/src/reiserfs.cc b/src/reiserfs.cc
index a563bf4..adb0477 100644
--- a/src/reiserfs.cc
+++ b/src/reiserfs.cc
@@ -117,7 +117,7 @@ void reiserfs::read_label( Partition & partition )
 {
        if ( ! Utils::execute_command( "debugreiserfs " + partition .get_path(), output, error, true ) )
        {
-               partition .set_label( Utils::regexp_label( output, "^label:[\t ]*(.*)$" ) ) ;
+               partition.set_filesystem_label( Utils::regexp_label( output, "^label:[\t ]*(.*)$" ) );
        }
        else
        {
@@ -131,7 +131,9 @@ void reiserfs::read_label( Partition & partition )
        
 bool reiserfs::write_label( const Partition & partition, OperationDetail & operationdetail )
 {
-       return ! execute_command( "reiserfstune --label \"" + partition .get_label() + "\" " + partition 
.get_path(), operationdetail ) ;
+       return ! execute_command( "reiserfstune --label \"" + partition.get_filesystem_label() + "\" " +
+                                 partition.get_path(),
+                                 operationdetail );
 }
 
 void reiserfs::read_uuid( Partition & partition )
@@ -157,9 +159,9 @@ bool reiserfs::write_uuid( const Partition & partition, OperationDetail & operat
 
 bool reiserfs::create( const Partition & new_partition, OperationDetail & operationdetail )
 {
-       return ! execute_command( "mkreiserfs -f --label \"" + new_partition.get_label() +
-                                 "\" " + new_partition.get_path(), operationdetail,
-                                 false, true );
+       return ! execute_command( "mkreiserfs -f --label \"" + new_partition.get_filesystem_label() + "\" " +
+                                 new_partition.get_path(),
+                                 operationdetail, false, true );
 }
 
 bool reiserfs::resize( const Partition & partition_new, OperationDetail & operationdetail, bool 
fill_partition )
diff --git a/src/xfs.cc b/src/xfs.cc
index 8268a43..33b9bfe 100644
--- a/src/xfs.cc
+++ b/src/xfs.cc
@@ -127,7 +127,7 @@ void xfs::read_label( Partition & partition )
 {
        if ( ! Utils::execute_command( "xfs_db -r -c 'label' " + partition .get_path(), output, error, true ) 
)
        {
-               partition .set_label( Utils::regexp_label( output, "^label = \"(.*)\"" ) ) ;
+               partition.set_filesystem_label( Utils::regexp_label( output, "^label = \"(.*)\"" ) );
        }
        else
        {
@@ -142,10 +142,10 @@ void xfs::read_label( Partition & partition )
 bool xfs::write_label( const Partition & partition, OperationDetail & operationdetail )
 {
        Glib::ustring cmd = "" ;
-       if( partition .get_label() .empty() )
+       if( partition.get_filesystem_label().empty() )
                cmd = "xfs_admin -L -- " + partition .get_path() ;
        else
-               cmd = "xfs_admin -L \"" + partition .get_label() + "\" " + partition .get_path() ;
+               cmd = "xfs_admin -L \"" + partition.get_filesystem_label() + "\" " + partition.get_path();
        return ! execute_command( cmd, operationdetail ) ;
 }
 
@@ -172,7 +172,7 @@ bool xfs::write_uuid( const Partition & partition, OperationDetail & operationde
 
 bool xfs::create( const Partition & new_partition, OperationDetail & operationdetail )
 {
-       return ! execute_command( "mkfs.xfs -f -L \"" + new_partition.get_label() +
+       return ! execute_command( "mkfs.xfs -f -L \"" + new_partition.get_filesystem_label() + "\" " +
                                  "\" " + new_partition.get_path(),
                                  operationdetail,
                                  false,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]