diff options
author | Rob Landley | 2005-09-08 03:27:06 +0000 |
---|---|---|
committer | Rob Landley | 2005-09-08 03:27:06 +0000 |
commit | 9f0e00fc61858a0e3cc6711b78e95c57b484ef7c (patch) | |
tree | c7b8e35296501484d82d6ac84ae1685df3339ccb /console-tools/chvt.c | |
parent | 230b411de87219f8a59e5d4061d7908cd44ed4d7 (diff) | |
download | busybox-9f0e00fc61858a0e3cc6711b78e95c57b484ef7c.zip busybox-9f0e00fc61858a0e3cc6711b78e95c57b484ef7c.tar.gz |
Tito sent more size tweaks.
Diffstat (limited to 'console-tools/chvt.c')
-rw-r--r-- | console-tools/chvt.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/console-tools/chvt.c b/console-tools/chvt.c index 3398892..b1a429e 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; } |