[gparted] Add detection of ZFS (#752862)



commit 71715a1c2924498f432bdc9921d17274a307d58b
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date:   Sat Jul 25 15:51:32 2015 +0100

    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 573d1cd..b0a9fd0 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 1679ac9..be8d173 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 b699683..4f65f63 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 "" ;
        }


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