[gparted] Display encrypted path in the calibration step (#774818)



commit 8e41a5f712a1620209ffa971383c10973afe5b3f
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date:   Mon Sep 5 08:44:26 2016 +0100

    Display encrypted path in the calibration step (#774818)
    
    For an encrypted file system the calibrate step now looks like:
    
        + calibrate /dev/sdb4
            path: /dev/sdb4 (partition)
            start: 6293504
            end: 8390655
            size: 2097152 (1.00 GiB)
            encryption path: /dev/mapper/sdb4_crypt
    
    Bug 774818 - Implement LUKS read-write actions NOT requiring a
                 passphrase

 src/GParted_Core.cc |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/GParted_Core.cc b/src/GParted_Core.cc
index 1f38bf5..d163210 100644
--- a/src/GParted_Core.cc
+++ b/src/GParted_Core.cc
@@ -3399,6 +3399,14 @@ bool GParted_Core::calibrate_partition( Partition & partition, OperationDetail &
                                                                Utils::format_size( partition 
.get_sector_length(), partition .sector_size ) ),
                                        STATUS_NONE, 
                                        FONT_ITALIC ) ) ;
+
+                               if ( partition.filesystem == FS_LUKS && partition.busy )
+                               {
+                                       const Partition & encrypted = dynamic_cast<const PartitionLUKS *>( 
&partition )->get_encrypted();
+                                       operationdetail.get_last_child().add_child( OperationDetail(
+                                               String::ucompose( _("encryption path: %1"), 
encrypted.get_path() ),
+                                               STATUS_NONE, FONT_ITALIC ) );
+                               }
                        }
 
                        destroy_device_and_disk( lp_device, lp_disk ) ;


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