122851890Sopenharmony_ci/*
222851890Sopenharmony_ci * This header was generated from the Linux kernel headers by update_headers.py,
322851890Sopenharmony_ci * to provide necessary information from kernel to userspace, such as constants,
422851890Sopenharmony_ci * structures, and macros, and thus, contains no copyrightable information.
522851890Sopenharmony_ci */
622851890Sopenharmony_ci#ifndef _ASM_GENERIC_FCNTL_H
722851890Sopenharmony_ci#define _ASM_GENERIC_FCNTL_H
822851890Sopenharmony_ci#include <linux/types.h>
922851890Sopenharmony_ci#define O_ACCMODE	00000003
1022851890Sopenharmony_ci#define O_RDONLY	00000000
1122851890Sopenharmony_ci#define O_WRONLY	00000001
1222851890Sopenharmony_ci#define O_RDWR		00000002
1322851890Sopenharmony_ci#ifndef O_CREAT
1422851890Sopenharmony_ci#define O_CREAT		00000100
1522851890Sopenharmony_ci#endif
1622851890Sopenharmony_ci#ifndef O_EXCL
1722851890Sopenharmony_ci#define O_EXCL		00000200
1822851890Sopenharmony_ci#endif
1922851890Sopenharmony_ci#ifndef O_NOCTTY
2022851890Sopenharmony_ci#define O_NOCTTY	00000400
2122851890Sopenharmony_ci#endif
2222851890Sopenharmony_ci#ifndef O_TRUNC
2322851890Sopenharmony_ci#define O_TRUNC		00001000
2422851890Sopenharmony_ci#endif
2522851890Sopenharmony_ci#ifndef O_APPEND
2622851890Sopenharmony_ci#define O_APPEND	00002000
2722851890Sopenharmony_ci#endif
2822851890Sopenharmony_ci#ifndef O_NONBLOCK
2922851890Sopenharmony_ci#define O_NONBLOCK	00004000
3022851890Sopenharmony_ci#endif
3122851890Sopenharmony_ci#ifndef O_DSYNC
3222851890Sopenharmony_ci#define O_DSYNC		00010000
3322851890Sopenharmony_ci#endif
3422851890Sopenharmony_ci#ifndef FASYNC
3522851890Sopenharmony_ci#define FASYNC		00020000
3622851890Sopenharmony_ci#endif
3722851890Sopenharmony_ci#ifndef O_DIRECT
3822851890Sopenharmony_ci#define O_DIRECT	00040000
3922851890Sopenharmony_ci#endif
4022851890Sopenharmony_ci#ifndef O_LARGEFILE
4122851890Sopenharmony_ci#define O_LARGEFILE	00100000
4222851890Sopenharmony_ci#endif
4322851890Sopenharmony_ci#ifndef O_DIRECTORY
4422851890Sopenharmony_ci#define O_DIRECTORY	00200000
4522851890Sopenharmony_ci#endif
4622851890Sopenharmony_ci#ifndef O_NOFOLLOW
4722851890Sopenharmony_ci#define O_NOFOLLOW	00400000
4822851890Sopenharmony_ci#endif
4922851890Sopenharmony_ci#ifndef O_NOATIME
5022851890Sopenharmony_ci#define O_NOATIME	01000000
5122851890Sopenharmony_ci#endif
5222851890Sopenharmony_ci#ifndef O_CLOEXEC
5322851890Sopenharmony_ci#define O_CLOEXEC	02000000
5422851890Sopenharmony_ci#endif
5522851890Sopenharmony_ci#ifndef O_SYNC
5622851890Sopenharmony_ci#define __O_SYNC	04000000
5722851890Sopenharmony_ci#define O_SYNC		(__O_SYNC|O_DSYNC)
5822851890Sopenharmony_ci#endif
5922851890Sopenharmony_ci#ifndef O_PATH
6022851890Sopenharmony_ci#define O_PATH		010000000
6122851890Sopenharmony_ci#endif
6222851890Sopenharmony_ci#ifndef __O_TMPFILE
6322851890Sopenharmony_ci#define __O_TMPFILE	020000000
6422851890Sopenharmony_ci#endif
6522851890Sopenharmony_ci#define O_TMPFILE (__O_TMPFILE | O_DIRECTORY)
6622851890Sopenharmony_ci#define O_TMPFILE_MASK (__O_TMPFILE | O_DIRECTORY | O_CREAT)
6722851890Sopenharmony_ci#ifndef O_NDELAY
6822851890Sopenharmony_ci#define O_NDELAY	O_NONBLOCK
6922851890Sopenharmony_ci#endif
7022851890Sopenharmony_ci#define F_DUPFD		0
7122851890Sopenharmony_ci#define F_GETFD		1
7222851890Sopenharmony_ci#define F_SETFD		2
7322851890Sopenharmony_ci#define F_GETFL		3
7422851890Sopenharmony_ci#define F_SETFL		4
7522851890Sopenharmony_ci#ifndef F_GETLK
7622851890Sopenharmony_ci#define F_GETLK		5
7722851890Sopenharmony_ci#define F_SETLK		6
7822851890Sopenharmony_ci#define F_SETLKW	7
7922851890Sopenharmony_ci#endif
8022851890Sopenharmony_ci#ifndef F_SETOWN
8122851890Sopenharmony_ci#define F_SETOWN	8
8222851890Sopenharmony_ci#define F_GETOWN	9
8322851890Sopenharmony_ci#endif
8422851890Sopenharmony_ci#ifndef F_SETSIG
8522851890Sopenharmony_ci#define F_SETSIG	10
8622851890Sopenharmony_ci#define F_GETSIG	11
8722851890Sopenharmony_ci#endif
8822851890Sopenharmony_ci#ifndef __LP64__
8922851890Sopenharmony_ci#ifndef F_GETLK64
9022851890Sopenharmony_ci#define F_GETLK64	12
9122851890Sopenharmony_ci#define F_SETLK64	13
9222851890Sopenharmony_ci#define F_SETLKW64	14
9322851890Sopenharmony_ci#endif
9422851890Sopenharmony_ci#endif
9522851890Sopenharmony_ci#ifndef F_SETOWN_EX
9622851890Sopenharmony_ci#define F_SETOWN_EX	15
9722851890Sopenharmony_ci#define F_GETOWN_EX	16
9822851890Sopenharmony_ci#endif
9922851890Sopenharmony_ci#ifndef F_GETOWNER_UIDS
10022851890Sopenharmony_ci#define F_GETOWNER_UIDS	17
10122851890Sopenharmony_ci#endif
10222851890Sopenharmony_ci#define F_OFD_GETLK	36
10322851890Sopenharmony_ci#define F_OFD_SETLK	37
10422851890Sopenharmony_ci#define F_OFD_SETLKW	38
10522851890Sopenharmony_ci#define F_OWNER_TID	0
10622851890Sopenharmony_ci#define F_OWNER_PID	1
10722851890Sopenharmony_ci#define F_OWNER_PGRP	2
10822851890Sopenharmony_cistruct f_owner_ex {
10922851890Sopenharmony_ci	int	type;
11022851890Sopenharmony_ci	__kernel_pid_t	pid;
11122851890Sopenharmony_ci};
11222851890Sopenharmony_ci#define FD_CLOEXEC	1
11322851890Sopenharmony_ci#ifndef F_RDLCK
11422851890Sopenharmony_ci#define F_RDLCK		0
11522851890Sopenharmony_ci#define F_WRLCK		1
11622851890Sopenharmony_ci#define F_UNLCK		2
11722851890Sopenharmony_ci#endif
11822851890Sopenharmony_ci#ifndef F_EXLCK
11922851890Sopenharmony_ci#define F_EXLCK		4
12022851890Sopenharmony_ci#define F_SHLCK		8
12122851890Sopenharmony_ci#endif
12222851890Sopenharmony_ci#define LOCK_SH		1
12322851890Sopenharmony_ci#define LOCK_EX		2
12422851890Sopenharmony_ci#define LOCK_NB		4
12522851890Sopenharmony_ci#define LOCK_UN		8
12622851890Sopenharmony_ci#define LOCK_MAND	32
12722851890Sopenharmony_ci#define LOCK_READ	64
12822851890Sopenharmony_ci#define LOCK_WRITE	128
12922851890Sopenharmony_ci#define LOCK_RW		192
13022851890Sopenharmony_ci#define F_LINUX_SPECIFIC_BASE	1024
13122851890Sopenharmony_ci#ifndef HAVE_ARCH_STRUCT_FLOCK
13222851890Sopenharmony_ci#ifndef __ARCH_FLOCK_PAD
13322851890Sopenharmony_ci#define __ARCH_FLOCK_PAD
13422851890Sopenharmony_ci#endif
13522851890Sopenharmony_cistruct flock {
13622851890Sopenharmony_ci	short	l_type;
13722851890Sopenharmony_ci	short	l_whence;
13822851890Sopenharmony_ci	__kernel_off_t	l_start;
13922851890Sopenharmony_ci	__kernel_off_t	l_len;
14022851890Sopenharmony_ci	__kernel_pid_t	l_pid;
14122851890Sopenharmony_ci	__ARCH_FLOCK_PAD
14222851890Sopenharmony_ci};
14322851890Sopenharmony_ci#endif
14422851890Sopenharmony_ci#ifndef HAVE_ARCH_STRUCT_FLOCK64
14522851890Sopenharmony_ci#ifndef __ARCH_FLOCK64_PAD
14622851890Sopenharmony_ci#define __ARCH_FLOCK64_PAD
14722851890Sopenharmony_ci#endif
14822851890Sopenharmony_cistruct flock64 {
14922851890Sopenharmony_ci	short  l_type;
15022851890Sopenharmony_ci	short  l_whence;
15122851890Sopenharmony_ci	__kernel_loff_t l_start;
15222851890Sopenharmony_ci	__kernel_loff_t l_len;
15322851890Sopenharmony_ci	__kernel_pid_t  l_pid;
15422851890Sopenharmony_ci	__ARCH_FLOCK64_PAD
15522851890Sopenharmony_ci};
15622851890Sopenharmony_ci#endif
15722851890Sopenharmony_ci#endif
158