summaryrefslogtreecommitdiff
path: root/src/shared/sleep-config.h
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-09-26 11:17:36 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-10-08 18:21:00 +0200
commite8f1d00d695f491654d50e57c82623288d3bcbeb (patch)
tree9a4bd310da72f0d3ade19937a8f111c95d54551c /src/shared/sleep-config.h
parent5fdf2d51c244288ac41443d1bd81365fab7b7b81 (diff)
downloadsystemd-e8f1d00d695f491654d50e57c82623288d3bcbeb.tar.gz
shared/sleep-config: add switches to kill specific sleep modes
/etc/systemd/sleep.conf gains four new switches: AllowSuspend=, AllowHibernation=, AllowSuspendThenHibernate=, AllowHybridSleep=. Disabling specific modes was already possible by masking suspend.target, hibernate.target, suspend-then-hibernate.target, or hybrid-sleep.target. But this is not convenient for distributions, which want to set some defaults based on what they want to support. Having those available as configuration makes it easy to put a config file in /usr/lib/systemd/sleep.conf.d/ that overrides the defaults and gives instructions how to undo that override.
Diffstat (limited to 'src/shared/sleep-config.h')
-rw-r--r--src/shared/sleep-config.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/sleep-config.h b/src/shared/sleep-config.h
index 6bf035969a..c584f44d39 100644
--- a/src/shared/sleep-config.h
+++ b/src/shared/sleep-config.h
@@ -5,7 +5,7 @@
#include "time-util.h"
int read_fiemap(int fd, struct fiemap **ret);
-int parse_sleep_config(const char *verb, char ***modes, char ***states, usec_t *delay);
+int parse_sleep_config(const char *verb, bool *ret_allow, char ***ret_modes, char ***ret_states, usec_t *ret_delay);
int find_hibernate_location(char **device, char **type, size_t *size, size_t *used);
int can_sleep(const char *verb);