Annotation of researchv10dc/cmd/oworm/scsi/read.c, revision 1.1

1.1     ! root        1: #include       "scsi.h"
        !             2: 
        !             3: s_read(drive, block, nblock, o)
        !             4:        struct scsi_o *o;
        !             5: {
        !             6:        struct scsi_i input;
        !             7: 
        !             8:        input.bus_id = scsi_id;
        !             9:        input.cmd[0] = 0x28;
        !            10:        input.cmd[1] = drive<<5;
        !            11:        input.cmd[2] = block>>24;
        !            12:        input.cmd[3] = block>>16;
        !            13:        input.cmd[4] = block>>8;
        !            14:        input.cmd[5] = block;
        !            15:        input.cmd[6] = 0;
        !            16:        input.cmd[7] = nblock>>8;
        !            17:        input.cmd[8] = nblock;
        !            18:        input.cmd[9] = 0;
        !            19:        if(scsiio(&input, 0, o, 1024, "read") < 0)
        !            20:                return(1);
        !            21:        if(CHECK(*o)){
        !            22:                prcheck(1, o);
        !            23:                return(1);
        !            24:        }
        !            25:        return(0);
        !            26: }

unix.superglobalmegacorp.com

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