From 35f4db93166e064b205066d14d298afe2b4ddb59 Mon Sep 17 00:00:00 2001 From: Teo Mrnjavac Date: Fri, 26 Jun 2015 15:48:12 +0200 Subject: [PATCH] Read ensureSuspendToDisk from partition.conf. --- src/modules/partition/gui/PartitionViewStep.cpp | 10 ++++++++++ src/modules/partition/partition.conf | 1 + 2 files changed, 11 insertions(+) diff --git a/src/modules/partition/gui/PartitionViewStep.cpp b/src/modules/partition/gui/PartitionViewStep.cpp index aa8486bd1..6103cb6d9 100644 --- a/src/modules/partition/gui/PartitionViewStep.cpp +++ b/src/modules/partition/gui/PartitionViewStep.cpp @@ -435,6 +435,16 @@ PartitionViewStep::setConfigurationMap( const QVariantMap& configurationMap ) { gs->insert( "efiSystemPartition", QStringLiteral( "/boot/efi" ) ); } + + if ( configurationMap.contains( "ensureSuspendToDisk" ) && + configurationMap.value( "ensureSuspendToDisk" ).type() == QVariant::Bool ) + { + gs->insert( "ensureSuspendToDisk", configurationMap.value( "ensureSuspendToDisk" ).toBool() ); + } + else + { + gs->insert( "ensureSuspendToDisk", true ); + } } diff --git a/src/modules/partition/partition.conf b/src/modules/partition/partition.conf index 39ed3bbc6..31aa23d46 100644 --- a/src/modules/partition/partition.conf +++ b/src/modules/partition/partition.conf @@ -2,3 +2,4 @@ # distributions (Fedora, Debian, Manjaro, etc.) use /boot/efi, others (KaOS, # etc.) use just /boot. efiSystemPartition: "/boot/efi" +ensureSuspendToDisk: true #make sure an autogenerated swap partition is big enough for hibernation