[gparted] Extend un/mounting and usage reporting to unsupported file systems (!13)



commit 95903efb1f284f3d6819f38e894dc6c3464b2183
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date:   Thu Sep 6 20:30:24 2018 +0100

    Extend un/mounting and usage reporting to unsupported file systems (!13)
    
    For unsupported (including basic supported) file systems, also record
    the mount point(s) when mounted and from /etc/fstab when not.  This
    allows mounted unsupported file systems to be unmounted and ones with
    /etc/fstab entries to be mounted, just like fully supported file
    systems.
    
    Also for unsupported (again including basic supported) mounted file
    systems query the kernel for the usage, just like is already done for
    supported file systems.
    
    Closes !13 - Support copying and moving of unsupported partition content

 src/GParted_Core.cc | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/src/GParted_Core.cc b/src/GParted_Core.cc
index ed5119e8..f773c664 100644
--- a/src/GParted_Core.cc
+++ b/src/GParted_Core.cc
@@ -1621,7 +1621,7 @@ void GParted_Core::set_mountpoints( Partition & partition )
                        partition.add_mountpoint( DEV_MAPPER_PATH + mapping.name );
        }
        // Swap spaces don't have mount points so don't bother trying to add them.
-       else if ( supported_filesystem( partition.filesystem ) && partition.filesystem != FS_LINUX_SWAP )
+       else if ( partition.filesystem != FS_LINUX_SWAP )
        {
                if ( partition.busy )
                {
@@ -1814,6 +1814,12 @@ void GParted_Core::set_used_sectors( Partition & partition, PedDisk* lp_disk )
                                partition.push_back_message( temp );
                }
        }
+       else
+       {
+               // Set usage of mouted but unsupported file systems
+               if ( partition.busy )
+                       mounted_set_used_sectors( partition );
+       }
 }
 
 void GParted_Core::mounted_set_used_sectors( Partition & partition )


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