aboutsummaryrefslogtreecommitdiffstats
path: root/include/fuse.h
diff options
context:
space:
mode:
authorMiklos Szeredi <miklos@szeredi.hu>2008-12-05 10:55:36 +0000
committerMiklos Szeredi <miklos@szeredi.hu>2008-12-05 10:55:36 +0000
commitecfa5263ab5b19a58d53a7116fb079f3b956b918 (patch)
treea9f9dd2ec17e9185e4d515328b78e3b5e84938f2 /include/fuse.h
parentcafdcb253e4c7ad6238198982425c004b487d2e6 (diff)
downloadlibfuse-ecfa5263ab5b19a58d53a7116fb079f3b956b918.tar.gz
* Implement ioctl support. On high level interface only
"restricted" ioctls are supported (which are defined with the _IO(), _IOR(), _IOW() or _IOWR() macros). Unrestricted ioctls will only be allwed to CUSE (Character Device in Userspace) servers. Patch by Tejun Heo
Diffstat (limited to 'include/fuse.h')
-rw-r--r--include/fuse.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/fuse.h b/include/fuse.h
index 8d47bc5..2016ccc 100644
--- a/include/fuse.h
+++ b/include/fuse.h
@@ -31,6 +31,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/statvfs.h>
+#include <sys/uio.h>
#ifdef __cplusplus
extern "C" {
@@ -457,6 +458,22 @@ struct fuse_operations {
* Reserved flags, don't set
*/
unsigned int flag_reserved : 31;
+
+ /**
+ * Ioctl
+ *
+ * @flags will have FUSE_IOCTL_COMPAT set for 32bit ioctls in
+ * 64bit environment. The size and direction of @data is
+ * determined by _IOC_*() decoding of @cmd. For _IOC_NONE,
+ * @data will be NULL, for _IOC_WRITE @data is out area, for
+ * _IOC_READ in area and if both are set in/out area. In all
+ * non-NULL cases, the area is of _IOC_SIZE(@cmd) bytes.
+ *
+ * Introduced in version 2.9
+ */
+ int (*ioctl) (const char *, int cmd, void *arg,
+ struct fuse_file_info *, unsigned int flags, void *data);
+
};
/** Extra context that may be needed by some filesystems
@@ -689,6 +706,8 @@ int fuse_fs_removexattr(struct fuse_fs *fs, const char *path,
const char *name);
int fuse_fs_bmap(struct fuse_fs *fs, const char *path, size_t blocksize,
uint64_t *idx);
+int fuse_fs_ioctl(struct fuse_fs *fs, const char *path, int cmd, void *arg,
+ struct fuse_file_info *fi, unsigned int flags, void *data);
void fuse_fs_init(struct fuse_fs *fs, struct fuse_conn_info *conn);
void fuse_fs_destroy(struct fuse_fs *fs);