projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1cda715
)
Patch by Tito, use bb_xgetlarg, reduce size
author
Glenn L McGrath
<bug1@ihug.co.nz>
Wed, 14 Jan 2004 07:34:37 +0000
(07:34 -0000)
committer
Glenn L McGrath
<bug1@ihug.co.nz>
Wed, 14 Jan 2004 07:34:37 +0000
(07:34 -0000)
console-tools/chvt.c
patch
|
blob
|
history
diff --git
a/console-tools/chvt.c
b/console-tools/chvt.c
index 4da0d6399520a659aaeb692a4abeea56fccf1e20..8ea062cde55c22e8ac2bc243751b1bc68c05f6be 100644
(file)
--- 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");
}