zerrors_plan9_amd64.go 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. // Copyright 2011 The Go Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. package plan9
  5. // Constants
  6. const (
  7. // Invented values to support what package os expects.
  8. O_CREAT = 0x02000
  9. O_APPEND = 0x00400
  10. O_NOCTTY = 0x00000
  11. O_NONBLOCK = 0x00000
  12. O_SYNC = 0x00000
  13. O_ASYNC = 0x00000
  14. S_IFMT = 0x1f000
  15. S_IFIFO = 0x1000
  16. S_IFCHR = 0x2000
  17. S_IFDIR = 0x4000
  18. S_IFBLK = 0x6000
  19. S_IFREG = 0x8000
  20. S_IFLNK = 0xa000
  21. S_IFSOCK = 0xc000
  22. )
  23. // Errors
  24. var (
  25. EINVAL = NewError("bad arg in system call")
  26. ENOTDIR = NewError("not a directory")
  27. EISDIR = NewError("file is a directory")
  28. ENOENT = NewError("file does not exist")
  29. EEXIST = NewError("file already exists")
  30. EMFILE = NewError("no free file descriptors")
  31. EIO = NewError("i/o error")
  32. ENAMETOOLONG = NewError("file name too long")
  33. EINTR = NewError("interrupted")
  34. EPERM = NewError("permission denied")
  35. EBUSY = NewError("no free devices")
  36. ETIMEDOUT = NewError("connection timed out")
  37. EPLAN9 = NewError("not supported by plan 9")
  38. // The following errors do not correspond to any
  39. // Plan 9 system messages. Invented to support
  40. // what package os and others expect.
  41. EACCES = NewError("access permission denied")
  42. EAFNOSUPPORT = NewError("address family not supported by protocol")
  43. )