00001 00007 /* Embedded XINU, Copyright (C) 2007. All rights reserved. */ 00008 00009 #include <kernel.h> 00010 #include <device.h> 00011 #include <tty.h> 00012 #include <stdlib.h> 00013 00014 struct tty ttytab[NTTY]; 00015 00021 devcall ttyInit(device *pdev) 00022 { 00023 struct tty *ptty; 00024 00025 pdev->controlblk = NULL; 00026 ptty = &ttytab[pdev->minor]; 00027 bzero((void *)ptty, sizeof(struct tty)); 00028 ptty->state = TTY_STATE_FREE; 00029 00030 return OK; 00031 }