Annotation of 42BSD/sys/stand/confhp.c, revision 1.1

1.1     ! root        1: /*     confhp.c        6.1     83/07/29        */
        !             2: 
        !             3: #include "../machine/pte.h"
        !             4: 
        !             5: #include "../h/param.h"
        !             6: #include "../h/inode.h"
        !             7: #include "../h/fs.h"
        !             8: #include "saio.h"
        !             9: 
        !            10: devread(io)
        !            11:        register struct iob *io;
        !            12: {
        !            13:        int cc;
        !            14: 
        !            15:        io->i_flgs |= F_RDDATA;
        !            16:        io->i_error = 0;
        !            17:        cc = (*devsw[io->i_ino.i_dev].dv_strategy)(io, READ);
        !            18:        io->i_flgs &= ~F_TYPEMASK;
        !            19:        return (cc);
        !            20: }
        !            21: 
        !            22: devwrite(io)
        !            23:        register struct iob *io;
        !            24: {
        !            25:        int cc;
        !            26: 
        !            27:        io->i_flgs |= F_WRDATA;
        !            28:        io->i_error = 0;
        !            29:        cc = (*devsw[io->i_ino.i_dev].dv_strategy)(io, WRITE);
        !            30:        io->i_flgs &= ~F_TYPEMASK;
        !            31:        return (cc);
        !            32: }
        !            33: 
        !            34: devopen(io)
        !            35:        register struct iob *io;
        !            36: {
        !            37: 
        !            38:        (*devsw[io->i_ino.i_dev].dv_open)(io);
        !            39: }
        !            40: 
        !            41: devclose(io)
        !            42:        register struct iob *io;
        !            43: {
        !            44: 
        !            45:        (*devsw[io->i_ino.i_dev].dv_close)(io);
        !            46: }
        !            47: 
        !            48: devioctl(io, cmd, arg)
        !            49:        register struct iob *io;
        !            50:        int cmd;
        !            51:        caddr_t arg;
        !            52: {
        !            53: 
        !            54:        return ((*devsw[io->i_ino.i_dev].dv_ioctl)(io, cmd, arg));
        !            55: }
        !            56: 
        !            57: /*ARGSUSED*/
        !            58: nullsys(io)
        !            59:        struct iob *io;
        !            60: {
        !            61: 
        !            62:        ;
        !            63: }
        !            64: 
        !            65: /*ARGSUSED*/
        !            66: nullioctl(io, cmd, arg)
        !            67:        struct iob *io;
        !            68:        int cmd;
        !            69:        caddr_t arg;
        !            70: {
        !            71: 
        !            72:        return (ECMD);
        !            73: }
        !            74: 
        !            75: int    nullsys(), nullioctl();
        !            76: int    hpstrategy(), hpopen(), hpioctl();
        !            77: 
        !            78: struct devsw devsw[] = {
        !            79:        { "hp", hpstrategy,     hpopen,         nullsys,        hpioctl },
        !            80:        { 0, 0, 0, 0, 0 }
        !            81: };

unix.superglobalmegacorp.com

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