/core/10.4/fusefs/common/fuse_mount.h

http://macfuse.googlecode.com/ · C++ Header · 122 lines · 85 code · 21 blank · 16 comment · 0 complexity · 64c731917d2b7c71ade8af0ffd95256f MD5 · raw file

  1. /*
  2. * Copyright (C) 2006-2008 Google. All Rights Reserved.
  3. * Amit Singh <singh@>
  4. */
  5. #ifndef _FUSE_MOUNT_H_
  6. #define _FUSE_MOUNT_H_
  7. #include <sys/param.h>
  8. #include <sys/types.h>
  9. #include <sys/stat.h>
  10. #ifndef KERNEL
  11. #include <unistd.h>
  12. #endif
  13. #include <fuse_param.h>
  14. #include <fuse_version.h>
  15. /*
  16. * Shared between the kernel and user spaces. This is 64-bit invariant.
  17. */
  18. struct fuse_mount_args {
  19. char mntpath[MAXPATHLEN]; // path to the mount point
  20. char fsname[MAXPATHLEN]; // file system description string
  21. char fstypename[MFSTYPENAMELEN]; // file system type name
  22. char volname[MAXPATHLEN]; // volume name
  23. uint64_t altflags; // see mount-time flags below
  24. uint32_t blocksize; // fictitious block size of our "storage"
  25. uint32_t daemon_timeout; // timeout in seconds for upcalls to daemon
  26. uint32_t fsid; // optional custom value for part of fsid[0]
  27. uint32_t fssubtype; // file system sub type id (type is "fusefs")
  28. uint32_t init_timeout; // timeout in seconds for daemon handshake
  29. uint32_t iosize; // maximum size for reading or writing
  30. uint32_t random; // random "secret" from device
  31. uint32_t rdev; // dev_t for the /dev/fuseN in question
  32. };
  33. typedef struct fuse_mount_args fuse_mount_args;
  34. /* file system subtype */
  35. enum {
  36. FUSE_FSSUBTYPE_UNKNOWN = 0,
  37. FUSE_FSSUBTYPE_INVALID = -1,
  38. };
  39. /* File system type name. */
  40. #define FUSE_FSTYPENAME_PREFIX MACFUSE_FS_TYPE "_"
  41. /* Courtesy of the Finder, this is 1 less than what you think it should be. */
  42. #define FUSE_FSTYPENAME_MAXLEN (MFSTYPENAMELEN - sizeof(MACFUSE_FS_TYPE) - 2)
  43. /* mount-time flags */
  44. #define FUSE_MOPT_IGNORE 0x0000000000000000ULL
  45. #define FUSE_MOPT_ALLOW_OTHER 0x0000000000000001ULL
  46. #define FUSE_MOPT_ALLOW_RECURSION 0x0000000000000002ULL
  47. #define FUSE_MOPT_ALLOW_ROOT 0x0000000000000004ULL
  48. #define FUSE_MOPT_AUTO_XATTR 0x0000000000000008ULL
  49. #define FUSE_MOPT_BLOCKSIZE 0x0000000000000010ULL
  50. #define FUSE_MOPT_DAEMON_TIMEOUT 0x0000000000000020ULL
  51. #define FUSE_MOPT_DEBUG 0x0000000000000040ULL
  52. #define FUSE_MOPT_DEFAULT_PERMISSIONS 0x0000000000000080ULL
  53. #define FUSE_MOPT_DEFER_PERMISSIONS 0x0000000000000100ULL
  54. #define FUSE_MOPT_DIRECT_IO 0x0000000000000200ULL
  55. #define FUSE_MOPT_EXTENDED_SECURITY 0x0000000000000400ULL
  56. #define FUSE_MOPT_FSID 0x0000000000000800ULL
  57. #define FUSE_MOPT_FSNAME 0x0000000000001000ULL
  58. #define FUSE_MOPT_FSSUBTYPE 0x0000000000002000ULL
  59. #define FUSE_MOPT_FSTYPENAME 0x0000000000004000ULL
  60. #define FUSE_MOPT_INIT_TIMEOUT 0x0000000000008000ULL
  61. #define FUSE_MOPT_IOSIZE 0x0000000000010000ULL
  62. #define FUSE_MOPT_JAIL_SYMLINKS 0x0000000000020000ULL
  63. #define FUSE_MOPT_KILL_ON_UNMOUNT 0x0000000000040000ULL
  64. #define FUSE_MOPT_LOCALVOL 0x0000000000080000ULL
  65. #define FUSE_MOPT_NEGATIVE_VNCACHE 0x0000000000100000ULL
  66. #define FUSE_MOPT_NO_ALERTS 0x0000000000200000ULL
  67. #define FUSE_MOPT_NO_APPLEDOUBLE 0x0000000000400000ULL
  68. #define FUSE_MOPT_NO_APPLEXATTR 0x0000000000800000ULL
  69. #define FUSE_MOPT_NO_ATTRCACHE 0x0000000001000000ULL
  70. #define FUSE_MOPT_NO_BROWSE 0x0000000002000000ULL
  71. #define FUSE_MOPT_NO_LOCALCACHES 0x0000000004000000ULL
  72. #define FUSE_MOPT_NO_READAHEAD 0x0000000008000000ULL
  73. #define FUSE_MOPT_NO_SYNCONCLOSE 0x0000000010000000ULL
  74. #define FUSE_MOPT_NO_SYNCWRITES 0x0000000020000000ULL
  75. #define FUSE_MOPT_NO_UBC 0x0000000040000000ULL
  76. #define FUSE_MOPT_NO_VNCACHE 0x0000000080000000ULL
  77. /* Next 32 bits */
  78. #define FUSE_MOPT_USE_INO 0x0000000100000000ULL
  79. #define FUSE_MOPT_VOLNAME 0x0000000200000000ULL
  80. #define FUSE_MOPT_PING_DISKARB 0x0000000400000000ULL
  81. #define FUSE_MOPT_AUTO_CACHE 0x0000000800000000ULL
  82. #define FUSE_MOPT_NATIVE_XATTR 0x0000001000000000ULL
  83. #define FUSE_MOPT_SPARSE 0x0000002000000000ULL
  84. #define FUSE_MAKEDEV(x, y) ((dev_t)(((x) << 24) | (y)))
  85. #define FUSE_MINOR_MASK 0x00FFFFFFUL
  86. #define FUSE_CUSTOM_FSID_DEVICE_MAJOR 255
  87. #define FUSE_CUSTOM_FSID_VAL1 0x55464553
  88. /* Notifications... */
  89. /* The object. */
  90. #define FUSE_UNOTIFICATIONS_OBJECT MACFUSE_BUNDLE_IDENTIFIER ".unotifications"
  91. /* The notifications themselves. */
  92. #define FUSE_UNOTIFICATIONS_NOTIFY_INITED \
  93. FUSE_UNOTIFICATIONS_OBJECT ".inited"
  94. #define FUSE_UNOTIFICATIONS_NOTIFY_INITTIMEDOUT \
  95. FUSE_UNOTIFICATIONS_OBJECT ".inittimedout"
  96. #define FUSE_UNOTIFICATIONS_NOTIFY_MOUNTED \
  97. FUSE_UNOTIFICATIONS_OBJECT ".mounted"
  98. /* User data keys. */
  99. #define kFUSEDevicePathKey "kFUSEDevicePath"
  100. #define kFUSEMountPathKey "kFUSEMountPath"
  101. #endif /* _FUSE_MOUNT_H_ */