From caa7531f137aeb260fbda53e89a22f516836e89b Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Sat, 29 Aug 2015 11:20:59 +0200 Subject: Incorporate sleep.conf into logind.conf * src/login/logind-action.c (shutdown_or_sleep, do_sleep): Take modes from the manager instead of parsing them ourselves. * src/login/logind-dbus.c (execute_shutdown_or_sleep): Adapt to shutdown_or_sleep prototype change. * src/login/logind-gperf.gperf: Add config items from sleep.conf. * src/login/logind.c (manager_new): Wire up defaults for new config items. (manager_free): Free new config items. (manager_parse_config_file): Arrange to parse a single elogind/logind.conf file, not grovelling all over the filesystem. Take the file from the ELOGIND_CONF_FILE environment variable if present. --- src/login/logind.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/login/logind.h') diff --git a/src/login/logind.h b/src/login/logind.h index 5af01cb79a..90c972df6c 100644 --- a/src/login/logind.h +++ b/src/login/logind.h @@ -103,6 +103,10 @@ struct Manager { bool remove_ipc; + char **suspend_state, **suspend_mode; + char **hibernate_state, **hibernate_mode; + char **hybrid_sleep_state, **hybrid_sleep_mode; + Hashmap *polkit_registry; usec_t holdoff_timeout_usec; @@ -145,7 +149,7 @@ bool manager_is_docked_or_multiple_displays(Manager *m); extern const sd_bus_vtable manager_vtable[]; int bus_manager_shutdown_or_sleep_now_or_later(Manager *m, HandleAction action, InhibitWhat w, sd_bus_error *error); -int shutdown_or_sleep(HandleAction action); +int shutdown_or_sleep(Manager *m, HandleAction action); int manager_send_changed(Manager *manager, const char *property, ...) _sentinel_; -- cgit v1.2.3-54-g00ecf