const_plan9.go 1004 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. package plan9
  2. // Plan 9 Constants
  3. // Open modes
  4. const (
  5. O_RDONLY = 0
  6. O_WRONLY = 1
  7. O_RDWR = 2
  8. O_TRUNC = 16
  9. O_CLOEXEC = 32
  10. O_EXCL = 0x1000
  11. )
  12. // Rfork flags
  13. const (
  14. RFNAMEG = 1 << 0
  15. RFENVG = 1 << 1
  16. RFFDG = 1 << 2
  17. RFNOTEG = 1 << 3
  18. RFPROC = 1 << 4
  19. RFMEM = 1 << 5
  20. RFNOWAIT = 1 << 6
  21. RFCNAMEG = 1 << 10
  22. RFCENVG = 1 << 11
  23. RFCFDG = 1 << 12
  24. RFREND = 1 << 13
  25. RFNOMNT = 1 << 14
  26. )
  27. // Qid.Type bits
  28. const (
  29. QTDIR = 0x80
  30. QTAPPEND = 0x40
  31. QTEXCL = 0x20
  32. QTMOUNT = 0x10
  33. QTAUTH = 0x08
  34. QTTMP = 0x04
  35. QTFILE = 0x00
  36. )
  37. // Dir.Mode bits
  38. const (
  39. DMDIR = 0x80000000
  40. DMAPPEND = 0x40000000
  41. DMEXCL = 0x20000000
  42. DMMOUNT = 0x10000000
  43. DMAUTH = 0x08000000
  44. DMTMP = 0x04000000
  45. DMREAD = 0x4
  46. DMWRITE = 0x2
  47. DMEXEC = 0x1
  48. )
  49. const (
  50. STATMAX = 65535
  51. ERRMAX = 128
  52. STATFIXLEN = 49
  53. )
  54. // Mount and bind flags
  55. const (
  56. MREPL = 0x0000
  57. MBEFORE = 0x0001
  58. MAFTER = 0x0002
  59. MORDER = 0x0003
  60. MCREATE = 0x0004
  61. MCACHE = 0x0010
  62. MMASK = 0x0017
  63. )