summaryrefslogtreecommitdiff
path: root/src/login/logind-dbus.c
diff options
context:
space:
mode:
authorSven Eden <yamakuzure@gmx.net>2018-08-23 08:35:42 +0200
committerSven Eden <yamakuzure@gmx.net>2018-08-24 16:47:08 +0200
commit70140c4f0c80a9e51ed1ea51915ac2a6407d1a2b (patch)
tree53b84ec3acd2f7dfdef4beedcd7fa0e77b0dd600 /src/login/logind-dbus.c
parent4c6d5bc38f16d11f19a847c9ff7453a7659ee876 (diff)
Prep v239: Fix ustreams move of the unneeded target_table into its own also unneeded function.
Diffstat (limited to 'src/login/logind-dbus.c')
-rw-r--r--src/login/logind-dbus.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c
index 2f7782a13..63a206ce2 100644
--- a/src/login/logind-dbus.c
+++ b/src/login/logind-dbus.c
@@ -2367,11 +2367,11 @@ static int method_can_shutdown_or_sleep(
blocked = manager_is_inhibited(m, w, INHIBIT_BLOCK, NULL, false, true, uid, NULL);
handle = handle_action_from_string(sleep_verb);
+#if 0 /// elogind uses its own variant, which can use the handle directly.
if (handle >= 0) {
const char *target;
target = manager_target_for_action(handle);
-#if 0 /// elogind does not support systemd units units. A valid handle is enough
if (target) {
_cleanup_free_ char *load_state = NULL;
@@ -2380,20 +2380,16 @@ static int method_can_shutdown_or_sleep(
return r;
if (!streq(load_state, "loaded")) {
-#else
- if (NULL == target) {
-#endif // 0
result = "no";
goto finish;
-#if 0 /// one less with elogind...
}
-#endif // 0
}
#else
if ( (handle <= HANDLE_IGNORE) || (handle >= _HANDLE_ACTION_MAX) ) {
result = "no";
goto finish;
}
+#endif // 0
if (multiple_sessions) {
r = bus_test_polkit(message, CAP_SYS_BOOT, action_multiple_sessions, NULL, UID_INVALID, &challenge, error);