summaryrefslogtreecommitdiff
path: root/src/core/dbus-manager.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-07-20 00:00:04 +0200
committerLennart Poettering <lennart@poettering.net>2012-07-20 00:10:32 +0200
commitc74f17d96cccd4cc998fd037cb92046930188c91 (patch)
tree6de40f861594f7042dddac66c492b5047d0c3f91 /src/core/dbus-manager.c
parent4819ff0358b6317c195fd4b1768e03d09c871070 (diff)
core: drop KillMode parameter from KillUnit() bus call
It made no sense, and since we are documenting the bus calls now and want to include them in our stability promise we really should get it cleaned up sooner, not later.
Diffstat (limited to 'src/core/dbus-manager.c')
-rw-r--r--src/core/dbus-manager.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/src/core/dbus-manager.c b/src/core/dbus-manager.c
index 925e87cc57..c341d36a6b 100644
--- a/src/core/dbus-manager.c
+++ b/src/core/dbus-manager.c
@@ -94,7 +94,6 @@
" <method name=\"KillUnit\">\n" \
" <arg name=\"name\" type=\"s\" direction=\"in\"/>\n" \
" <arg name=\"who\" type=\"s\" direction=\"in\"/>\n" \
- " <arg name=\"mode\" type=\"s\" direction=\"in\"/>\n" \
" <arg name=\"signal\" type=\"i\" direction=\"in\"/>\n" \
" </method>\n" \
" <method name=\"ResetFailedUnit\">\n" \
@@ -665,10 +664,9 @@ static DBusHandlerResult bus_manager_message_handler(DBusConnection *connection,
reload_if_possible = true;
job_type = JOB_TRY_RESTART;
} else if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Manager", "KillUnit")) {
- const char *name, *swho, *smode;
+ const char *name, *swho;
int32_t signo;
Unit *u;
- KillMode mode;
KillWho who;
if (!dbus_message_get_args(
@@ -676,7 +674,6 @@ static DBusHandlerResult bus_manager_message_handler(DBusConnection *connection,
&error,
DBUS_TYPE_STRING, &name,
DBUS_TYPE_STRING, &swho,
- DBUS_TYPE_STRING, &smode,
DBUS_TYPE_INT32, &signo,
DBUS_TYPE_INVALID))
return bus_send_error_reply(connection, message, &error, -EINVAL);
@@ -689,23 +686,17 @@ static DBusHandlerResult bus_manager_message_handler(DBusConnection *connection,
return bus_send_error_reply(connection, message, &error, -EINVAL);
}
- if (isempty(smode))
- mode = KILL_CONTROL_GROUP;
- else {
- mode = kill_mode_from_string(smode);
- if (mode < 0)
- return bus_send_error_reply(connection, message, &error, -EINVAL);
- }
-
if (signo <= 0 || signo >= _NSIG)
return bus_send_error_reply(connection, message, &error, -EINVAL);
- if (!(u = manager_get_unit(m, name))) {
+ u = manager_get_unit(m, name);
+ if (!u) {
dbus_set_error(&error, BUS_ERROR_NO_SUCH_UNIT, "Unit %s is not loaded.", name);
return bus_send_error_reply(connection, message, &error, -ENOENT);
}
- if ((r = unit_kill(u, who, mode, signo, &error)) < 0)
+ r = unit_kill(u, who, signo, &error);
+ if (r < 0)
return bus_send_error_reply(connection, message, &error, r);
if (!(reply = dbus_message_new_method_return(message)))