]> git.proxmox.com Git - mirror_edk2.git/blob - StdLib/Include/sys/ioctl.h
Vlv2TbltDevicePkg/PlatformFlashAccessLib: Fix IA32 build issues
[mirror_edk2.git] / StdLib / Include / sys / ioctl.h
1 /** @file
2 Device Control, ioctl, definitions and declarations.
3
4 Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials are licensed and made available under
6 the terms and conditions of the BSD License that accompanies this distribution.
7 The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.
9
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13 * Copyright (c) 1982, 1986, 1990, 1993, 1994
14 * The Regents of the University of California. All rights reserved.
15 * (c) UNIX System Laboratories, Inc.
16 * All or some portions of this file are derived from material licensed
17 * to the University of California by American Telephone and Telegraph
18 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
19 * the permission of UNIX System Laboratories, Inc.
20 *
21 * Redistribution and use in source and binary forms, with or without
22 * modification, are permitted provided that the following conditions
23 * are met:
24 * 1. Redistributions of source code must retain the above copyright
25 * notice, this list of conditions and the following disclaimer.
26 * 2. Redistributions in binary form must reproduce the above copyright
27 * notice, this list of conditions and the following disclaimer in the
28 * documentation and/or other materials provided with the distribution.
29 * 3. Neither the name of the University nor the names of its contributors
30 * may be used to endorse or promote products derived from this software
31 * without specific prior written permission.
32 *
33 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
34 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
35 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
36 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
37 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
38 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
39 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
40 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
41 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
42 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
43 * SUCH DAMAGE.
44
45 NetBSD: ioctl.h,v 1.34 2005/12/11 12:25:20 christos Exp
46 ioctl.h 8.6 (Berkeley) 3/28/94
47 **/
48 #ifndef _SYS_IOCTL_H_
49 #define _SYS_IOCTL_H_
50
51
52 //#include <sys/ttycom.h>
53
54 /*
55 * Pun for SunOS prior to 3.2. SunOS 3.2 and later support TIOCGWINSZ
56 * and TIOCSWINSZ (yes, even 3.2-3.5, the fact that it wasn't documented
57 * nonwithstanding).
58 */
59 struct ttysize {
60 unsigned short ts_lines;
61 unsigned short ts_cols;
62 unsigned short ts_xxx;
63 unsigned short ts_yyy;
64 };
65 //#define TIOCGSIZE TIOCGWINSZ
66 //#define TIOCSSIZE TIOCSWINSZ
67
68 //#include <sys/ioccom.h>
69
70 //#include <sys/dkio.h>
71 //#include <sys/filio.h>
72 //#include <sys/sockio.h>
73
74 /*
75 * Passthrough ioctl commands. These are passed through to devices
76 * as they are, it is expected that the device (an LKM, for example),
77 * will know how to deal with them. One for each emulation, so that
78 * no namespace clashes will occur between them, for devices that
79 * may be dealing with specific ioctls for multiple emulations.
80 */
81
82 struct ioctl_pt {
83 unsigned long com;
84 void *data;
85 };
86
87 #define PTIOCNETBSD _IOW('Z', 0, struct ioctl_pt)
88 #define PTIOCSUNOS _IOW('Z', 1, struct ioctl_pt)
89 #define PTIOCSVR4 _IOW('Z', 2, struct ioctl_pt)
90 #define PTIOCLINUX _IOW('Z', 3, struct ioctl_pt)
91 #define PTIOCFREEBSD _IOW('Z', 4, struct ioctl_pt)
92 #define PTIOCOSF1 _IOW('Z', 5, struct ioctl_pt)
93 #define PTIOCULTRIX _IOW('Z', 6, struct ioctl_pt)
94 #define PTIOCWIN32 _IOW('Z', 7, struct ioctl_pt)
95
96 #include <sys/EfiCdefs.h>
97
98 __BEGIN_DECLS
99 int ioctl(int, unsigned long, ...);
100 __END_DECLS
101 #endif /* !_SYS_IOCTL_H_ */