xref: /plan9/sys/src/cmd/cwfs/data.c (revision 01a344a29f2ff35133953eaef092a50fc8c3163b)
1 #include	"all.h"
2 
3 char	*errstr9p[MAXERR] =
4 {
5 	[Ebadspc]	"attach -- bad specifier",
6 	[Efid]		"unknown fid",
7 	[Echar]		"bad character in directory name",
8 	[Eopen]		"read/write -- on non open fid",
9 	[Ecount]	"read/write -- count too big",
10 	[Ealloc]	"phase error -- directory entry not allocated",
11 	[Eqid]		"phase error -- qid does not match",
12 	[Eaccess]	"access permission denied",
13 	[Eentry]	"directory entry not found",
14 	[Emode]		"open/create -- unknown mode",
15 	[Edir1]		"walk -- in a non-directory",
16 	[Edir2]		"create -- in a non-directory",
17 	[Ephase]	"phase error -- cannot happen",
18 	[Eexist]	"create/wstat -- file exists",
19 	[Edot]		"create/wstat -- . and .. illegal names",
20 	[Eempty]	"remove -- directory not empty",
21 	[Ebadu]		"attach -- unknown user or failed authentication",
22 	[Enoattach]	"attach -- system maintenance",
23 	[Ewstatb]	"wstat -- unknown bits in qid.type/mode",
24 	[Ewstatd]	"wstat -- attempt to change directory",
25 	[Ewstatg]	"wstat -- not in group",
26 	[Ewstatl]	"wstat -- attempt to make length negative",
27 	[Ewstatm]	"wstat -- attempt to change muid",
28 	[Ewstato]	"wstat -- not owner or group leader",
29 	[Ewstatp]	"wstat -- attempt to change qid.path",
30 	[Ewstatq]	"wstat -- qid.type/dir.mode mismatch",
31 	[Ewstatu]	"wstat -- not owner",
32 	[Ewstatv]	"wstat -- attempt to change qid.vers",
33 	[Ename]		"create/wstat -- bad character in file name",
34 	[Ewalk]		"walk -- too many (system wide)",
35 	[Eronly]	"file system read only",
36 	[Efull]		"file system full",
37 	[Eoffset]	"read/write -- offset negative",
38 	[Elocked]	"open/create -- file is locked",
39 	[Ebroken]	"read/write -- lock is broken",
40 	[Eauth]		"attach -- authentication failed",
41 	[Eauth2]	"read/write -- authentication unimplemented",
42 	[Etoolong]	"name too long",
43 	[Efidinuse]	"fid in use",
44 	[Econvert]	"protocol botch",
45 	[Eversion]	"version conversion",
46 	[Eauthnone]	"auth -- user 'none' requires no authentication",
47 	[Eauthdisabled]	"auth -- authentication disabled",	/* development */
48 	[Eauthfile]	"auth -- out of auth files",
49 	[Eedge]		"at the bleeding edge",		/* development */
50 };
51 
52 char*	wormscode[0x80] =
53 {
54 	[0x00]	"no sense",
55 	[0x01]	"invalid command",
56 	[0x02]	"recovered error",
57 	[0x03]	"illegal request",
58 	[0x06]	"unit attention",
59 	[0x07]	"parity error",
60 	[0x08]	"message reject error",
61 	[0x0a]	"copy aborted",
62 	[0x0b]	"initiator detected error",
63 	[0x0c]	"select re-select failed",
64 	[0x0e]	"miscompare",
65 
66 	[0x10]	"ecc trouble occurred",
67 	[0x11]	"time out error",
68 	[0x12]	"controller error",
69 	[0x13]	"sony i/f II hardware/firmware error",
70 	[0x14]	"scsi hardware/firmware error",
71 	[0x15]	"rom version unmatched error",
72 	[0x16]	"logical block address out of range",
73 
74 	[0x20]	"command not terminated",
75 	[0x21]	"drive interface parity error",
76 	[0x22]	"loading trouble",
77 	[0x23]	"focus trouble",
78 	[0x24]	"tracking trouble",
79 	[0x25]	"spindle trouble",
80 	[0x26]	"slide trouble",
81 	[0x27]	"skew trouble",
82 	[0x28]	"head lead out",
83 	[0x29]	"write modulation trouble",
84 	[0x2a]	"under laser power",
85 	[0x2b]	"over laser power",
86 	[0x2f]	"drive error",
87 
88 	[0x30]	"drive power off",
89 	[0x31]	"no disk in drive",
90 	[0x32]	"drive not ready",
91 	[0x38]	"disk already exists in drive",
92 	[0x39]	"no disk in shelf",
93 	[0x3a]	"disk already exists in shelf",
94 
95 	[0x40]	"write warning",
96 	[0x41]	"write error",
97 	[0x42]	"disk error",
98 	[0x43]	"cannot read disk ID",
99 	[0x44]	"write protect error 1",
100 	[0x45]	"write protect error 2",
101 	[0x46]	"disk warning",
102 	[0x47]	"alternation trouble",
103 
104 	[0x50]	"specified address not found",
105 	[0x51]	"address block not found",
106 	[0x52]	"all address could not be read",
107 	[0x53]	"data could not be read",
108 	[0x54]	"uncorrectable read error",
109 	[0x55]	"tracking error",
110 	[0x56]	"write servo error",
111 	[0x57]	"write monitor error",
112 	[0x58]	"write verify error",
113 
114 	[0x60]	"no data in specified address",
115 	[0x61]	"blank check failed",
116 	[0x62]	"controller diagnostics failed",
117 	[0x63]	"drive diagnostice failed",
118 	[0x64]	"diagnostice aborted",
119 	[0x67]	"juke diagnostice failed",
120 	[0x68]	"z-axis servo failed",
121 	[0x69]	"roter servo error",
122 	[0x6a]	"hook servo error",
123 	[0x6b]	"I/O self error",
124 	[0x6c]	"drive 0 error",
125 	[0x6d]	"drive 1 error",
126 	[0x6e]	"shelf error",
127 	[0x6f]	"carrier error",
128 
129 	[0x70]	"rob made me do it",
130 	[0x71]	"out of range",
131 };
132 
133 char*	tagnames[] =
134 {
135 	[Tbuck]		"Tbuck",
136 	[Tdir]		"Tdir",
137 	[Tfile]		"Tfile",
138 	[Tfree]		"Tfree",
139 	[Tind1]		"Tind1",
140 	[Tind2]		"Tind2",
141 #ifndef COMPAT32
142 	[Tind3]		"Tind3",
143 	[Tind4]		"Tind4",
144 	/* add more Tind tags here ... */
145 #endif
146 	[Tnone]		"Tnone",
147 	[Tsuper]	"Tsuper",
148 	[Tvirgo]	"Tvirgo",
149 	[Tcache]	"Tcache",
150 };
151