Populate active LUKS mountpoints with /dev/mapper/NAME entry (#760080)

Populate the canonical device name, /dev/mapper/NAME, used to access the
encrypted file system into the mount points of the Partition object.
This is the equivalent of what is already done for the Volume Group name
and SWRaid Array device.

This does get displayed in the Mount Point column in the main window,
which isn't wanted.  However the data will be needed when displaying
details of the encryption mapping in the Information dialog.  Both will
be dealt with in following commits.

Bug 760080 - Implement read-only LUKS support
This commit is contained in:
Mike Fleetwood 2015-12-27 16:47:38 +00:00 committed by Curtis Gedak
parent 1b731b93d7
commit e9b893b4cb
1 changed files with 6 additions and 0 deletions

View File

@ -1785,6 +1785,12 @@ void GParted_Core::set_mountpoints( Partition & partition )
if ( ! array_path.empty() )
partition.add_mountpoint( array_path );
}
else if ( partition.filesystem == FS_LUKS )
{
LUKS_Mapping mapping = LUKS_Info::get_cache_entry( partition.get_path() );
if ( ! mapping.name.empty() )
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 )
{