• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 COPYING.
8 */
9 
10 /** @file
11  * @tableofcontents
12  *
13  * Header file to share definitions between the ioctl.c example file
14  * system and the ioctl_client.c test program.
15  *
16  * \include ioctl.h
17  */
18 
19 
20 #include <sys/types.h>
21 #include <sys/uio.h>
22 #include <sys/ioctl.h>
23 
24 enum {
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 
36 struct 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 };
43