summaryrefslogtreecommitdiff
path: root/console-tools/chvt.c
diff options
context:
space:
mode:
Diffstat (limited to 'console-tools/chvt.c')
-rw-r--r--console-tools/chvt.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/console-tools/chvt.c b/console-tools/chvt.c
index e8761d5..86d3f2d 100644
--- a/console-tools/chvt.c
+++ b/console-tools/chvt.c
@@ -26,9 +26,7 @@ int chvt_main(int argc, char **argv)
fd = get_console_fd();
num = xatoul_range(argv[1], 1, 63);
- if ((-1 == ioctl(fd, VT_ACTIVATE, num))
- || (-1 == ioctl(fd, VT_WAITACTIVE, num))) {
- bb_perror_msg_and_die("ioctl");
- }
+ xioctl(fd, VT_ACTIVATE, (void *)num);
+ xioctl(fd, VT_WAITACTIVE, (void *)num);
return EXIT_SUCCESS;
}