diff options
author | Alan Jenkins <alan.christopher.jenkins@gmail.com> | 2017-08-22 13:54:21 +0100 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2017-09-25 14:31:35 +0200 |
commit | aaf612724cb34042a50589e842c8d577f6789f25 (patch) | |
tree | 9d5ba7c16e4fea44044823c34699380b6b4571f9 /src/login/logind-dbus.c | |
parent | 13eeee94439dedda3f3848411b1cec5554176dea (diff) |
logind: method_schedule_shutdown() already rejects empty `type`
Don't test for an empty `type` afterwards. This is not how you cancel
scheduled shutdowns - there's a separate method for that.
Diffstat (limited to 'src/login/logind-dbus.c')
-rw-r--r-- | src/login/logind-dbus.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c index 0abf4d50e..d5a6a21a6 100644 --- a/src/login/logind-dbus.c +++ b/src/login/logind-dbus.c @@ -2100,12 +2100,9 @@ static int method_schedule_shutdown(sd_bus_message *message, void *userdata, sd_ if (r < 0) return r; - if (!isempty(type)) { - r = update_schedule_file(m); - if (r < 0) - return r; - } else - (void) unlink("/run/systemd/shutdown/scheduled"); + r = update_schedule_file(m); + if (r < 0) + return r; return sd_bus_reply_method_return(message, NULL); } |