From: Glenn L McGrath Date: Wed, 14 Jan 2004 07:34:37 +0000 (-0000) Subject: Patch by Tito, use bb_xgetlarg, reduce size X-Git-Tag: 1_00_pre6~51 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6a78631164a5b3ba279fde20011aaefa1a89e7db;p=platform%2Fupstream%2Fbusybox.git Patch by Tito, use bb_xgetlarg, reduce size --- diff --git a/console-tools/chvt.c b/console-tools/chvt.c index 4da0d63..8ea062c 100644 --- a/console-tools/chvt.c +++ b/console-tools/chvt.c @@ -36,12 +36,12 @@ int chvt_main(int argc, char **argv) { int fd, num; - if ((argc != 2) || (**(argv + 1) == '-')) { + if (argc != 2) { bb_show_usage(); } fd = get_console_fd(); - num = atoi(argv[1]); + num = bb_xgetlarg(argv[1], 10, 0, INT_MAX); if (ioctl(fd, VT_ACTIVATE, num)) { bb_perror_msg_and_die("VT_ACTIVATE"); }