diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2006-10-08 12:49:22 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2006-10-08 12:49:22 +0000 |
commit | 1385899416a4396385ad421ae1f532be7103738a (patch) | |
tree | fc4d14a910593d1235318bb36abe5e9f72d2039e /console-tools/openvt.c | |
parent | 5625415085e68ac5e150f54e685417c866620d76 (diff) | |
download | busybox-w32-1385899416a4396385ad421ae1f532be7103738a.tar.gz busybox-w32-1385899416a4396385ad421ae1f532be7103738a.tar.bz2 busybox-w32-1385899416a4396385ad421ae1f532be7103738a.zip |
attempt to regularize atoi mess.
Diffstat (limited to 'console-tools/openvt.c')
-rw-r--r-- | console-tools/openvt.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/console-tools/openvt.c b/console-tools/openvt.c index 0c0cef23c..f1cf5645b 100644 --- a/console-tools/openvt.c +++ b/console-tools/openvt.c | |||
@@ -10,14 +10,6 @@ | |||
10 | 10 | ||
11 | /* getopt not needed */ | 11 | /* getopt not needed */ |
12 | 12 | ||
13 | #include <stdio.h> | ||
14 | #include <stdlib.h> | ||
15 | #include <unistd.h> | ||
16 | #include <fcntl.h> | ||
17 | #include <string.h> | ||
18 | #include <sys/types.h> | ||
19 | #include <ctype.h> | ||
20 | |||
21 | #include "busybox.h" | 13 | #include "busybox.h" |
22 | 14 | ||
23 | int openvt_main(int argc, char **argv) | 15 | int openvt_main(int argc, char **argv) |
@@ -29,8 +21,8 @@ int openvt_main(int argc, char **argv) | |||
29 | if (argc < 3) { | 21 | if (argc < 3) { |
30 | bb_show_usage(); | 22 | bb_show_usage(); |
31 | } | 23 | } |
32 | /* check for Illegal vt number: < 1 or > 12 */ | 24 | /* check for illegal vt number: < 1 or > 63 */ |
33 | sprintf(vtname, VC_FORMAT, (int)bb_xgetlarg(argv[1], 10, 1, 12)); | 25 | sprintf(vtname, VC_FORMAT, (int)xatoul_range(argv[1], 1, 63)); |
34 | 26 | ||
35 | if (fork() == 0) { | 27 | if (fork() == 0) { |
36 | /* leave current vt */ | 28 | /* leave current vt */ |