|
|
1.1 root 1: #include <stdio.h>
2: #include "../scsi.h"
3: #include "../scsish.h"
4: #include "fns.h"
5:
6: static char mtab[5][2] =
7: {
8: '0', '0', '1', '1', '1', '2', '2', '2', '?', '?'
9: };
10: static char *brdname[] = {
11: "no doard", "T.D. Systems Viking", "U.S. Design 1158"
12: };
13:
14: int
15: sony_conf(int niargs, int *iargs, int ncargs, char **cargs, char *err)
16: {
17: struct scsi_cmd cmd;
18: struct scsi_return ret;
19: int n, i;
20: char buf[512];
21:
22: #pragma ref niargs
23: #pragma ref iargs
24: #pragma ref ncargs
25: #pragma ref cargs
26:
27: set6(cmd, 0x12, 0, 0, 0, 44, 0);
28: if(n = s_io(0, &cmd, 0, &ret, 44, err))
29: return(n);
30: i = min(ret.data[37], 4);
31: fixedstr(&ret.data[8], 28, buf);
32: printf("config(%d,%d): %s device, '%s', %c controller%s, %c drive%s\n",
33: s_id, 0, (ret.data[0] == 0x4)? "WORM":"Unknown",
34: buf, mtab[i][0], (mtab[i][0] == '1')?"":"s",
35: mtab[i][1], (mtab[i][1] == '1')?"":"s");
36: printf("\tUnibus-SCSI controller=%s\n", brdname[ret.type]);
37: printf("\tROMS:");
38: if(ret.data[38] != 0xFF)
39: printf(" upper controller=0x%x,", ret.data[38]);
40: if(ret.data[40] != 0xFF)
41: printf(" lower controller=0x%x,", ret.data[40]);
42: printf( " IF-129=0x%x, SY-46=0x%x, SS-30=0x%x\n", ret.data[36],
43: ret.data[42], ret.data[43]);
44: return(0);
45: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.