blob: 207734f55e1b2bfc777257b1fb5c47bdaa1b77df [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 *** To edit the content of this header, modify the corresponding
11 *** source file (e.g. under external/kernel-headers/original/) then
12 *** run bionic/libc/kernel/tools/update_all.py
13 ***
14 *** Any manual change here will be lost the next time this script will
15 *** be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef _ASM_GENERIC_FCNTL_H
20#define _ASM_GENERIC_FCNTL_H
21#include <linux/types.h>
22#define O_ACCMODE 00000003
23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24#define O_RDONLY 00000000
25#define O_WRONLY 00000001
26#define O_RDWR 00000002
27#ifndef O_CREAT
28/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29#define O_CREAT 00000100
30#endif
31#ifndef O_EXCL
32#define O_EXCL 00000200
33/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34#endif
35#ifndef O_NOCTTY
36#define O_NOCTTY 00000400
37#endif
38/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39#ifndef O_TRUNC
40#define O_TRUNC 00001000
41#endif
42#ifndef O_APPEND
43/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44#define O_APPEND 00002000
45#endif
46#ifndef O_NONBLOCK
47#define O_NONBLOCK 00004000
48/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49#endif
50#ifndef O_DSYNC
51#define O_DSYNC 00010000
52#endif
53/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54#ifndef FASYNC
55#define FASYNC 00020000
56#endif
57#ifndef O_DIRECT
58/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59#define O_DIRECT 00040000
60#endif
61#ifndef O_LARGEFILE
62#define O_LARGEFILE 00100000
63/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64#endif
65#ifndef O_DIRECTORY
66#define O_DIRECTORY 00200000
67#endif
68/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69#ifndef O_NOFOLLOW
70#define O_NOFOLLOW 00400000
71#endif
72#ifndef O_NOATIME
73/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74#define O_NOATIME 01000000
75#endif
76#ifndef O_CLOEXEC
77#define O_CLOEXEC 02000000
78/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79#endif
80#ifndef O_SYNC
81#define __O_SYNC 04000000
82#define O_SYNC (__O_SYNC|O_DSYNC)
83/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
84#endif
85#ifndef O_PATH
86#define O_PATH 010000000
87#endif
88/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070089#ifndef O_NDELAY
90#define O_NDELAY O_NONBLOCK
91#endif
Ben Cheng655a7c02013-10-16 16:09:24 -070092#define F_DUPFD 0
Elliott Hughes8cb52b02013-11-21 13:43:23 -080093/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070094#define F_GETFD 1
95#define F_SETFD 2
96#define F_GETFL 3
Ben Cheng655a7c02013-10-16 16:09:24 -070097#define F_SETFL 4
Elliott Hughes8cb52b02013-11-21 13:43:23 -080098/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070099#ifndef F_GETLK
100#define F_GETLK 5
101#define F_SETLK 6
Ben Cheng655a7c02013-10-16 16:09:24 -0700102#define F_SETLKW 7
Elliott Hughes8cb52b02013-11-21 13:43:23 -0800103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700104#endif
105#ifndef F_SETOWN
106#define F_SETOWN 8
Ben Cheng655a7c02013-10-16 16:09:24 -0700107#define F_GETOWN 9
Elliott Hughes8cb52b02013-11-21 13:43:23 -0800108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700109#endif
110#ifndef F_SETSIG
111#define F_SETSIG 10
Ben Cheng655a7c02013-10-16 16:09:24 -0700112#define F_GETSIG 11
Elliott Hughes8cb52b02013-11-21 13:43:23 -0800113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700114#endif
Elliott Hughes9195a252014-04-08 10:15:06 -0700115#ifndef __LP64__
Ben Cheng655a7c02013-10-16 16:09:24 -0700116#ifndef F_GETLK64
117#define F_GETLK64 12
Elliott Hughes8cb52b02013-11-21 13:43:23 -0800118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Elliott Hughes9195a252014-04-08 10:15:06 -0700119#define F_SETLK64 13
Ben Cheng655a7c02013-10-16 16:09:24 -0700120#define F_SETLKW64 14
121#endif
Elliott Hughes9195a252014-04-08 10:15:06 -0700122#endif
123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700124#ifndef F_SETOWN_EX
Ben Cheng655a7c02013-10-16 16:09:24 -0700125#define F_SETOWN_EX 15
126#define F_GETOWN_EX 16
127#endif
Elliott Hughes9195a252014-04-08 10:15:06 -0700128/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700129#ifndef F_GETOWNER_UIDS
Ben Cheng655a7c02013-10-16 16:09:24 -0700130#define F_GETOWNER_UIDS 17
131#endif
132#define F_OWNER_TID 0
Elliott Hughes9195a252014-04-08 10:15:06 -0700133/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700134#define F_OWNER_PID 1
Ben Cheng655a7c02013-10-16 16:09:24 -0700135#define F_OWNER_PGRP 2
136struct f_owner_ex {
137 int type;
Elliott Hughes9195a252014-04-08 10:15:06 -0700138/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700139 __kernel_pid_t pid;
Ben Cheng655a7c02013-10-16 16:09:24 -0700140};
141#define FD_CLOEXEC 1
142#ifndef F_RDLCK
Elliott Hughes9195a252014-04-08 10:15:06 -0700143/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700144#define F_RDLCK 0
Ben Cheng655a7c02013-10-16 16:09:24 -0700145#define F_WRLCK 1
146#define F_UNLCK 2
147#endif
Elliott Hughes9195a252014-04-08 10:15:06 -0700148/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700149#ifndef F_EXLCK
Ben Cheng655a7c02013-10-16 16:09:24 -0700150#define F_EXLCK 4
151#define F_SHLCK 8
152#endif
Elliott Hughes9195a252014-04-08 10:15:06 -0700153/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700154#define LOCK_SH 1
Ben Cheng655a7c02013-10-16 16:09:24 -0700155#define LOCK_EX 2
156#define LOCK_NB 4
157#define LOCK_UN 8
Elliott Hughes9195a252014-04-08 10:15:06 -0700158/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700159#define LOCK_MAND 32
Ben Cheng655a7c02013-10-16 16:09:24 -0700160#define LOCK_READ 64
161#define LOCK_WRITE 128
162#define LOCK_RW 192
Elliott Hughes9195a252014-04-08 10:15:06 -0700163/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700164#define F_LINUX_SPECIFIC_BASE 1024
Ben Cheng655a7c02013-10-16 16:09:24 -0700165#ifndef HAVE_ARCH_STRUCT_FLOCK
166#ifndef __ARCH_FLOCK_PAD
167#define __ARCH_FLOCK_PAD
Elliott Hughes9195a252014-04-08 10:15:06 -0700168/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700169#endif
Ben Cheng655a7c02013-10-16 16:09:24 -0700170struct flock {
171 short l_type;
172 short l_whence;
Elliott Hughes9195a252014-04-08 10:15:06 -0700173/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700174 __kernel_off_t l_start;
Ben Cheng655a7c02013-10-16 16:09:24 -0700175 __kernel_off_t l_len;
176 __kernel_pid_t l_pid;
177 __ARCH_FLOCK_PAD
Elliott Hughes9195a252014-04-08 10:15:06 -0700178/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700179};
Ben Cheng655a7c02013-10-16 16:09:24 -0700180#endif
Elliott Hughes9195a252014-04-08 10:15:06 -0700181#ifndef __LP64__
Ben Cheng655a7c02013-10-16 16:09:24 -0700182#ifndef HAVE_ARCH_STRUCT_FLOCK64
Elliott Hughes9195a252014-04-08 10:15:06 -0700183/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700184#ifndef __ARCH_FLOCK64_PAD
185#define __ARCH_FLOCK64_PAD
Ben Cheng655a7c02013-10-16 16:09:24 -0700186#endif
187struct flock64 {
Elliott Hughes9195a252014-04-08 10:15:06 -0700188/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700189 short l_type;
190 short l_whence;
Ben Cheng655a7c02013-10-16 16:09:24 -0700191 __kernel_loff_t l_start;
192 __kernel_loff_t l_len;
Elliott Hughes9195a252014-04-08 10:15:06 -0700193/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700194 __kernel_pid_t l_pid;
195 __ARCH_FLOCK64_PAD
Ben Cheng655a7c02013-10-16 16:09:24 -0700196};
Elliott Hughes9195a252014-04-08 10:15:06 -0700197#endif
Elliott Hughes8cb52b02013-11-21 13:43:23 -0800198/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700199#endif
200#endif