summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-05-19 18:10:34 +0200
committerLennart Poettering <lennart@poettering.net>2011-05-19 18:10:34 +0200
commit74bc3bdc2096e6710c13052fa848649c9ed1dfa5 (patch)
treefcadf65171e42b03534c4ebf406711d53894a3c4
parentec6370a22dbb96f855011e75f08e88df9e45504d (diff)
util: use open_terminal() in chvt() too
-rw-r--r--src/util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util.c b/src/util.c
index 14aa1f9728..021be62547 100644
--- a/src/util.c
+++ b/src/util.c
@@ -2141,7 +2141,7 @@ bool fstype_is_network(const char *fstype) {
int chvt(int vt) {
int fd, r = 0;
- if ((fd = open("/dev/tty0", O_RDWR|O_NOCTTY|O_CLOEXEC)) < 0)
+ if ((fd = open_terminal("/dev/tty0", O_RDWR|O_NOCTTY|O_CLOEXEC)) < 0)
return -errno;
if (vt < 0) {