summaryrefslogtreecommitdiff
path: root/src/systemctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/systemctl.c')
-rw-r--r--src/systemctl.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/systemctl.c b/src/systemctl.c
index 18074402e5..1142200e42 100644
--- a/src/systemctl.c
+++ b/src/systemctl.c
@@ -377,8 +377,7 @@ static void output_units_list(const struct unit_info *unit_infos, unsigned c) {
n_shown++;
- if (!streq(u->load_state, "loaded") &&
- !streq(u->load_state, "banned")) {
+ if (streq(u->load_state, "error")) {
on_loaded = ansi_highlight(true);
off_loaded = ansi_highlight(false);
} else
@@ -622,8 +621,6 @@ static int list_unit_files(DBusConnection *bus, char **args) {
dbus_error_init(&error);
- assert(bus);
-
pager_open_if_enabled();
if (avoid_bus()) {
@@ -659,6 +656,8 @@ static int list_unit_files(DBusConnection *bus, char **args) {
hashmap_free(h);
} else {
+ assert(bus);
+
m = dbus_message_new_method_call(
"org.freedesktop.systemd1",
"/org/freedesktop/systemd1",
@@ -2063,8 +2062,7 @@ static void print_status_info(UnitStatusInfo *i) {
if (i->following)
printf("\t Follow: unit currently follows state of %s\n", i->following);
- if (streq_ptr(i->load_state, "failed") ||
- streq_ptr(i->load_state, "banned")) {
+ if (streq_ptr(i->load_state, "error")) {
on = ansi_highlight(true);
off = ansi_highlight(false);
} else
@@ -5000,7 +4998,8 @@ static int systemctl_main(DBusConnection *bus, int argc, char *argv[], DBusError
* enable/disable */
if (!streq(verbs[i].verb, "enable") &&
!streq(verbs[i].verb, "disable") &&
- !streq(verbs[i].verb, "is-enable") &&
+ !streq(verbs[i].verb, "is-enabled") &&
+ !streq(verbs[i].verb, "list-unit-files") &&
!streq(verbs[i].verb, "reenable") &&
!streq(verbs[i].verb, "preset") &&
!streq(verbs[i].verb, "mask") &&
@@ -5156,7 +5155,7 @@ static int halt_main(DBusConnection *bus) {
if (!arg_no_wtmp) {
if (sd_booted() > 0)
log_debug("Not writing utmp record, assuming that systemd-update-utmp is used.");
- else if ((r = utmp_put_shutdown(0)) < 0)
+ else if ((r = utmp_put_shutdown()) < 0)
log_warning("Failed to write utmp record: %s", strerror(-r));
}