fuse_kernel_linux.go 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. package fuse
  2. import "time"
  3. type attr struct {
  4. Ino uint64
  5. Size uint64
  6. Blocks uint64
  7. Atime uint64
  8. Mtime uint64
  9. Ctime uint64
  10. AtimeNsec uint32
  11. MtimeNsec uint32
  12. CtimeNsec uint32
  13. Mode uint32
  14. Nlink uint32
  15. Uid uint32
  16. Gid uint32
  17. Rdev uint32
  18. Blksize uint32
  19. padding uint32
  20. }
  21. func (a *attr) Crtime() time.Time {
  22. return time.Time{}
  23. }
  24. func (a *attr) SetCrtime(s uint64, ns uint32) {
  25. // Ignored on Linux.
  26. }
  27. func (a *attr) SetFlags(f uint32) {
  28. // Ignored on Linux.
  29. }
  30. type setattrIn struct {
  31. setattrInCommon
  32. }
  33. func (in *setattrIn) BkupTime() time.Time {
  34. return time.Time{}
  35. }
  36. func (in *setattrIn) Chgtime() time.Time {
  37. return time.Time{}
  38. }
  39. func (in *setattrIn) Flags() uint32 {
  40. return 0
  41. }
  42. func openFlags(flags uint32) OpenFlags {
  43. // on amd64, the 32-bit O_LARGEFILE flag is always seen;
  44. // on i386, the flag probably depends on the app
  45. // requesting, but in any case should be utterly
  46. // uninteresting to us here; our kernel protocol messages
  47. // are not directly related to the client app's kernel
  48. // API/ABI
  49. flags &^= 0x8000
  50. return OpenFlags(flags)
  51. }
  52. type getxattrIn struct {
  53. getxattrInCommon
  54. }
  55. type setxattrIn struct {
  56. setxattrInCommon
  57. }