error_std.go 1.3 KB

1234567891011121314151617181920212223242526272829303132
  1. package fuse
  2. // There is very little commonality in extended attribute errors
  3. // across platforms.
  4. //
  5. // getxattr return value for "extended attribute does not exist" is
  6. // ENOATTR on OS X, and ENODATA on Linux and apparently at least
  7. // NetBSD. There may be a #define ENOATTR on Linux too, but the value
  8. // is ENODATA in the actual syscalls. FreeBSD and OpenBSD have no
  9. // ENODATA, only ENOATTR. ENOATTR is not in any of the standards,
  10. // ENODATA exists but is only used for STREAMs.
  11. //
  12. // Each platform will define it a errNoXattr constant, and this file
  13. // will enforce that it implements the right interfaces and hide the
  14. // implementation.
  15. //
  16. // https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man2/getxattr.2.html
  17. // http://mail-index.netbsd.org/tech-kern/2012/04/30/msg013090.html
  18. // http://mail-index.netbsd.org/tech-kern/2012/04/30/msg013097.html
  19. // http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/errno.h.html
  20. // http://www.freebsd.org/cgi/man.cgi?query=extattr_get_file&sektion=2
  21. // http://nixdoc.net/man-pages/openbsd/man2/extattr_get_file.2.html
  22. // ErrNoXattr is a platform-independent error value meaning the
  23. // extended attribute was not found. It can be used to respond to
  24. // GetxattrRequest and such.
  25. const ErrNoXattr = errNoXattr
  26. var _ error = ErrNoXattr
  27. var _ Errno = ErrNoXattr
  28. var _ ErrorNumber = ErrNoXattr