Changed get_label() to use vol_id instead of debugfs.reiser4
svn path=/trunk/; revision=948
This commit is contained in:
parent
5cb29070bf
commit
bd0a37e3c5
|
@ -1,5 +1,8 @@
|
|||
2008-10-31 Curtis Gedak <gedakc@gmail.com>
|
||||
|
||||
* 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 <gedakc@gmail.com>
|
||||
|
|
6
README
6
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.
|
||||
|
|
|
@ -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 '<none>' as label.... ;)
|
||||
if( label != "<none>" )
|
||||
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 ) ;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue