From 9f0e00fc61858a0e3cc6711b78e95c57b484ef7c Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Thu, 8 Sep 2005 03:27:06 +0000 Subject: Tito sent more size tweaks. --- console-tools/chvt.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'console-tools/chvt.c') diff --git a/console-tools/chvt.c b/console-tools/chvt.c index 3398892f5..b1a429eb3 100644 --- a/console-tools/chvt.c +++ b/console-tools/chvt.c @@ -42,11 +42,9 @@ int chvt_main(int argc, char **argv) fd = get_console_fd(); num = bb_xgetlarg(argv[1], 10, 0, INT_MAX); - if (ioctl(fd, VT_ACTIVATE, num)) { - bb_perror_msg_and_die("VT_ACTIVATE"); - } - if (ioctl(fd, VT_WAITACTIVE, num)) { - bb_perror_msg_and_die("VT_WAITACTIVE"); + if((-1 == ioctl(fd, VT_ACTIVATE, num)) || + (-1 == ioctl(fd, VT_WAITACTIVE, num))) { + bb_perror_msg_and_die("ioctl"); } return EXIT_SUCCESS; } -- cgit v1.2.3-55-g6feb