Annotation of researchv10no/cmd/worm/scsi/sony/config.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 char mtab[5][2] =
        !             8: {
        !             9:        '0', '0', '1', '1', '1', '2', '2', '2', '?', '?'
        !            10: };
        !            11: static char *brdname[] = {
        !            12:        "no doard", "T.D. Systems Viking", "U.S. Design 1158"
        !            13: };
        !            14: 
        !            15: int
        !            16: sony_conf(ClientData cd, Tcl_Interp *it, int argc, char **argv)
        !            17: {
        !            18:        struct scsi_cmd cmd;
        !            19:        struct scsi_return ret;
        !            20:        int n, i;
        !            21:        char buf[512];
        !            22: 
        !            23: #pragma ref argc
        !            24: #pragma ref argv
        !            25: 
        !            26:        set6(cmd, 0x12, 0, 0, 0, 44, 0);
        !            27:        if(n = s_io(0, &cmd, 0, &ret, 44, cd->err))
        !            28:                ERR_RETURN
        !            29:        i = min(ret.data[37], 4);
        !            30:        fixedstr(&ret.data[8], 28, buf);
        !            31:        printf("config(%d,%d): %s device, '%s', %c controller%s, %c drive%s\n",
        !            32:                s_id, 0, (ret.data[0] == 0x4)? "WORM":"Unknown",
        !            33:                buf, mtab[i][0], (mtab[i][0] == '1')?"":"s",
        !            34:                mtab[i][1], (mtab[i][1] == '1')?"":"s");
        !            35:        printf("\tUnibus-SCSI controller=%s\n", brdname[ret.type]);
        !            36:        printf("\tROMS:");
        !            37:        if(ret.data[38] != 0xFF)
        !            38:                printf(" up cont.=0x%x,", ret.data[38]);
        !            39:        if(ret.data[40] != 0xFF)
        !            40:                printf(" lo cont.=0x%x,", ret.data[40]);
        !            41:        printf( " IF-129=0x%x, SY-46=0x%x, SS-30=0x%x\n", ret.data[36],
        !            42:                ret.data[42], ret.data[43]);
        !            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.