PageRenderTime 24ms CodeModel.GetById 9ms app.highlight 8ms RepoModel.GetById 2ms app.codeStats 0ms

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