summaryrefslogtreecommitdiff
path: root/sys/src/cmd/cwfs/data.c
blob: 0f02af6540551b50a41467db0236b4a0867b5902 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
#include	"all.h"

char	*errstr9p[MAXERR] =
{
	[Ebadspc]	"attach -- bad specifier",
	[Efid]		"unknown fid",
	[Echar]		"bad character in directory name",
	[Eopen]		"read/write -- on non open fid",
	[Ecount]	"read/write -- count too big",
	[Ealloc]	"phase error -- directory entry not allocated",
	[Eqid]		"phase error -- qid does not match",
	[Eaccess]	"access permission denied",
	[Eentry]	"directory entry not found",
	[Emode]		"open/create -- unknown mode",
	[Edir1]		"walk -- in a non-directory",
	[Edir2]		"create -- in a non-directory",
	[Ephase]	"phase error -- cannot happen",
	[Eexist]	"create/wstat -- file exists",
	[Edot]		"create/wstat -- . and .. illegal names",
	[Eempty]	"remove -- directory not empty",
	[Ebadu]		"attach -- unknown user or failed authentication",
	[Enoattach]	"attach -- system maintenance",
	[Ewstatb]	"wstat -- unknown bits in qid.type/mode",
	[Ewstatd]	"wstat -- attempt to change directory",
	[Ewstatg]	"wstat -- not in group",
	[Ewstatl]	"wstat -- attempt to make length negative",
	[Ewstatm]	"wstat -- attempt to change muid",
	[Ewstato]	"wstat -- not owner or group leader",
	[Ewstatp]	"wstat -- attempt to change qid.path",
	[Ewstatq]	"wstat -- qid.type/dir.mode mismatch",
	[Ewstatu]	"wstat -- not owner",
	[Ewstatv]	"wstat -- attempt to change qid.vers",
	[Ename]		"create/wstat -- bad character in file name",
	[Ewalk]		"walk -- too many (system wide)",
	[Eronly]	"file system read only",
	[Efull]		"file system full",
	[Eoffset]	"read/write -- offset negative",
	[Elocked]	"open/create -- file is locked",
	[Ebroken]	"read/write -- lock is broken",
	[Eauth]		"attach -- authentication failed",
	[Eauth2]	"read/write -- authentication unimplemented",
	[Etoolong]	"name too long",
	[Efidinuse]	"fid in use",
	[Econvert]	"protocol botch",
	[Eversion]	"version conversion",
	[Eauthnone]	"auth -- user 'none' requires no authentication",
	[Eauthdisabled]	"auth -- authentication disabled",	/* development */
	[Eauthfile]	"auth -- out of auth files",
	[Eedge]		"at the bleeding edge",		/* development */
};

char*	wormscode[0x80] =
{
	[0x00]	"no sense",
	[0x01]	"invalid command",
	[0x02]	"recovered error",
	[0x03]	"illegal request",
	[0x06]	"unit attention",
	[0x07]	"parity error",
	[0x08]	"message reject error",
	[0x0a]	"copy aborted",
	[0x0b]	"initiator detected error",
	[0x0c]	"select re-select failed",
	[0x0e]	"miscompare",

	[0x10]	"ecc trouble occurred",
	[0x11]	"time out error",
	[0x12]	"controller error",
	[0x13]	"sony i/f II hardware/firmware error",
	[0x14]	"scsi hardware/firmware error",
	[0x15]	"rom version unmatched error",
	[0x16]	"logical block address out of range",

	[0x20]	"command not terminated",
	[0x21]	"drive interface parity error",
	[0x22]	"loading trouble",
	[0x23]	"focus trouble",
	[0x24]	"tracking trouble",
	[0x25]	"spindle trouble",
	[0x26]	"slide trouble",
	[0x27]	"skew trouble",
	[0x28]	"head lead out",
	[0x29]	"write modulation trouble",
	[0x2a]	"under laser power",
	[0x2b]	"over laser power",
	[0x2f]	"drive error",

	[0x30]	"drive power off",
	[0x31]	"no disk in drive",
	[0x32]	"drive not ready",
	[0x38]	"disk already exists in drive",
	[0x39]	"no disk in shelf",
	[0x3a]	"disk already exists in shelf",

	[0x40]	"write warning",
	[0x41]	"write error",
	[0x42]	"disk error",
	[0x43]	"cannot read disk ID",
	[0x44]	"write protect error 1",
	[0x45]	"write protect error 2",
	[0x46]	"disk warning",
	[0x47]	"alternation trouble",

	[0x50]	"specified address not found",
	[0x51]	"address block not found",
	[0x52]	"all address could not be read",
	[0x53]	"data could not be read",
	[0x54]	"uncorrectable read error",
	[0x55]	"tracking error",
	[0x56]	"write servo error",
	[0x57]	"write monitor error",
	[0x58]	"write verify error",

	[0x60]	"no data in specified address",
	[0x61]	"blank check failed",
	[0x62]	"controller diagnostics failed",
	[0x63]	"drive diagnostice failed",
	[0x64]	"diagnostice aborted",
	[0x67]	"juke diagnostice failed",
	[0x68]	"z-axis servo failed",
	[0x69]	"roter servo error",
	[0x6a]	"hook servo error",
	[0x6b]	"I/O self error",
	[0x6c]	"drive 0 error",
	[0x6d]	"drive 1 error",
	[0x6e]	"shelf error",
	[0x6f]	"carrier error",

	[0x70]	"rob made me do it",
	[0x71]	"out of range",
};

char*	tagnames[] =
{
	[Tbuck]		"Tbuck",
	[Tdir]		"Tdir",
	[Tfile]		"Tfile",
	[Tfree]		"Tfree",
	[Tind1]		"Tind1",
	[Tind2]		"Tind2",
#ifndef COMPAT32
	[Tind3]		"Tind3",
	[Tind4]		"Tind4",
	/* add more Tind tags here ... */
#endif
	[Tnone]		"Tnone",
	[Tsuper]	"Tsuper",
	[Tvirgo]	"Tvirgo",
	[Tcache]	"Tcache",
};