From 71715a1c2924498f432bdc9921d17274a307d58b Mon Sep 17 00:00:00 2001 From: Mike Fleetwood Date: Sat, 25 Jul 2015 15:51:32 +0100 Subject: [PATCH] Add detection of ZFS (#752862) Requires blkid from util-linux >= 2.15, released May 2009, for detection of ZFS. Bug 752862 - ZFS is not recognised --- include/Utils.h | 5 +++-- src/GParted_Core.cc | 2 ++ src/Utils.cc | 2 ++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/include/Utils.h b/include/Utils.h index 573d1cda..b0a9fd09 100644 --- a/include/Utils.h +++ b/include/Utils.h @@ -91,10 +91,11 @@ enum FILESYSTEM FS_LINUX_SWRAID = 26, FS_LINUX_SWSUSPEND = 27, FS_REFS = 28, + FS_ZFS = 29, // Partition space usage colours - FS_USED = 29, - FS_UNUSED = 30 + FS_USED = 30, + FS_UNUSED = 31 } ; enum SIZE_UNIT diff --git a/src/GParted_Core.cc b/src/GParted_Core.cc index 1679ac9b..be8d1739 100644 --- a/src/GParted_Core.cc +++ b/src/GParted_Core.cc @@ -1612,6 +1612,8 @@ FILESYSTEM GParted_Core::detect_filesystem( PedDevice * lp_device, PedPartition return FS_LINUX_SWSUSPEND ; else if ( fsname == "ReFS" ) return FS_REFS; + else if ( fsname == "zfs_member" ) + return FS_ZFS; } // Fallback to GParted simple internal file system detection diff --git a/src/Utils.cc b/src/Utils.cc index b6996831..4f65f636 100644 --- a/src/Utils.cc +++ b/src/Utils.cc @@ -108,6 +108,7 @@ Glib::ustring Utils::get_color( FILESYSTEM filesystem ) case FS_LINUX_SWRAID : return "#5A4733" ; // ~ dark brown case FS_LINUX_SWSUSPEND : return "#884631" ; //red dark case FS_REFS : return "#1FC48D" ; // ~ medium aquamarine + case FS_ZFS : return "#CC763D" ; // ~ darker orange default : return "#000000" ; } @@ -283,6 +284,7 @@ Glib::ustring Utils::get_filesystem_string( FILESYSTEM filesystem ) case FS_LINUX_SWRAID : return "linux-raid" ; case FS_LINUX_SWSUSPEND : return "linux-suspend" ; case FS_REFS : return "refs" ; + case FS_ZFS : return "zfs" ; default : return "" ; }