util: use open_terminal() in chvt() too

This commit is contained in:
Lennart Poettering 2011-05-19 18:10:34 +02:00
parent ec6370a22d
commit 74bc3bdc20
1 changed files with 1 additions and 1 deletions

View 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) {