@@ -84,6 +84,9 @@ int main(int argc, char *argv[])
}
}
+ /* Test if s2ram will use quirks from the configuration file */
+ ret = get_s2ram_config();
+
/* Check if the KMS support is disabled by user */
if (!no_kms_flag) {
/* KMS */
@@ -96,9 +99,6 @@ int main(int argc, char *argv[])
printf("KMS disabled by user.\n");
}
- /* Test if s2ram will use quirks from the configuration file */
- ret = get_s2ram_config();
-
if (ret) {
/* No configuration file, using quirks form database */
ret = s2ram_is_supported();
@@ -23,11 +23,16 @@
#include "s2ram.h"
#include "config_parser.h"
-static char s2ram_force;
+static char s2ram_force, s2ram_disable_kms;
static char s2ram_quirks[MAX_STR_LEN];
static struct config_par s2ram_parameters[] = {
{
+ .name = "s2ram_disable_kms",
+ .fmt = "%c",
+ .ptr = &s2ram_disable_kms,
+ },
+ {
.name = "s2ram_force",
.fmt = "%c",
.ptr = &s2ram_force,
@@ -110,6 +115,10 @@ int get_s2ram_config(void)
fprintf(stderr, "%s: Could not parse config file\n", ret_name);
return error;
}
+
+ if (s2ram_disable_kms == 'y')
+ no_kms_flag = 1;
+
if (s2ram_force == 'y') {
force = 1;