[gparted] Probe encryption mappings as needed using blkid (#148)



commit 555cea10cf8d025e136b42cecb63bde54325f8fb
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date:   Mon Mar 29 21:42:35 2021 +0100

    Probe encryption mappings as needed using blkid (#148)
    
    GParted no longer recognises file systems inside LUKS encryption, apart
    from the few recognised by GParted's internal detection.  Bisected to
    this commit:
        8b35892ea59958aa1eec596a48a36b0fa7950dca
        Pass device and partition names to blkid (#131)
    
    Prior to this commit blkid was run querying all known block devices
    including active encryption mappings, hence prior recognition.  With
    this commit blkid was run only for named or found disk devices and
    associated found partitions from /proc/partitions, so no more
    recognition of encrypted file systems.
    
    Fix by running blkid on the encryption mapping just before querying for
    the file system.  This restores the level of functionality that existed
    before.
    
    Closes 148 - Encrypted file systems are no longer recognised

 src/GParted_Core.cc | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/src/GParted_Core.cc b/src/GParted_Core.cc
index d56a323b..155c7d40 100644
--- a/src/GParted_Core.cc
+++ b/src/GParted_Core.cc
@@ -1072,6 +1072,11 @@ void GParted_Core::set_partition_label_and_uuid( Partition & partition )
 FSType GParted_Core::detect_filesystem_in_encryption_mapping(const Glib::ustring& path,
                                                              std::vector<Glib::ustring>& messages)
 {
+       // Run blkid identification on this one encryption mapping.
+       std::vector<Glib::ustring> one_path;
+       one_path.push_back(path);
+       FS_Info::load_cache_for_paths(one_path);
+
        FSType fstype = FS_UNKNOWN;
 
        PedDevice *lp_device = NULL;


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