diff --git a/include/GParted_Core.h b/include/GParted_Core.h index afbef922..2dfa665e 100644 --- a/include/GParted_Core.h +++ b/include/GParted_Core.h @@ -60,7 +60,8 @@ public: Glib::ustring get_libparted_version() ; Glib::ustring get_thread_status_message() ; - FileSystem * get_filesystem_object( FILESYSTEM filesystem ); + static FileSystem * get_filesystem_object( FILESYSTEM filesystem ); + static bool supported_filesystem( FILESYSTEM fstype ); static bool filesystem_resize_disallowed( const Partition & partition ) ; private: //detectionstuff.. @@ -191,7 +192,7 @@ private: static PedExceptionOption ped_exception_handler( PedException * e ) ; std::vector FILESYSTEMS ; - std::map< FILESYSTEM, FileSystem * > FILESYSTEM_MAP ; + static std::map< FILESYSTEM, FileSystem * > FILESYSTEM_MAP ; std::vector flags; std::vector device_paths ; bool probe_devices ; diff --git a/src/GParted_Core.cc b/src/GParted_Core.cc index 12e796e2..c893a88c 100644 --- a/src/GParted_Core.cc +++ b/src/GParted_Core.cc @@ -3217,6 +3217,12 @@ FileSystem * GParted_Core::get_filesystem_object( FILESYSTEM filesystem ) return NULL ; } +// Return true for file systems with an implementation class, false otherwise +bool GParted_Core::supported_filesystem( FILESYSTEM fstype ) +{ + return get_filesystem_object( fstype ) != NULL; +} + bool GParted_Core::filesystem_resize_disallowed( const Partition & partition ) { if ( partition .filesystem == FS_LVM2_PV ) @@ -3699,4 +3705,6 @@ GParted_Core::~GParted_Core() Glib::Thread *GParted_Core::mainthread; +std::map< FILESYSTEM, FileSystem * > GParted_Core::FILESYSTEM_MAP; + } //GParted