diff options
Diffstat (limited to 'release/picobsd/tinyware/oinit/oinit.c')
-rw-r--r-- | release/picobsd/tinyware/oinit/oinit.c | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/release/picobsd/tinyware/oinit/oinit.c b/release/picobsd/tinyware/oinit/oinit.c index 1bf70bdaf3432..01f8b9741e5be 100644 --- a/release/picobsd/tinyware/oinit/oinit.c +++ b/release/picobsd/tinyware/oinit/oinit.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: oinit.c,v 1.2 1998/10/15 21:40:07 abial Exp $ + * $Id: oinit.c,v 1.1.1.1 1998/08/27 17:38:45 abial Exp $ */ /* @@ -83,7 +83,7 @@ extern char **environ; /* Struct for holding session state */ struct sess { - char tty[16]; /* vty device path */ + char tty[11]; /* vty device path */ pid_t pid; /* pid of process running on it */ int (*func)(int argc, char **argv); /* internal function to run on it (after forking) */ @@ -646,16 +646,6 @@ runcom() void runcom(char *fname) { - int fd; - - close(0); - close(1); - close(2); - fd=open(_PATH_CONSOLE,O_RDWR); - dup2(fd,0); - dup2(fd,1); - dup2(fd,2); - if(fd>2) close(fd); sourcer(fname); } #endif @@ -912,13 +902,9 @@ main(int argc, char **argv) mount("devfs","/dev",MNT_NOEXEC|MNT_RDONLY,0); /* Fill in the sess structures. */ - /* XXX Really, should be filled based upon config file. */ + /* XXX Really, should be filled basing on config file. */ for(i=0;i<MAX_CONS;i++) { - if(i==0) { - sprintf(ttys[i].tty,"/dev/console"); - } else { - sprintf(ttys[i].tty,"/dev/ttyv%c",vty[i]); - } + sprintf(ttys[i].tty,"/dev/ttyv%c",vty[i]); ttys[i].pid=0; ttys[i].func=shell; } |