summaryrefslogtreecommitdiff
path: root/src/systemctl
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-10-18 23:59:41 +0200
committerLennart Poettering <lennart@poettering.net>2012-10-19 00:07:55 +0200
commit8481248b9fbddc6d5e6ff26eb23505ef13dc85f7 (patch)
treee4fe79bad17efaf2c8e6382180be720776e9d73c /src/systemctl
parent28917d7dc711746795f7e6468c06c1983a5cdf53 (diff)
util: unify usage of on_tty() in util.c
Diffstat (limited to 'src/systemctl')
-rw-r--r--src/systemctl/systemctl.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index 82c801e4d9..d77d534e0b 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -132,26 +132,8 @@ static bool private_bus = false;
static int daemon_reload(DBusConnection *bus, char **args);
static void halt_now(enum action a);
-static bool on_tty(void) {
- static int t = -1;
-
- /* Note that this is invoked relatively early, before we start
- * the pager. That means the value we return reflects whether
- * we originally were started on a tty, not if we currently
- * are. But this is intended, since we want colour and so on
- * when run in our own pager. */
-
- if (_unlikely_(t < 0))
- t = isatty(STDOUT_FILENO) > 0;
-
- return t;
-}
-
static void pager_open_if_enabled(void) {
- /* Cache result before we open the pager */
- on_tty();
-
if (arg_no_pager)
return;