[luksopenswaphookcfg] Extend info with btrfs subvol
This is a C++-ification of e8936392
from dalto8 . Add a line
for options to the empty-file-fallback.
This commit is contained in:
parent
7ea21663ca
commit
45d6eb36fb
@ -23,6 +23,7 @@ struct LOSHInfo
|
||||
QString swap_mapper_name;
|
||||
QString mountable_keyfile_device;
|
||||
QString swap_device_path;
|
||||
QString keyfile_device_mount_options;
|
||||
|
||||
bool isValid() const { return !swap_device_path.isEmpty(); }
|
||||
|
||||
@ -49,6 +50,10 @@ struct LOSHInfo
|
||||
{
|
||||
return QStringLiteral( "crypto_keyfile.bin" );
|
||||
}
|
||||
if ( key == QStringLiteral( "keyfile_device_mount_options" ) )
|
||||
{
|
||||
return keyfile_device_mount_options;
|
||||
}
|
||||
return QString();
|
||||
}
|
||||
|
||||
|
@ -103,7 +103,8 @@ LOSHJob::exec()
|
||||
if ( contents.isEmpty() )
|
||||
{
|
||||
contents << QStringLiteral( "# swap_device=" ) << QStringLiteral( "# crypt_swap_name=" )
|
||||
<< QStringLiteral( "# keyfile_device=" ) << QStringLiteral( "# keyfile_filename=" );
|
||||
<< QStringLiteral( "# keyfile_device=" ) << QStringLiteral( "# keyfile_filename=" )
|
||||
<< QStringLiteral( "# keyfile_device_mount_options" );
|
||||
}
|
||||
|
||||
write_openswap_conf( m_configFilePath, contents, LOSHInfo::fromGlobalStorage() );
|
||||
|
Loading…
Reference in New Issue
Block a user