#include "all.h" Device devnone = {Devnone,0,0,0}; void (*p9call[MAXSYSCALL])(Chan*, Fcall*, Fcall*) = { [Tnop] f_nop, [Tsession] f_session, [Tflush] f_flush, [Tattach] f_attach, [Tclone] f_clone, [Twalk] f_walk, [Topen] f_open, [Tcreate] f_create, [Tread] f_read, [Twrite] f_write, [Tclunk] f_clunk, [Tremove] f_remove, [Tstat] f_stat, [Twstat] f_wstat, [Tclwalk] f_clwalk, [Tauth] f_auth, }; char *errstr[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 -- . and .. illegal names", [Eempty] "remove -- directory not empty", [Ebadu] "attach -- privileged user", [Enoattach] "attach -- system maintenance", [Enotu] "wstat -- not owner", [Enotg] "wstat -- not in group", [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] "close/read/write -- lock is broken", [Eauth] "attach -- authentication failed", }; 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] "inniator idetected 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", [Tnone] "Tnone", [Tsuper] "Tsuper", [Tvirgo] "Tvirgo", [Tcache] "Tcache", };