xref: /OK3568_Linux_fs/kernel/arch/parisc/include/uapi/asm/ioctl.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
2*4882a593Smuzhiyun /*
3*4882a593Smuzhiyun  *    Linux/PA-RISC Project (http://www.parisc-linux.org/)
4*4882a593Smuzhiyun  *    Copyright (C) 1999,2003 Matthew Wilcox < willy at debian . org >
5*4882a593Smuzhiyun  *    portions from "linux/ioctl.h for Linux" by H.H. Bergman.
6*4882a593Smuzhiyun  *
7*4882a593Smuzhiyun  *    This program is free software; you can redistribute it and/or modify
8*4882a593Smuzhiyun  *    it under the terms of the GNU General Public License as published by
9*4882a593Smuzhiyun  *    the Free Software Foundation; either version 2 of the License, or
10*4882a593Smuzhiyun  *    (at your option) any later version.
11*4882a593Smuzhiyun  *
12*4882a593Smuzhiyun  *    This program is distributed in the hope that it will be useful,
13*4882a593Smuzhiyun  *    but WITHOUT ANY WARRANTY; without even the implied warranty of
14*4882a593Smuzhiyun  *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15*4882a593Smuzhiyun  *    GNU General Public License for more details.
16*4882a593Smuzhiyun  *
17*4882a593Smuzhiyun  *    You should have received a copy of the GNU General Public License
18*4882a593Smuzhiyun  *    along with this program; if not, write to the Free Software
19*4882a593Smuzhiyun  *    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
20*4882a593Smuzhiyun  */
21*4882a593Smuzhiyun 
22*4882a593Smuzhiyun 
23*4882a593Smuzhiyun #ifndef _ASM_PARISC_IOCTL_H
24*4882a593Smuzhiyun #define _ASM_PARISC_IOCTL_H
25*4882a593Smuzhiyun 
26*4882a593Smuzhiyun /* ioctl command encoding: 32 bits total, command in lower 16 bits,
27*4882a593Smuzhiyun  * size of the parameter structure in the lower 14 bits of the
28*4882a593Smuzhiyun  * upper 16 bits.
29*4882a593Smuzhiyun  * Encoding the size of the parameter structure in the ioctl request
30*4882a593Smuzhiyun  * is useful for catching programs compiled with old versions
31*4882a593Smuzhiyun  * and to avoid overwriting user space outside the user buffer area.
32*4882a593Smuzhiyun  * The highest 2 bits are reserved for indicating the ``access mode''.
33*4882a593Smuzhiyun  * NOTE: This limits the max parameter size to 16kB -1 !
34*4882a593Smuzhiyun  */
35*4882a593Smuzhiyun 
36*4882a593Smuzhiyun /*
37*4882a593Smuzhiyun  * Direction bits.
38*4882a593Smuzhiyun  */
39*4882a593Smuzhiyun #define _IOC_NONE	0U
40*4882a593Smuzhiyun #define _IOC_WRITE	2U
41*4882a593Smuzhiyun #define _IOC_READ	1U
42*4882a593Smuzhiyun 
43*4882a593Smuzhiyun #include <asm-generic/ioctl.h>
44*4882a593Smuzhiyun 
45*4882a593Smuzhiyun #endif /* _ASM_PARISC_IOCTL_H */
46