]> err.no Git - systemd/commitdiff
util: use open_terminal() in chvt() too
authorLennart Poettering <lennart@poettering.net>
Thu, 19 May 2011 16:10:34 +0000 (18:10 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 19 May 2011 16:10:34 +0000 (18:10 +0200)
src/util.c

index 14aa1f97280a5a8f700a3cf7d1b2cd044c08bae8..021be62547a9ef82ec548ac45944a233d685d147 100644 (file)
@@ -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) {