X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fsystemctl%2Fsystemctl.c;h=d493733761d6349ffe65d792c92370985055c5b1;hb=669241a076108e0483d7d8475beaa506106d077e;hp=344dcd3e753268ee029cb58336282df048a52f95;hpb=085d71209ba32c1e4e72ec031536be892054352e;p=elogind.git diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index 344dcd3e7..d49373376 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -86,7 +86,6 @@ static bool arg_failed = false; static bool arg_runtime = false; static char **arg_wall = NULL; static const char *arg_kill_who = NULL; -static const char *arg_kill_mode = NULL; static int arg_signal = SIGTERM; static const char *arg_root = NULL; static usec_t arg_when = 0; @@ -659,7 +658,7 @@ static int list_unit_files(DBusConnection *bus, char **args) { h = hashmap_new(string_hash_func, string_compare_func); if (!h) { - log_error("Out of memory"); + log_error("Out of memory."); return -ENOMEM; } @@ -674,7 +673,7 @@ static int list_unit_files(DBusConnection *bus, char **args) { units = new(UnitFileList, n_units); if (!units) { unit_file_list_free(h); - log_error("Out of memory"); + log_error("Out of memory."); return -ENOMEM; } @@ -784,7 +783,7 @@ static int dot_one_property(const char *name, const char *prop, DBusMessageIter "RequiresOverridable", "[color=\"black\"]", "Requisite", "[color=\"darkblue\"]", "RequisiteOverridable", "[color=\"darkblue\"]", - "Wants", "[color=\"darkgrey\"]", + "Wants", "[color=\"grey66\"]", "Conflicts", "[color=\"red\"]", "ConflictedBy", "[color=\"red\"]", "After", "[color=\"green\"]" @@ -2140,9 +2139,6 @@ static int kill_unit(DBusConnection *bus, char **args) { if (!arg_kill_who) arg_kill_who = "all"; - if (!arg_kill_mode) - arg_kill_mode = streq(arg_kill_who, "all") ? "control-group" : "process"; - STRV_FOREACH(name, args+1) { DBusMessage *reply; char *n; @@ -2163,7 +2159,6 @@ static int kill_unit(DBusConnection *bus, char **args) { b = dbus_message_append_args(m, DBUS_TYPE_STRING, n ? &n : name, DBUS_TYPE_STRING, &arg_kill_who, - DBUS_TYPE_STRING, &arg_kill_mode, DBUS_TYPE_INT32, &arg_signal, DBUS_TYPE_INVALID); free(n); @@ -2642,7 +2637,7 @@ static void show_unit_help(UnitStatusInfo *i) { section = strndup(e + 1, *p + k - e - 2); if (!section) { free(page); - log_error("Out of memory"); + log_error("Out of memory."); return; } @@ -3288,7 +3283,7 @@ static int show(DBusConnection *bus, char **args) { p = unit_dbus_path_from_name(n ? n : *name); free(n); if (!p) { - log_error("Out of memory"); + log_error("Out of memory."); return -ENOMEM; } @@ -3304,7 +3299,7 @@ static int show(DBusConnection *bus, char **args) { char *p; if (asprintf(&p, "/org/freedesktop/systemd1/job/%u", id) < 0) { - log_error("Out of memory"); + log_error("Out of memory."); return -ENOMEM; } @@ -3979,7 +3974,7 @@ static int enable_sysv_units(char **args) { asprintf(&p, "%s/%s", *k, name); if (!p) { - log_error("No memory"); + log_error("Out of memory."); r = -ENOMEM; goto finish; } @@ -4000,7 +3995,7 @@ static int enable_sysv_units(char **args) { else asprintf(&p, SYSTEM_SYSVINIT_PATH "/%s", name); if (!p) { - log_error("No memory"); + log_error("Out of memory."); r = -ENOMEM; goto finish; } @@ -4029,7 +4024,7 @@ static int enable_sysv_units(char **args) { l = strv_join((char**)argv, " "); if (!l) { - log_error("No memory."); + log_error("Out of memory."); free(q); free(p); r = -ENOMEM; @@ -4189,7 +4184,7 @@ static int enable_unit(DBusConnection *bus, char **args) { "org.freedesktop.systemd1.Manager", method); if (!m) { - log_error("Out of memory"); + log_error("Out of memory."); r = -ENOMEM; goto finish; } @@ -4344,7 +4339,7 @@ static int unit_is_enabled(DBusConnection *bus, char **args) { "org.freedesktop.systemd1.Manager", "GetUnitFileState"); if (!m) { - log_error("Out of memory"); + log_error("Out of memory."); r = -ENOMEM; goto finish; } @@ -4593,7 +4588,6 @@ static int systemctl_parse_argv(int argc, char *argv[]) { ARG_ROOT, ARG_FULL, ARG_NO_RELOAD, - ARG_KILL_MODE, ARG_KILL_WHO, ARG_NO_ASK_PASSWORD, ARG_FAILED, @@ -4625,7 +4619,6 @@ static int systemctl_parse_argv(int argc, char *argv[]) { { "root", required_argument, NULL, ARG_ROOT }, { "force", no_argument, NULL, ARG_FORCE }, { "no-reload", no_argument, NULL, ARG_NO_RELOAD }, - { "kill-mode", required_argument, NULL, ARG_KILL_MODE }, /* undocumented on purpose */ { "kill-who", required_argument, NULL, ARG_KILL_WHO }, { "signal", required_argument, NULL, 's' }, { "no-ask-password", no_argument, NULL, ARG_NO_ASK_PASSWORD }, @@ -4771,10 +4764,6 @@ static int systemctl_parse_argv(int argc, char *argv[]) { arg_kill_who = optarg; break; - case ARG_KILL_MODE: - arg_kill_mode = optarg; - break; - case 's': if ((arg_signal = signal_from_string_try_harder(optarg)) < 0) { log_error("Failed to parse signal string %s.", optarg); @@ -5652,7 +5641,7 @@ done: return 0; } -static void halt_now(enum action a) { +static _noreturn_ void halt_now(enum action a) { /* Make sure C-A-D is handled by the kernel from this * point on... */