1633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham/*
2633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham * This file is subject to the terms and conditions of the GNU General Public
3633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham * License.  See the file "COPYING" in the main directory of this archive
4633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham * for more details.
5633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham *
6633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham * Copyright (C) 1995, 96, 97, 98, 99, 2003, 05 Ralf Baechle
7633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham */
8633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham#ifndef _ASM_FCNTL_H
9633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham#define _ASM_FCNTL_H
10633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham
11633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham
12633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham#define O_APPEND	0x0008
13633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham#define O_SYNC		0x0010
14633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham#define O_NONBLOCK	0x0080
15633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham#define O_CREAT         0x0100	/* not fcntl */
16633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham#define O_TRUNC		0x0200	/* not fcntl */
17633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham#define O_EXCL		0x0400	/* not fcntl */
18633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham#define O_NOCTTY	0x0800	/* not fcntl */
19633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham#define FASYNC		0x1000	/* fcntl, for BSD compatibility */
20633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham#define O_LARGEFILE	0x2000	/* allow large file opens */
21633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham#define O_DIRECT	0x8000	/* direct disk access hint */
22633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham
23633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham#define F_GETLK		14
24633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham#define F_SETLK		6
25633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham#define F_SETLKW	7
26633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham
27633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham#define F_SETOWN	24	/*  for sockets. */
28633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham#define F_GETOWN	23	/*  for sockets. */
29633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham
30633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham#ifndef __mips64
31633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham#define F_GETLK64	33	/*  using 'struct flock64' */
32633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham#define F_SETLK64	34
33633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham#define F_SETLKW64	35
34633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham#endif
35633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham
36633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham/*
37633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham * The flavours of struct flock.  "struct flock" is the ABI compliant
38633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham * variant.  Finally struct flock64 is the LFS variant of struct flock.  As
39633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham * a historic accident and inconsistence with the ABI definition it doesn't
40633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham * contain all the same fields as struct flock.
41633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham */
42633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham
43633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham#ifdef CONFIG_32BIT
44633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham
45633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandhamstruct flock {
46633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham	short	l_type;
47633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham	short	l_whence;
48633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham	off_t	l_start;
49633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham	off_t	l_len;
50633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham	long	l_sysid;
51633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham	__kernel_pid_t l_pid;
52633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham	long	pad[4];
53633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham};
54633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham
55633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham#define HAVE_ARCH_STRUCT_FLOCK
56633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham
57633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham#endif /* CONFIG_32BIT */
58633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham
59633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham#include <asm-generic/fcntl.h>
60633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham
61633c3473533ad9f2cca069b22cc5d95cd4e3510bRaghu Gandham#endif /* _ASM_FCNTL_H */
62