mirror of
https://github.com/sheumann/hush.git
synced 2024-12-21 23:29:34 +00:00
Patch by Tito, use bb_xgetlarg, reduce size
This commit is contained in:
parent
1cda715bbc
commit
6a78631164
@ -36,12 +36,12 @@ int chvt_main(int argc, char **argv)
|
|||||||
{
|
{
|
||||||
int fd, num;
|
int fd, num;
|
||||||
|
|
||||||
if ((argc != 2) || (**(argv + 1) == '-')) {
|
if (argc != 2) {
|
||||||
bb_show_usage();
|
bb_show_usage();
|
||||||
}
|
}
|
||||||
|
|
||||||
fd = get_console_fd();
|
fd = get_console_fd();
|
||||||
num = atoi(argv[1]);
|
num = bb_xgetlarg(argv[1], 10, 0, INT_MAX);
|
||||||
if (ioctl(fd, VT_ACTIVATE, num)) {
|
if (ioctl(fd, VT_ACTIVATE, num)) {
|
||||||
bb_perror_msg_and_die("VT_ACTIVATE");
|
bb_perror_msg_and_die("VT_ACTIVATE");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user