dat.c 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. #include "all.h"
  2. Uid* uid;
  3. char* uidspace;
  4. short* gidspace;
  5. RWLock mainlock;
  6. long boottime;
  7. Tlock *tlocks;
  8. Conf conf;
  9. Cons cons;
  10. Chan *chan;
  11. char service[2*NAMELEN];
  12. char *progname;
  13. char *procname;
  14. int RBUFSIZE;
  15. int BUFSIZE;
  16. int DIRPERBUF;
  17. int INDPERBUF;
  18. int INDPERBUF2;
  19. int FEPERBUF;
  20. Filsys filesys[MAXFILSYS] =
  21. {
  22. {"main", {Devwren, 0, 0, 0}, 0},
  23. };
  24. Device devnone = {Devnone, 0, 0, 0};
  25. Devcall devcall[MAXDEV] = {
  26. [Devnone] {0},
  27. [Devwren] {wreninit, wrenream, wrencheck, wrensuper, wrenroot, wrensize, wrenread, wrenwrite},
  28. };
  29. char* tagnames[] =
  30. {
  31. [Tbuck] "Tbuck",
  32. [Tdir] "Tdir",
  33. [Tfile] "Tfile",
  34. [Tfree] "Tfree",
  35. [Tind1] "Tind1",
  36. [Tind2] "Tind2",
  37. [Tnone] "Tnone",
  38. [Tsuper] "Tsuper",
  39. [Tvirgo] "Tvirgo",
  40. [Tcache] "Tcache",
  41. };
  42. char *errstring[MAXERR] =
  43. {
  44. [Ebadspc] "attach -- bad specifier",
  45. [Efid] "unknown fid",
  46. [Echar] "bad character in directory name",
  47. [Eopen] "read/write -- on non open fid",
  48. [Ecount] "read/write -- count too big",
  49. [Ealloc] "phase error -- directory entry not allocated",
  50. [Eqid] "phase error -- qid does not match",
  51. [Eauth] "authentication failed",
  52. [Eauthmsg] "kfs: authentication not required",
  53. [Eaccess] "access permission denied",
  54. [Eentry] "directory entry not found",
  55. [Emode] "open/create -- unknown mode",
  56. [Edir1] "walk -- in a non-directory",
  57. [Edir2] "create -- in a non-directory",
  58. [Ephase] "phase error -- cannot happen",
  59. [Eexist] "create -- file exists",
  60. [Edot] "create -- . and .. illegal names",
  61. [Eempty] "remove -- directory not empty",
  62. [Ebadu] "attach -- privileged user",
  63. [Enotu] "wstat -- not owner",
  64. [Enotg] "wstat -- not in group",
  65. [Enotl] "wstat -- attempt to change length",
  66. [Enotd] "wstat -- attempt to change directory",
  67. [Enotm] "wstat -- unknown type/mode",
  68. [Ename] "create/wstat -- bad character in file name",
  69. [Ewalk] "walk -- too many (system wide)",
  70. [Eronly] "file system read only",
  71. [Efull] "file system full",
  72. [Eoffset] "read/write -- offset negative",
  73. [Elocked] "open/create -- file is locked",
  74. [Ebroken] "close/read/write -- lock is broken",
  75. [Efidinuse] "fid already in use",
  76. [Etoolong] "name too long",
  77. [Ersc] "it's russ's fault. bug him.",
  78. [Econvert] "protocol botch",
  79. [Eqidmode] "wstat -- qid.type/dir.mode mismatch",
  80. [Esystem] "kfs system error",
  81. };