[PATCH 1/4] systemctl: use on_tty() helper everywhere
Zbigniew Jędrzejewski-Szmek
zbyszek at in.waw.pl
Tue Sep 7 01:30:50 PDT 2010
---
src/systemctl.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/systemctl.c b/src/systemctl.c
index 627b905..004d28e 100644
--- a/src/systemctl.c
+++ b/src/systemctl.c
@@ -337,7 +337,7 @@ static int list_units(DBusConnection *bus, char **args, unsigned n) {
qsort(unit_infos, c, sizeof(struct unit_info), compare_unit_info);
- if (isatty(STDOUT_FILENO)) {
+ if (on_tty()) {
if (columns() >= 80+12 || arg_full)
printf("%-25s %-6s %-12s %-18s %-15s %s\n", "UNIT", "LOAD", "ACTIVE", "SUB", "JOB", "DESCRIPTION");
else
@@ -400,7 +400,7 @@ static int list_units(DBusConnection *bus, char **args, unsigned n) {
}
}
- if (isatty(STDOUT_FILENO)) {
+ if (on_tty()) {
printf("\nLOAD = Reflects whether the unit definition was properly loaded.\n"
"ACTIVE = The high-level unit activation state, i.e. generalization of SUB.\n"
--
1.7.1
More information about the systemd-devel
mailing list