Improve file system detection with fall back to vol_id

This commit is contained in:
Curtis Gedak 2009-05-02 10:36:57 -06:00
parent 835f7dc21b
commit 22b6b27703
1 changed files with 9 additions and 0 deletions

View File

@ -92,6 +92,15 @@ Glib::ustring FS_Info::get_fs_type( const Glib::ustring & path )
//Retrieve TYPE
fs_type = Utils::regexp_label( temp, "TYPE=\"([^\"]*)\"" ) ;
if ( fs_type .empty() && vol_id_found )
{
//Retrieve TYPE using vol_id command
Glib::ustring output, error ;
if ( ! Utils::execute_command( "vol_id " + path, output, error, true ) )
fs_type = Utils::regexp_label( output, "ID_FS_TYPE=([^\n]*)" ) ;
}
return fs_type ;
}