[gparted] Improve file system detection with fall back to vol_id



commit 22b6b2770314b15c4bf2b3b6529f0e3d980b7653
Author: Curtis Gedak <gedakc gmail com>
Date:   Sat May 2 10:36:57 2009 -0600

    Improve file system detection with fall back to vol_id
---
 src/FS_Info.cc |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/src/FS_Info.cc b/src/FS_Info.cc
index afbbbb1..5b884f2 100644
--- a/src/FS_Info.cc
+++ b/src/FS_Info.cc
@@ -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 ;
 }
 



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