Switch to using debugfs.reiser4 to read the label

Vol_id command was deprecated in May 2009 and superseded by the blkid
command.  Replace the generic vol_id command with the file system
specific debugfs.reiser4 command to read the file system label.
Debugfs.reiser4 will exist as it's already required to read the file
system usage and UUID.
This commit is contained in:
Mike Fleetwood 2012-09-23 20:14:57 +01:00 committed by Curtis Gedak
parent 4f235ecb06
commit e282b78b4a
1 changed files with 4 additions and 6 deletions

View File

@ -30,12 +30,10 @@ FS reiser4::get_filesystem_support()
if ( ! Glib::find_program_in_path( "debugfs.reiser4" ) .empty() )
{
fs .read = GParted::FS::EXTERNAL ;
fs .read_label = FS::EXTERNAL ;
fs .read_uuid = GParted::FS::EXTERNAL ;
}
if ( ! Glib::find_program_in_path( "vol_id" ) .empty() )
fs .read_label = FS::EXTERNAL ;
if ( ! Glib::find_program_in_path( "mkfs.reiser4" ) .empty() )
fs .create = GParted::FS::EXTERNAL ;
@ -94,9 +92,9 @@ void reiser4::set_used_sectors( Partition & partition )
void reiser4::read_label( Partition & partition )
{
if ( ! Utils::execute_command( "vol_id " + partition .get_path(), output, error, true ) )
if ( ! Utils::execute_command( "debugfs.reiser4 " + partition .get_path(), output, error, true ) )
{
partition .label = Utils::regexp_label( output, "ID_FS_LABEL=([^\n]*)" ) ;
partition .label = Utils::regexp_label( output, "^label:[[:blank:]]*(.*)$" ) ;
}
else
{