chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a822056
)
systemctl: minor beautifications
author
Lennart Poettering
<lennart@poettering.net>
Wed, 7 Jul 2010 01:49:08 +0000
(
03:49
+0200)
committer
Lennart Poettering
<lennart@poettering.net>
Wed, 7 Jul 2010 02:13:19 +0000
(
04:13
+0200)
src/systemctl.c
patch
|
blob
|
history
diff --git
a/src/systemctl.c
b/src/systemctl.c
index 081f34bcfd17b493f0c8893b15f98dc1d72a4d02..f585e11f4909d311d24e3bd5f8247dc632ff7d95 100644
(file)
--- a/
src/systemctl.c
+++ b/
src/systemctl.c
@@
-239,20
+239,26
@@
static int list_units(DBusConnection *bus, char **args, unsigned n) {
int a = 0, b = 0;
int a = 0, b = 0;
+ if (streq(active_state, "maintenance"))
+ fputs(ANSI_HIGHLIGHT_ON, stdout);
+
printf("%-45s %-6s %-12s %-12s%n", id, load_state, active_state, sub_state, &a);
if (job_id != 0)
printf(" %-15s%n", job_type, &b);
else
printf("%-45s %-6s %-12s %-12s%n", id, load_state, active_state, sub_state, &a);
if (job_id != 0)
printf(" %-15s%n", job_type, &b);
else
- b = 1 + 1
6
;
+ b = 1 + 1
5
;
if (a + b + 2 < columns()) {
if (job_id == 0)
printf(" ");
if (a + b + 2 < columns()) {
if (job_id == 0)
printf(" ");
- printf("%.*s", columns() - a - b - 2, description);
+ printf("
%.*s", columns() - a - b - 2, description);
}
}
+ if (streq(active_state, "maintenance"))
+ fputs(ANSI_HIGHLIGHT_OFF, stdout);
+
fputs("\n", stdout);
k++;
}
fputs("\n", stdout);
k++;
}