diff --git a/ChangeLog b/ChangeLog index 88e8620e..61b10830 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2008-10-31 Curtis Gedak + * src/reiser4.cc, + README: Changed get_label() to use vol_id instead of debugfs.reiser4 + * src/GParted_Core.cc: Changed thread status messages to be unique 2008-10-30 Curtis Gedak diff --git a/README b/README index 894d02c8..1ac18cc4 100644 --- a/README +++ b/README @@ -116,5 +116,7 @@ Optional packages include: reiser4progs reiserfsprogs xfsprogs - NOTE: If the vol_id command is in the search PATH, it will be - used to read linux-swap, hfs, and hfs+ file system volume labels. + + NOTE: If the vol_id command is in the search PATH, it will be used + to read linux-swap, reiser4, hfs, and hfs+ file system + volume labels. diff --git a/src/reiser4.cc b/src/reiser4.cc index 8738f96a..4294860d 100644 --- a/src/reiser4.cc +++ b/src/reiser4.cc @@ -27,10 +27,10 @@ FS reiser4::get_filesystem_support() fs .filesystem = GParted::FS_REISER4 ; if ( ! Glib::find_program_in_path( "debugfs.reiser4" ) .empty() ) - { fs .read = GParted::FS::EXTERNAL ; + + if ( ! Glib::find_program_in_path( "vol_id" ) .empty() ) fs .get_label = FS::EXTERNAL ; - } if ( ! Glib::find_program_in_path( "mkfs.reiser4" ) .empty() ) fs .create = GParted::FS::EXTERNAL ; @@ -82,18 +82,15 @@ void reiser4::set_used_sectors( Partition & partition ) void reiser4::get_label( Partition & partition ) { - if ( ! Utils::execute_command( "debugfs.reiser4 -f " + partition .get_path(), output, error, true ) ) + if ( ! Utils::execute_command( "vol_id " + partition .get_path(), output, error, true ) ) { - Glib::ustring label = Utils::regexp_label( output, "^label:[\t ]*([^!]*)$" ) ; - //FIXME: find a better way to see if label is empty.. imagine someone uses '' as label.... ;) - if( label != "" ) - partition .label = label ; + partition .label = Utils::regexp_label( output, "ID_FS_LABEL=([^\n]*)" ) ; } else { if ( ! output .empty() ) partition .messages .push_back( output ) ; - + if ( ! error .empty() ) partition .messages .push_back( error ) ; }