Annotation of 43BSD/sys/stand/conf.c, revision 1.1

1.1     ! root        1: /*
        !             2:  * Copyright (c) 1982, 1986 Regents of the University of California.
        !             3:  * All rights reserved.  The Berkeley software License Agreement
        !             4:  * specifies the terms and conditions for redistribution.
        !             5:  *
        !             6:  *     @(#)conf.c      7.1 (Berkeley) 6/5/86
        !             7:  */
        !             8: 
        !             9: #include "../machine/pte.h"
        !            10: 
        !            11: #include "../h/param.h"
        !            12: #include "../h/inode.h"
        !            13: #include "../h/fs.h"
        !            14: 
        !            15: #include "../vaxmba/mbareg.h"
        !            16: 
        !            17: #include "saio.h"
        !            18: 
        !            19: devread(io)
        !            20:        register struct iob *io;
        !            21: {
        !            22:        int cc;
        !            23: 
        !            24:        io->i_flgs |= F_RDDATA;
        !            25:        io->i_error = 0;
        !            26:        cc = (*devsw[io->i_ino.i_dev].dv_strategy)(io, READ);
        !            27:        io->i_flgs &= ~F_TYPEMASK;
        !            28:        return (cc);
        !            29: }
        !            30: 
        !            31: devwrite(io)
        !            32:        register struct iob *io;
        !            33: {
        !            34:        int cc;
        !            35: 
        !            36:        io->i_flgs |= F_WRDATA;
        !            37:        io->i_error = 0;
        !            38:        cc = (*devsw[io->i_ino.i_dev].dv_strategy)(io, WRITE);
        !            39:        io->i_flgs &= ~F_TYPEMASK;
        !            40:        return (cc);
        !            41: }
        !            42: 
        !            43: devopen(io)
        !            44:        register struct iob *io;
        !            45: {
        !            46: 
        !            47:        (*devsw[io->i_ino.i_dev].dv_open)(io);
        !            48: }
        !            49: 
        !            50: devclose(io)
        !            51:        register struct iob *io;
        !            52: {
        !            53: 
        !            54:        (*devsw[io->i_ino.i_dev].dv_close)(io);
        !            55: }
        !            56: 
        !            57: devioctl(io, cmd, arg)
        !            58:        register struct iob *io;
        !            59:        int cmd;
        !            60:        caddr_t arg;
        !            61: {
        !            62: 
        !            63:        return ((*devsw[io->i_ino.i_dev].dv_ioctl)(io, cmd, arg));
        !            64: }
        !            65: 
        !            66: /*ARGSUSED*/
        !            67: nullsys(io)
        !            68:        struct iob *io;
        !            69: {
        !            70: 
        !            71:        ;
        !            72: }
        !            73: 
        !            74: /*ARGSUSED*/
        !            75: nullioctl(io, cmd, arg)
        !            76:        struct iob *io;
        !            77:        int cmd;
        !            78:        caddr_t arg;
        !            79: {
        !            80: 
        !            81:        return (ECMD);
        !            82: }
        !            83: 
        !            84: int    nullsys(), nullioctl();
        !            85: #if defined(VAX780) || defined(VAX750) || defined(VAX8600)
        !            86: int    hpstrategy(), hpopen(), hpioctl();
        !            87: #endif
        !            88: #if defined(VAX780) || defined(VAX750) || defined(VAX8600)
        !            89: int    upstrategy(), upopen(), upioctl();
        !            90: #endif
        !            91: int    rkstrategy(), rkopen(), rkioctl();
        !            92: int    rastrategy(), raopen(), raioctl();
        !            93: #if defined(VAX730)
        !            94: int    idcstrategy(), idcopen(), idcioctl();
        !            95: #endif
        !            96: int    rlstrategy(), rlopen(), rlioctl();
        !            97: #ifndef BOOT
        !            98: int    tmstrategy(), tmopen(), tmclose();
        !            99: int    tsstrategy(), tsopen(), tsclose();
        !           100: #if defined(VAX780) || defined(VAX750) || defined(VAX8600)
        !           101: int    htstrategy(), htopen(), htclose();
        !           102: int    mtstrategy(), mtopen(), mtclose();
        !           103: #endif
        !           104: int    utstrategy(), utopen(), utclose();
        !           105: #endif
        !           106: 
        !           107: struct devsw devsw[] = {
        !           108: #if defined(VAX780) || defined(VAX750) || defined(VAX8600)
        !           109:        { "hp", hpstrategy,     hpopen,         nullsys,        hpioctl },
        !           110: #endif
        !           111: #if defined(VAX780) || defined(VAX750) || defined(VAX8600)
        !           112:        { "up", upstrategy,     upopen,         nullsys,        upioctl },
        !           113: #endif
        !           114:        { "hk", rkstrategy,     rkopen,         nullsys,        rkioctl },
        !           115:        { "ra", rastrategy,     raopen,         nullsys,        raioctl },
        !           116: #if defined(VAX730)
        !           117:        { "rb", idcstrategy,    idcopen,        nullsys,        idcioctl },
        !           118: #endif
        !           119:        { "rl", rlstrategy,     rlopen,         nullsys,        rlioctl },
        !           120: #ifndef BOOT
        !           121:        { "ts", tsstrategy,     tsopen,         tsclose,        nullioctl },
        !           122: #if defined(VAX780) || defined(VAX750) || defined(VAX8600)
        !           123:        { "ht", htstrategy,     htopen,         htclose,        nullioctl },
        !           124:        { "mt", mtstrategy,     mtopen,         mtclose,        nullioctl },
        !           125: #endif
        !           126:        { "tm", tmstrategy,     tmopen,         tmclose,        nullioctl },
        !           127:        { "ut", utstrategy,     utopen,         utclose,        nullioctl },
        !           128: #endif
        !           129:        { 0, 0, 0, 0, 0 },
        !           130: };

unix.superglobalmegacorp.com

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