aboutsummaryrefslogtreecommitdiff
path: root/console-tools/openvt.c
diff options
context:
space:
mode:
Diffstat (limited to 'console-tools/openvt.c')
-rw-r--r--console-tools/openvt.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/console-tools/openvt.c b/console-tools/openvt.c
index 3bb0a9210..c4746dfd3 100644
--- a/console-tools/openvt.c
+++ b/console-tools/openvt.c
@@ -60,7 +60,7 @@ static int get_vt_fd(void)
60 /* Do we, by chance, already have it? */ 60 /* Do we, by chance, already have it? */
61 for (fd = 0; fd < 3; fd++) 61 for (fd = 0; fd < 3; fd++)
62 if (!not_vt_fd(fd)) 62 if (!not_vt_fd(fd))
63 return fd; 63 return fd;
64 /* _only_ O_NONBLOCK: ask for neither read not write perms */ 64 /* _only_ O_NONBLOCK: ask for neither read not write perms */
65 fd = open(DEV_CONSOLE, O_NONBLOCK); 65 fd = open(DEV_CONSOLE, O_NONBLOCK);
66 if (fd >= 0 && !not_vt_fd(fd)) 66 if (fd >= 0 && !not_vt_fd(fd))
@@ -73,7 +73,7 @@ static int find_free_vtno(void)
73 int vtno; 73 int vtno;
74 int fd = get_vt_fd(); 74 int fd = get_vt_fd();
75 75
76 errno = 0; 76 errno = 0;
77 /*xfunc_error_retval = 3; - do we need compat? */ 77 /*xfunc_error_retval = 3; - do we need compat? */
78 if (ioctl(fd, VT_OPENQRY, &vtno) != 0 || vtno <= 0) 78 if (ioctl(fd, VT_OPENQRY, &vtno) != 0 || vtno <= 0)
79 bb_perror_msg_and_die("can't find open VT"); 79 bb_perror_msg_and_die("can't find open VT");
@@ -138,7 +138,7 @@ int openvt_main(int argc ATTRIBUTE_UNUSED, char **argv)
138 close(0); 138 close(0);
139 /*setsid(); - BAD IDEA: after we exit, child is SIGHUPed... */ 139 /*setsid(); - BAD IDEA: after we exit, child is SIGHUPed... */
140 xopen(vtname, O_RDWR); 140 xopen(vtname, O_RDWR);
141 xioctl(0, VT_GETSTATE, &vtstat); 141 xioctl(0, VT_GETSTATE, &vtstat);
142 142
143 if (flags & OPT_s) { 143 if (flags & OPT_s) {
144 xioctl(0, VT_ACTIVATE, (void*)(ptrdiff_t)vtno); 144 xioctl(0, VT_ACTIVATE, (void*)(ptrdiff_t)vtno);