Patch by Tito, remove some unneeded variables to save some space.

This commit is contained in:
Glenn L McGrath 2004-01-13 10:12:16 +00:00
parent 447bc2d17f
commit dfb6211df3

View File

@ -32,31 +32,22 @@
#include "busybox.h" #include "busybox.h"
#define VTNAME "/dev/tty%d"
int openvt_main(int argc, char **argv) int openvt_main(int argc, char **argv)
{ {
int pid;
int fd; int fd;
int vtno; char vtname[sizeof VC_FORMAT + 2];
char vtname[sizeof VTNAME + 2];
if (argc < 3) if (argc < 3)
bb_show_usage(); bb_show_usage();
if (!isdigit(argv[1][0])) /* check for Illegal vt number: < 1 or > 12 */
bb_show_usage(); sprintf(vtname, VC_FORMAT,(int)bb_xgetlarg(argv[1], 10, 1, 12));
/* check for Illegal vt number */
vtno=bb_xgetlarg(argv[1], 10, 1, 12);
sprintf(vtname, VTNAME, vtno);
argv+=2; argv+=2;
argc-=2; argc-=2;
if((pid = fork()) == 0) { if(fork() == 0) {
/* leave current vt */ /* leave current vt */
#ifdef ESIX_5_3_2_D #ifdef ESIX_5_3_2_D