Annotation of researchv10dc/cmd/worm/scsi/generic/dev.c, revision 1.1

1.1     ! root        1: #include       <stdio.h>
        !             2: #include       "../scsi.h"
        !             3: #include       "../scsish.h"
        !             4: #include       "../tcl.h"
        !             5: #include       "fns.h"
        !             6: 
        !             7: static int gen_id(ClientData, Tcl_Interp *it, int argc, char **argv);
        !             8: 
        !             9: static Function fns[] = {
        !            10:        { "capacity", "capacity [lun=0 ...]", "L?", gen_capacity },
        !            11:        { "dev", "dev [type] # dev ? for list", "S?", gen_dev },
        !            12:        { "display", "display", "", gen_display },
        !            13:        { "help", "help [cmd]", "S?", gen_help },
        !            14:        { "id", "id [target=0]", "L?", gen_id },
        !            15:        { "inq", "inq [lun=0]", "L?", gen_inq },
        !            16:        { "read", "read lun start [count [file]]", "LII?", gen_read },
        !            17:        { "readt", "readt base count [lun=0]", "IIL?", gen_readt },
        !            18:        { "reset", "reset", "", gen_reset },
        !            19:        { "scsi", "scsi bytes... # 6 or 10", "I?I?I?I?I?I?I?I?I?I?", gen_scsi },
        !            20:        { "sense", "sense [lun=0]", "L?", gen_sense },
        !            21:        { "start", "start [lun=0]", "L?", gen_start },
        !            22:        { "stop", "stop [lun=0]", "L?", gen_stop },
        !            23:        { "testunit", "testunit [lun=0", "L?", gen_tur },
        !            24:        { 0 }
        !            25: };
        !            26: 
        !            27: Device genericdev = {
        !            28:        "scsi", "generic scsi",
        !            29:        gen_extsense,
        !            30:        fns
        !            31: };
        !            32: 
        !            33: static int
        !            34: gen_id(ClientData err, Tcl_Interp *it, int argc, char **argv)
        !            35: {
        !            36: #pragma ref it
        !            37: #pragma ref err
        !            38: 
        !            39:        if(argc <= 1)
        !            40:                printf("current SCSI id = %d\n", s_id);
        !            41:        else
        !            42:                scsi_target(atoi(argv[1]));
        !            43:        return(TCL_OK);
        !            44: }

unix.superglobalmegacorp.com

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