|
|
1.1 ! root 1: #include <stdio.h> ! 2: #include "../scsi.h" ! 3: #include "../scsish.h" ! 4: #include "fns.h" ! 5: ! 6: int ! 7: wr_diag(int niargs, int *iargs, int ncargs, char **cargs, char *err) ! 8: { ! 9: struct scsi_cmd cmd; ! 10: struct scsi_return ret; ! 11: int n; ! 12: long t; ! 13: ! 14: #pragma ref niargs ! 15: #pragma ref iargs ! 16: #pragma ref ncargs ! 17: #pragma ref cargs ! 18: ! 19: t = time((long *)0); ! 20: set6(cmd, 0x1D, 0x04, 0, 0, 0, 0); ! 21: if(n = s_io(0, &cmd, 0, &ret, 0, err)) ! 22: return(n); ! 23: set6(cmd, 0x1C, 0, 0, 0, 8, 0); ! 24: if(n = s_io(0, &cmd, 0, &ret, 8, err)) ! 25: return(n); ! 26: t = time((long *)0)-t; ! 27: printf("selftest diagnostic (%ds)\n", t); ! 28: if((ret.data[7] == 0) && (ret.data[2] == 0)) ! 29: printf("\tno errors\n"); ! 30: else ! 31: printf("\terror==#%x,#%x FRU=(#%x,#%x,#%x,#%x)\n", ! 32: ret.data[6], ret.data[7], ret.data[2], ! 33: ret.data[3], ret.data[4], ret.data[5]); ! 34: return(0); ! 35: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.