diff options
author | Sven Eden <yamakuzure@gmx.net> | 2018-06-13 08:13:23 +0200 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2018-06-29 07:12:51 +0200 |
commit | 6d68b26e0d54bfed2dbe0d3cc6251295bce243a9 (patch) | |
tree | 20f57193df547f95d2a860e289de883b878cb147 /src/login/logind-dbus.c | |
parent | ff30424a0526b809bf40f22e6ad58601419da174 (diff) |
Move delay_shutdown_or_sleep() back to logind-dbus.c
Diffstat (limited to 'src/login/logind-dbus.c')
-rw-r--r-- | src/login/logind-dbus.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c index 3ac67a444..46d7a4f25 100644 --- a/src/login/logind-dbus.c +++ b/src/login/logind-dbus.c @@ -1710,19 +1710,26 @@ int manager_inhibit_timeout_handler( return (r < 0) ? r : 0; } -#if 0 /// elogind has its own variant in elogind-dbus.c +#if 0 /// elogind does not have unit_name but action static int delay_shutdown_or_sleep( Manager *m, InhibitWhat w, const char *unit_name) { - +#else +int delay_shutdown_or_sleep( + Manager *m, + InhibitWhat w, + HandleAction action) { +#endif // 0 int r; usec_t timeout_val; assert(m); assert(w >= 0); assert(w < _INHIBIT_WHAT_MAX); +#if 0 /// UNNEEDED by elogind assert(unit_name); +#endif // 0 timeout_val = now(CLOCK_MONOTONIC) + m->inhibit_delay_max; @@ -1741,12 +1748,15 @@ static int delay_shutdown_or_sleep( return r; } +#if 0 /// elogind does not have unit_name but pendig_action m->action_unit = unit_name; +#else + m->pending_action = action; +#endif // 0 m->action_what = w; return 0; } -#endif // 0 #if 0 /// elogind has its own variant in elogind-dbus.c int bus_manager_shutdown_or_sleep_now_or_later( |