Annotation of xinu/sys/read.c, revision 1.1.1.2

1.1       root        1: /* read.c - read */
                      2: 
                      3: #include <conf.h>
                      4: #include <kernel.h>
                      5: #include <io.h>
                      6: 
                      7: /*------------------------------------------------------------------------
1.1.1.2 ! root        8:  *  read  -  read 1 or more bytes from a device
1.1       root        9:  *------------------------------------------------------------------------
                     10:  */
1.1.1.2 ! root       11: read(descrp, buff, count)
1.1       root       12: int descrp, count;
                     13: char *buff;
                     14: {
                     15:        struct  devsw   *devptr;
                     16: 
1.1.1.2 ! root       17: #ifdef DEBUG
        !            18:        dotrace("read", &descrp, 3);
        !            19: #endif
1.1       root       20:        if (isbaddev(descrp) )
                     21:                return(SYSERR);
                     22:        devptr = &devtab[descrp];
                     23:        return( (*devptr->dvread)(devptr,buff,count) );
                     24: }

unix.superglobalmegacorp.com

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