diff options
author | Erik Andersen <andersen@codepoet.org> | 2000-02-08 19:58:47 +0000 |
---|---|---|
committer | Erik Andersen <andersen@codepoet.org> | 2000-02-08 19:58:47 +0000 |
commit | e49d5ecbbe51718fa925b6890a735e5937cc2aa2 (patch) | |
tree | c90bda10731ad9333ce3b404f993354c9fc104b8 /console-tools/chvt.c | |
parent | c0bf817bbc5c7867fbe8fb76d5c39f8ee802692f (diff) | |
download | busybox-w32-e49d5ecbbe51718fa925b6890a735e5937cc2aa2.tar.gz busybox-w32-e49d5ecbbe51718fa925b6890a735e5937cc2aa2.tar.bz2 busybox-w32-e49d5ecbbe51718fa925b6890a735e5937cc2aa2.zip |
Some formatting updates (ran the code through indent)
-Erik
Diffstat (limited to 'console-tools/chvt.c')
-rw-r--r-- | console-tools/chvt.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/console-tools/chvt.c b/console-tools/chvt.c index bea00ea83..a32bd3e78 100644 --- a/console-tools/chvt.c +++ b/console-tools/chvt.c | |||
@@ -1,3 +1,4 @@ | |||
1 | /* vi: set sw=4 ts=4: */ | ||
1 | /* | 2 | /* |
2 | * chvt.c - aeb - 940227 - Change virtual terminal | 3 | * chvt.c - aeb - 940227 - Change virtual terminal |
3 | * | 4 | * |
@@ -13,24 +14,23 @@ | |||
13 | 14 | ||
14 | extern int getfd(void); | 15 | extern int getfd(void); |
15 | 16 | ||
16 | int | 17 | int chvt_main(int argc, char **argv) |
17 | chvt_main(int argc, char** argv) | ||
18 | { | 18 | { |
19 | int fd, num; | 19 | int fd, num; |
20 | 20 | ||
21 | if ( ( argc != 2) || (**(argv+1) == '-' ) ) { | 21 | if ((argc != 2) || (**(argv + 1) == '-')) { |
22 | usage ("chvt N\n\nChange foreground virtual terminal to /dev/ttyN\n"); | 22 | usage |
23 | } | 23 | ("chvt N\n\nChange foreground virtual terminal to /dev/ttyN\n"); |
24 | fd = get_console_fd("/dev/console"); | 24 | } |
25 | num = atoi(argv[1]); | 25 | fd = get_console_fd("/dev/console"); |
26 | if (ioctl(fd,VT_ACTIVATE,num)) { | 26 | num = atoi(argv[1]); |
27 | perror("VT_ACTIVATE"); | 27 | if (ioctl(fd, VT_ACTIVATE, num)) { |
28 | exit(FALSE); | 28 | perror("VT_ACTIVATE"); |
29 | } | 29 | exit(FALSE); |
30 | if (ioctl(fd,VT_WAITACTIVE,num)) { | 30 | } |
31 | perror("VT_WAITACTIVE"); | 31 | if (ioctl(fd, VT_WAITACTIVE, num)) { |
32 | exit(FALSE); | 32 | perror("VT_WAITACTIVE"); |
33 | } | 33 | exit(FALSE); |
34 | exit( TRUE); | 34 | } |
35 | exit(TRUE); | ||
35 | } | 36 | } |
36 | |||