aboutsummaryrefslogtreecommitdiff
path: root/console-tools
diff options
context:
space:
mode:
authorGlenn L McGrath <bug1@ihug.co.nz>2004-01-14 07:34:37 +0000
committerGlenn L McGrath <bug1@ihug.co.nz>2004-01-14 07:34:37 +0000
commit6a78631164a5b3ba279fde20011aaefa1a89e7db (patch)
treec31d55977330aa15327e28813e96ba1c1ff11581 /console-tools
parent1cda715bbcaba253ffb81463f6b9260154e7a32d (diff)
downloadbusybox-6a78631164a5b3ba279fde20011aaefa1a89e7db.tar.gz
Patch by Tito, use bb_xgetlarg, reduce size
Diffstat (limited to 'console-tools')
-rw-r--r--console-tools/chvt.c4
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)
{
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");
}