Annotation of xinu/sys/ttyopen.c, revision 1.1

1.1     ! root        1: /* ttyopen.c - ttyopen */
        !             2: 
        !             3: #include <conf.h>
        !             4: #include <kernel.h>
        !             5: 
        !             6: /*------------------------------------------------------------------------
        !             7:  *  ttyopen - open tty device and return return descriptor (for namespace)
        !             8:  *------------------------------------------------------------------------
        !             9:  */
        !            10: ttyopen(devptr, nam, mode)
        !            11: struct devsw   *devptr;
        !            12: char   *nam;
        !            13: char   *mode;
        !            14: {
        !            15: 
        !            16:        /* This routine is not usually used to open tty devices,   */
        !            17:        /* but is provided so that automatic calls to open do not  */
        !            18:        /* fail.  It returns SYSERR unless called with a null name */
        !            19: 
        !            20:        if (*nam == '\0')
        !            21:                return( devptr->dvnum );
        !            22:        else
        !            23:                return(SYSERR);
        !            24: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.