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
This commit is contained in:
Mike Fleetwood 2016-09-05 08:44:26 +01:00 committed by Curtis Gedak
parent 8984ccaf23
commit 8e41a5f712
1 changed files with 8 additions and 0 deletions

View File

@ -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 ) ;