chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
readahead: bring export definition of sd-readahead in line with sd-daemon
[elogind.git]
/
src
/
systemctl.c
diff --git
a/src/systemctl.c
b/src/systemctl.c
index 175159d68fb42fc87380d72263d198bc9f3eadeb..1142200e426b73884a967936e72bbd785c75e683 100644
(file)
--- 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++;
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
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);
dbus_error_init(&error);
- assert(bus);
-
pager_open_if_enabled();
if (avoid_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 {
hashmap_free(h);
} else {
+ assert(bus);
+
m = dbus_message_new_method_call(
"org.freedesktop.systemd1",
"/org/freedesktop/systemd1",
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 (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
on = ansi_highlight(true);
off = ansi_highlight(false);
} else
@@
-2201,7
+2199,7
@@
static void print_status_info(UnitStatusInfo *i) {
if (i->running) {
char *t = NULL;
if (i->running) {
char *t = NULL;
- get_process_
name
(i->main_pid, &t);
+ get_process_
comm
(i->main_pid, &t);
if (t) {
printf(" (%s)", t);
free(t);
if (t) {
printf(" (%s)", t);
free(t);
@@
-2235,7
+2233,7
@@
static void print_status_info(UnitStatusInfo *i) {
printf(" Control: %u", (unsigned) i->control_pid);
printf(" Control: %u", (unsigned) i->control_pid);
- get_process_
name
(i->control_pid, &t);
+ get_process_
comm
(i->control_pid, &t);
if (t) {
printf(" (%s)", t);
free(t);
if (t) {
printf(" (%s)", t);
free(t);
@@
-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") &&
* 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") &&
!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.");
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));
}
log_warning("Failed to write utmp record: %s", strerror(-r));
}