diff --git a/src/modules/luksopenswaphookcfg/LOSHInfo.h b/src/modules/luksopenswaphookcfg/LOSHInfo.h index 94ccba379..470b5a0cc 100644 --- a/src/modules/luksopenswaphookcfg/LOSHInfo.h +++ b/src/modules/luksopenswaphookcfg/LOSHInfo.h @@ -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(); } diff --git a/src/modules/luksopenswaphookcfg/LOSHJob.cpp b/src/modules/luksopenswaphookcfg/LOSHJob.cpp index 986213cf5..a5e5a183a 100644 --- a/src/modules/luksopenswaphookcfg/LOSHJob.cpp +++ b/src/modules/luksopenswaphookcfg/LOSHJob.cpp @@ -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() );