[gparted] Add FILESYSTEM_MAP[FS_EXTENDED] entry



commit 59185b133ce006e01c390be53581398a0a7ee7bf
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date:   Fri Aug 19 15:28:21 2016 +0100

    Add FILESYSTEM_MAP[FS_EXTENDED] entry
    
    Now when refreshing the devices, GParted_Core::read_label() calls
    GParted_Core::get_fs() with parameter FS_EXTENDED.
    
    Before this change, get_fs() would fail to find file system capabilities
    set for FS_EXTENDED and construct a not supported capabilities set and
    return that.
    
    Afterwards, find_supported_filesystems() creates a not supported
    capabilities set from the NULL pointer for FS_EXTENDED and adds this
    entry into the FILESYSTEMS vector.  Then get_fs() finds that not
    supported capabilities set for FS_EXTENDED in the FILESYSTEMS vector and
    returns that.
    
    This makes no functional difference.  It just seems right as other
    unsupported but used file system types have entries in FILESYSTEM_MAP.
    
    See this earlier commit doing the same thing:
        7870a92b8097b3b8067cc87b891451d5164e9b74
        Add FILESYSTEM_MAP[FS_UNALLOCATED] entry

 src/GParted_Core.cc |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/GParted_Core.cc b/src/GParted_Core.cc
index ff3a129..3447f62 100644
--- a/src/GParted_Core.cc
+++ b/src/GParted_Core.cc
@@ -112,8 +112,9 @@ void GParted_Core::find_supported_filesystems()
 
        // Iteration of std::map is ordered according to operator< of the key.  Hence the
        // FILESYSTEMS vector is constructed in FILESYSTEM enum order: FS_UNALLOCATED,
-       // FS_UNKNOWN, FS_CLEARED, FS_BTRFS, ..., FS_LINUX_SWRAID, LINUX_SWSUSPEND which
-       // ultimately controls the default order of file systems in menus and dialogs.
+       // FS_UNKNOWN, FS_CLEARED, FS_EXTENDED, FS_BTRFS, ..., FS_LINUX_SWRAID,
+       // LINUX_SWSUSPEND which ultimately controls the default order of file systems in
+       // menus and dialogs.
        FILESYSTEMS .clear() ;
 
        for ( f = FILESYSTEM_MAP .begin() ; f != FILESYSTEM_MAP .end() ; f++ ) {
@@ -4102,6 +4103,7 @@ void GParted_Core::init_filesystems()
        FILESYSTEM_MAP[FS_UNALLOCATED]     = NULL;
        FILESYSTEM_MAP[FS_UNKNOWN]         = NULL;
        FILESYSTEM_MAP[FS_CLEARED]         = NULL;
+       FILESYSTEM_MAP[FS_EXTENDED]        = NULL;
        FILESYSTEM_MAP[FS_BTRFS]           = new btrfs();
        FILESYSTEM_MAP[FS_EXFAT]           = new exfat();
        FILESYSTEM_MAP[FS_EXT2]            = new ext2( FS_EXT2 );


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