Annotation of lucent/sys/src/9/port/streboot.c, revision 1.1

1.1     ! root        1: #include       "u.h"
        !             2: #include       "../port/lib.h"
        !             3: #include       "mem.h"
        !             4: #include       "dat.h"
        !             5: #include       "fns.h"
        !             6: #include       "../port/error.h"
        !             7: 
        !             8: /*
        !             9:  *  reboot stream module definition
        !            10:  */
        !            11: static void rebootopen(Queue*, Stream*);
        !            12: static void rebootiput(Queue*, Block*);
        !            13: static void rebootoput(Queue*, Block*);
        !            14: static void rebootreset(void);
        !            15: Qinfo rebootinfo =
        !            16: {
        !            17:        rebootiput,
        !            18:        rebootoput,
        !            19:        rebootopen,
        !            20:        0,
        !            21:        "reboot",
        !            22:        0
        !            23: };
        !            24: 
        !            25: void
        !            26: strebootlink(void)
        !            27: {
        !            28:        newqinfo(&rebootinfo);
        !            29: }
        !            30: 
        !            31: static void
        !            32: rebootopen(Queue *q, Stream *s)
        !            33: {
        !            34:        USED(q);
        !            35:        USED(s);
        !            36:        if(strcmp(u->p->user, eve) != 0)
        !            37:                error(Eperm);
        !            38: }
        !            39: 
        !            40: void
        !            41: rebootoput(Queue *q, Block *bp)
        !            42: {
        !            43:        PUTNEXT(q, bp);
        !            44: }
        !            45: 
        !            46: static void
        !            47: rebootiput(Queue *q, Block *bp)
        !            48: {
        !            49:        if(bp->type == M_HANGUP){
        !            50:                print("lost connection to fs, rebooting");
        !            51:                exit(0);
        !            52:        }
        !            53:        PUTNEXT(q, bp);
        !            54: }

unix.superglobalmegacorp.com

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