libfuse: fuse-3.18.2/example/ioctl.h Source File

libfuse

ioctl.h
Go to the documentation of this file.
1/*
2 FUSE-ioctl: ioctl support for FUSE
3 Copyright (C) 2008 SUSE Linux Products GmbH
4 Copyright (C) 2008 Tejun Heo <teheo@suse.de>
5
6 This program can be distributed under the terms of the GNU GPLv2.
7 See the file GPL2.txt.
8*/
9
20#include <sys/types.h>
21#include <sys/uio.h>
22#include <sys/ioctl.h>
23
24enum {
25 FIOC_GET_SIZE = _IOR('E', 0, size_t),
26 FIOC_SET_SIZE = _IOW('E', 1, size_t),
27
28 /*
29 * The following two ioctls don't follow usual encoding rules
30 * and transfer variable amount of data.
31 */
32 FIOC_READ = _IO('E', 2),
33 FIOC_WRITE = _IO('E', 3),
34};
35
36struct fioc_rw_arg {
37 off_t offset;
38 void *buf;
39 size_t size;
40 size_t prev_size; /* out param for previous total size */
41 size_t new_size; /* out param for new total size */
42};