Rename suspend-to-hibernate to suspend-then-hibernate

Per some discussion with Gnome folks, they would prefer this name
as it's more descriptive of what's happening.
This commit is contained in:
Mario Limonciello
2018-03-28 15:11:10 -05:00
parent 9d9dd746d4
commit e68c79db91
19 changed files with 71 additions and 71 deletions
+4 -4
View File
@@ -96,13 +96,13 @@ int parse_sleep_config(const char *verb, char ***_modes, char ***_states, usec_t
else
states = strv_new("disk", NULL);
} else if (streq(verb, "suspend-to-hibernate"))
} else if (streq(verb, "suspend-then-hibernate"))
modes = states = NULL;
else
assert_not_reached("what verb");
if ((!modes && STR_IN_SET(verb, "hibernate", "hybrid-sleep")) ||
(!states && !streq(verb, "suspend-to-hibernate"))) {
(!states && !streq(verb, "suspend-then-hibernate"))) {
strv_free(modes);
strv_free(states);
return log_oom();
@@ -298,9 +298,9 @@ int can_sleep(const char *verb) {
_cleanup_strv_free_ char **modes = NULL, **states = NULL;
int r;
assert(STR_IN_SET(verb, "suspend", "hibernate", "hybrid-sleep", "suspend-to-hibernate"));
assert(STR_IN_SET(verb, "suspend", "hibernate", "hybrid-sleep", "suspend-then-hibernate"));
if (streq(verb, "suspend-to-hibernate"))
if (streq(verb, "suspend-then-hibernate"))
return can_s2h();
r = parse_sleep_config(verb, &modes, &states, NULL);