Annotation of researchv10dc/cmd/worm/oscsi/wren/inq.c, revision 1.1

1.1     ! root        1: #include       <stdio.h>
        !             2: #include       "../scsi.h"
        !             3: #include       "../scsish.h"
        !             4: #include       "fns.h"
        !             5: 
        !             6: extern char *gen_rmb[2];
        !             7: extern char *gen_devtype[256];
        !             8: 
        !             9: int
        !            10: wr_extinq(int niargs, int *iargs, int ncargs, char **cargs, char *err)
        !            11: {
        !            12:        struct scsi_cmd cmd;
        !            13:        struct scsi_return ret;
        !            14:        int n;
        !            15:        char vendor[9], product[17];
        !            16: 
        !            17: #pragma ref niargs
        !            18: #pragma ref iargs
        !            19: #pragma ref ncargs
        !            20: #pragma ref cargs
        !            21: 
        !            22:        set6(cmd, 0x12, 0, 0, 0, 96, 0);
        !            23:        if(n = s_io(0, &cmd, 0, &ret, 96, err))
        !            24:                return(n);
        !            25:        fixedstr(&ret.data[8], 8, vendor);
        !            26:        fixedstr(&ret.data[16], 16, product);
        !            27:        printf("inq(%d,%d): %s %s, %s/%s rev=%0.4s serial=%0.8s\n",
        !            28:                s_id, 0, gen_rmb[ret.data[1]>>7], gen_devtype[ret.data[0]],
        !            29:                vendor, product, &ret.data[32], &ret.data[36]);
        !            30:        return(0);
        !            31: }

unix.superglobalmegacorp.com

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