From bcad1a6f22662ff0d04a6ae417adb30550252d97 Mon Sep 17 00:00:00 2001 From: Nikolaus Rath Date: Sun, 9 Oct 2016 19:50:51 -0700 Subject: Renamed ioctl and poll examples The new names should make it more obvious at first glance what each example demonstrates. --- example/ioctl.h | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 example/ioctl.h (limited to 'example/ioctl.h') diff --git a/example/ioctl.h b/example/ioctl.h new file mode 100644 index 0000000..ded2a15 --- /dev/null +++ b/example/ioctl.h @@ -0,0 +1,42 @@ +/* + FUSE-ioctl: ioctl support for FUSE + Copyright (C) 2008 SUSE Linux Products GmbH + Copyright (C) 2008 Tejun Heo + + This program can be distributed under the terms of the GNU GPL. + See the file COPYING. +*/ + +/** @file + * @tableofcontents + * + * Header file to share definitions between the ioctl.c example file + * system and the ioctl_client.c test program. + * + * \include ioctl.h + */ + + +#include +#include +#include + +enum { + FIOC_GET_SIZE = _IOR('E', 0, size_t), + FIOC_SET_SIZE = _IOW('E', 1, size_t), + + /* + * The following two ioctls don't follow usual encoding rules + * and transfer variable amount of data. + */ + FIOC_READ = _IO('E', 2), + FIOC_WRITE = _IO('E', 3), +}; + +struct fioc_rw_arg { + off_t offset; + void *buf; + size_t size; + size_t prev_size; /* out param for previous total size */ + size_t new_size; /* out param for new total size */ +}; -- cgit v1.2.3