diff options
author | bug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2004-01-14 07:34:37 +0000 |
---|---|---|
committer | bug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2004-01-14 07:34:37 +0000 |
commit | 4a1eb2c64aec396fb5f91a4e970b0472b55eb2d1 (patch) | |
tree | c31d55977330aa15327e28813e96ba1c1ff11581 | |
parent | fd3baeb88e11e17577fce29c95c228879c404524 (diff) | |
download | busybox-w32-4a1eb2c64aec396fb5f91a4e970b0472b55eb2d1.tar.gz busybox-w32-4a1eb2c64aec396fb5f91a4e970b0472b55eb2d1.tar.bz2 busybox-w32-4a1eb2c64aec396fb5f91a4e970b0472b55eb2d1.zip |
Patch by Tito, use bb_xgetlarg, reduce size
git-svn-id: svn://busybox.net/trunk/busybox@8281 69ca8d6d-28ef-0310-b511-8ec308f3f277
-rw-r--r-- | console-tools/chvt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/console-tools/chvt.c b/console-tools/chvt.c index 4da0d6399..8ea062cde 100644 --- a/console-tools/chvt.c +++ b/console-tools/chvt.c | |||
@@ -36,12 +36,12 @@ int chvt_main(int argc, char **argv) | |||
36 | { | 36 | { |
37 | int fd, num; | 37 | int fd, num; |
38 | 38 | ||
39 | if ((argc != 2) || (**(argv + 1) == '-')) { | 39 | if (argc != 2) { |
40 | bb_show_usage(); | 40 | bb_show_usage(); |
41 | } | 41 | } |
42 | 42 | ||
43 | fd = get_console_fd(); | 43 | fd = get_console_fd(); |
44 | num = atoi(argv[1]); | 44 | num = bb_xgetlarg(argv[1], 10, 0, INT_MAX); |
45 | if (ioctl(fd, VT_ACTIVATE, num)) { | 45 | if (ioctl(fd, VT_ACTIVATE, num)) { |
46 | bb_perror_msg_and_die("VT_ACTIVATE"); | 46 | bb_perror_msg_and_die("VT_ACTIVATE"); |
47 | } | 47 | } |