const_plan9.go 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. package syscall
  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. // Bind flags
  13. const (
  14. MORDER = 0x0003 // mask for bits defining order of mounting
  15. MREPL = 0x0000 // mount replaces object
  16. MBEFORE = 0x0001 // mount goes before others in union directory
  17. MAFTER = 0x0002 // mount goes after others in union directory
  18. MCREATE = 0x0004 // permit creation in mounted directory
  19. MCACHE = 0x0010 // cache some data
  20. MMASK = 0x0017 // all bits on
  21. )
  22. // Rfork flags
  23. const (
  24. RFNAMEG = 1 << 0
  25. RFENVG = 1 << 1
  26. RFFDG = 1 << 2
  27. RFNOTEG = 1 << 3
  28. RFPROC = 1 << 4
  29. RFMEM = 1 << 5
  30. RFNOWAIT = 1 << 6
  31. RFCNAMEG = 1 << 10
  32. RFCENVG = 1 << 11
  33. RFCFDG = 1 << 12
  34. RFREND = 1 << 13
  35. RFNOMNT = 1 << 14
  36. )
  37. // Qid.Type bits
  38. const (
  39. QTDIR = 0x80
  40. QTAPPEND = 0x40
  41. QTEXCL = 0x20
  42. QTMOUNT = 0x10
  43. QTAUTH = 0x08
  44. QTTMP = 0x04
  45. QTFILE = 0x00
  46. )
  47. // Dir.Mode bits
  48. const (
  49. DMDIR = 0x80000000
  50. DMAPPEND = 0x40000000
  51. DMEXCL = 0x20000000
  52. DMMOUNT = 0x10000000
  53. DMAUTH = 0x08000000
  54. DMTMP = 0x04000000
  55. DMREAD = 0x4
  56. DMWRITE = 0x2
  57. DMEXEC = 0x1
  58. )
  59. const (
  60. STATMAX = 65535
  61. ERRMAX = 128
  62. STATFIXLEN = 49
  63. )