Annotation of researchv10no/cmd/worm/scsi/sony/diskid.c, revision 1.1.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: int
                      8: sony_diskid(ClientData cd, Tcl_Interp *it, int argc, char **argv)
                      9: {
                     10:        struct scsi_cmd cmd;
                     11:        struct scsi_return ret;
                     12:        int i, unit;
                     13: 
                     14:        if(argc <= 1)
                     15:                argv[i = 0] = "0";
                     16:        else
                     17:                i = 1;
                     18:        for(; i < argc; i++){
                     19:                unit = atoi(argv[i]);
                     20:                set6(cmd, 0xC2, unit<<5, 0, 0, 0, 0);
                     21:                if(s_io(0, &cmd, 0, &ret, 1024, cd->err))
                     22:                        ERR_RETURN
                     23:                printf("(%d,%d) disk id block:\n", s_id, unit);
                     24:                xd(ret.data, 1024, stdout);
                     25:        }
                     26:        return(TCL_OK);
                     27: }

unix.superglobalmegacorp.com

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