diff options
Diffstat (limited to 'src/login/logind-dbus.c')
-rw-r--r-- | src/login/logind-dbus.c | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c index b735366fe1..301c4de2fe 100644 --- a/src/login/logind-dbus.c +++ b/src/login/logind-dbus.c @@ -1422,10 +1422,6 @@ static int execute_shutdown_or_sleep( InhibitWhat w, HandleAction action, sd_bus_error *error) { - - _cleanup_bus_message_unref_ sd_bus_message *reply = NULL; - const char *p; - char *c; int r; assert(m); @@ -1436,26 +1432,10 @@ static int execute_shutdown_or_sleep( /* FIXME: here do the thing. */ - r = sd_bus_call_method( - m->bus, - "org.freedesktop.systemd1", - "/org/freedesktop/systemd1", - "org.freedesktop.systemd1.Manager", - "StartUnit", - error, - &reply, - "ss", NULL, "replace-irreversibly"); + r = shutdown_or_sleep(action); if (r < 0) return r; - r = sd_bus_message_read(reply, "o", &p); - if (r < 0) - return r; - - c = strdup(p); - if (!c) - return -ENOMEM; - /* Make sure the lid switch is ignored for a while (?) */ manager_set_lid_switch_ignore(m, now(CLOCK_MONOTONIC) + m->holdoff_timeout_usec); |