diff options
Diffstat (limited to 'console-tools/openvt.c')
-rw-r--r-- | console-tools/openvt.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/console-tools/openvt.c b/console-tools/openvt.c index 77c897597..519513623 100644 --- a/console-tools/openvt.c +++ b/console-tools/openvt.c | |||
@@ -43,16 +43,16 @@ int openvt_main(int argc, char **argv) | |||
43 | char * cmd_args = NULL; | 43 | char * cmd_args = NULL; |
44 | 44 | ||
45 | if (argc < 3) | 45 | if (argc < 3) |
46 | show_usage(); | 46 | bb_show_usage(); |
47 | 47 | ||
48 | if (!isdigit(argv[1][0])) | 48 | if (!isdigit(argv[1][0])) |
49 | show_usage(); | 49 | bb_show_usage(); |
50 | 50 | ||
51 | vtno = (int) atol(argv[1]); | 51 | vtno = (int) atol(argv[1]); |
52 | 52 | ||
53 | /* if (vtno <= 0 || vtno > 63) */ | 53 | /* if (vtno <= 0 || vtno > 63) */ |
54 | if (vtno <= 0 || vtno > 12) | 54 | if (vtno <= 0 || vtno > 12) |
55 | error_msg_and_die("Illegal vt number (%d)", vtno); | 55 | bb_error_msg_and_die("Illegal vt number (%d)", vtno); |
56 | 56 | ||
57 | sprintf(vtname, VTNAME, vtno); | 57 | sprintf(vtname, VTNAME, vtno); |
58 | 58 | ||
@@ -69,13 +69,13 @@ int openvt_main(int argc, char **argv) | |||
69 | if (setsid() < 0) { | 69 | if (setsid() < 0) { |
70 | #endif | 70 | #endif |
71 | 71 | ||
72 | perror_msg_and_die("Unable to set new session"); | 72 | bb_perror_msg_and_die("Unable to set new session"); |
73 | } | 73 | } |
74 | close(0); /* so that new vt becomes stdin */ | 74 | close(0); /* so that new vt becomes stdin */ |
75 | 75 | ||
76 | /* and grab new one */ | 76 | /* and grab new one */ |
77 | if ((fd = open(vtname, O_RDWR)) == -1) | 77 | if ((fd = open(vtname, O_RDWR)) == -1) |
78 | perror_msg_and_die("could not open %s", vtname); | 78 | bb_perror_msg_and_die("could not open %s", vtname); |
79 | 79 | ||
80 | /* Reassign stdout and sterr */ | 80 | /* Reassign stdout and sterr */ |
81 | close(1); | 81 | close(1); |