util: use open_terminal() in chvt() too
This commit is contained in:
parent
ec6370a22d
commit
74bc3bdc20
|
@ -2141,7 +2141,7 @@ bool fstype_is_network(const char *fstype) {
|
||||||
int chvt(int vt) {
|
int chvt(int vt) {
|
||||||
int fd, r = 0;
|
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;
|
return -errno;
|
||||||
|
|
||||||
if (vt < 0) {
|
if (vt < 0) {
|
||||||
|
|
Loading…
Reference in New Issue