Tue Nov 2 18:01:27 2010 UTC ()
define LINUX_O_CLOEXEC.
sort definitions by value.
consistently use hex instead of octal for the values.


(chs)
diff -r1.3 -r1.4 src/sys/compat/linux/arch/alpha/linux_fcntl.h
diff -r1.3 -r1.4 src/sys/compat/linux/arch/amd64/linux_fcntl.h
diff -r1.3 -r1.4 src/sys/compat/linux/arch/arm/linux_fcntl.h
diff -r1.6 -r1.7 src/sys/compat/linux/arch/i386/linux_fcntl.h
diff -r1.3 -r1.4 src/sys/compat/linux/arch/m68k/linux_fcntl.h
diff -r1.6 -r1.7 src/sys/compat/linux/arch/mips/linux_fcntl.h
diff -r1.8 -r1.9 src/sys/compat/linux/arch/powerpc/linux_fcntl.h

cvs diff -r1.3 -r1.4 src/sys/compat/linux/arch/alpha/linux_fcntl.h (expand / switch to unified diff)

--- src/sys/compat/linux/arch/alpha/linux_fcntl.h 2010/09/21 19:26:19 1.3
+++ src/sys/compat/linux/arch/alpha/linux_fcntl.h 2010/11/02 18:01:25 1.4
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: linux_fcntl.h,v 1.3 2010/09/21 19:26:19 chs Exp $ */ 1/* $NetBSD: linux_fcntl.h,v 1.4 2010/11/02 18:01:25 chs Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 1998 The NetBSD Foundation, Inc. 4 * Copyright (c) 1998 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Eric Haszlakiewicz. 8 * by Eric Haszlakiewicz.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -29,39 +29,37 @@ @@ -29,39 +29,37 @@
29 * POSSIBILITY OF SUCH DAMAGE. 29 * POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31 31
32/* 32/*
33 * Various flag values used in Linux for open(2) and fcntl(2). 33 * Various flag values used in Linux for open(2) and fcntl(2).
34 */ 34 */
35 35
36#ifndef _ALPHA_LINUX_FCNTL_H 36#ifndef _ALPHA_LINUX_FCNTL_H
37#define _ALPHA_LINUX_FCNTL_H 37#define _ALPHA_LINUX_FCNTL_H
38 38
39/* read/write mode for open(2) defined in common/linux_fcntl.h */ 39/* read/write mode for open(2) defined in common/linux_fcntl.h */
40 40
41/* flags used in open(2) */ 41/* flags used in open(2) */
42#define LINUX_O_CREAT 0x0200 42#define LINUX_O_NONBLOCK 0x000004
43#define LINUX_O_TRUNC 0x0400 43#define LINUX_O_APPEND 0x000008
44#define LINUX_O_EXCL 0x0800 44#define LINUX_O_CREAT 0x000200
45 45#define LINUX_O_TRUNC 0x000400
46#define LINUX_O_NOCTTY 0x8000 46#define LINUX_O_EXCL 0x000800
47 
48#define LINUX_O_NONBLOCK 0x0004 
49#define LINUX_O_APPEND 0x0008 
50#define LINUX_O_NDELAY LINUX_O_NONBLOCK 47#define LINUX_O_NDELAY LINUX_O_NONBLOCK
51#define LINUX_O_SYNC 0x4000 48#define LINUX_FASYNC 0x002000
52#define LINUX_O_DIRECTORY 0x8000 49#define LINUX_O_SYNC 0x004000
53 50#define LINUX_O_NOCTTY 0x008000
54#define LINUX_FASYNC 0x2000 51#define LINUX_O_DIRECTORY 0x040000
 52#define LINUX_O_CLOEXEC 0x200000
55 53
56/* fcntl(2) operations */ 54/* fcntl(2) operations */
57#define LINUX_F_DUPFD 0 55#define LINUX_F_DUPFD 0
58#define LINUX_F_GETFD 1 56#define LINUX_F_GETFD 1
59#define LINUX_F_SETFD 2 57#define LINUX_F_SETFD 2
60#define LINUX_F_GETFL 3 58#define LINUX_F_GETFL 3
61#define LINUX_F_SETFL 4 59#define LINUX_F_SETFL 4
62 60
63#define LINUX_F_GETLK 7 61#define LINUX_F_GETLK 7
64#define LINUX_F_SETLK 8 62#define LINUX_F_SETLK 8
65#define LINUX_F_SETLKW 9 63#define LINUX_F_SETLKW 9
66 64
67#define LINUX_F_SETOWN 5 65#define LINUX_F_SETOWN 5

cvs diff -r1.3 -r1.4 src/sys/compat/linux/arch/amd64/linux_fcntl.h (expand / switch to unified diff)

--- src/sys/compat/linux/arch/amd64/linux_fcntl.h 2010/09/21 19:26:19 1.3
+++ src/sys/compat/linux/arch/amd64/linux_fcntl.h 2010/11/02 18:01:25 1.4
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: linux_fcntl.h,v 1.3 2010/09/21 19:26:19 chs Exp $ */ 1/* $NetBSD: linux_fcntl.h,v 1.4 2010/11/02 18:01:25 chs Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2005 Emmanuel Dreyfus, all rights reserved. 4 * Copyright (c) 2005 Emmanuel Dreyfus, all rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright 11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the 12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution. 13 * documentation and/or other materials provided with the distribution.
14 * 3. All advertising materials mentioning features or use of this software 14 * 3. All advertising materials mentioning features or use of this software
@@ -21,45 +21,55 @@ @@ -21,45 +21,55 @@
21 * THIS SOFTWARE IS PROVIDED BY THE THE AUTHOR AND CONTRIBUTORS ``AS IS''  21 * THIS SOFTWARE IS PROVIDED BY THE THE AUTHOR AND CONTRIBUTORS ``AS IS''
22 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,  22 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
23 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 23 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
24 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS  24 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS
25 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 25 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31 * POSSIBILITY OF SUCH DAMAGE. 31 * POSSIBILITY OF SUCH DAMAGE.
32 */ 32 */
33 33
 34/*
 35 * Various flag values used in Linux for open(2) and fcntl(2).
 36 */
 37
34#ifndef _AMD64_LINUX_FCNTL_H 38#ifndef _AMD64_LINUX_FCNTL_H
35#define _AMD64_LINUX_FCNTL_H 39#define _AMD64_LINUX_FCNTL_H
36 40
37#define LINUX_O_CREAT 0100 41/* read/write mode for open(2) defined in common/linux_fcntl.h */
38#define LINUX_O_EXCL 0200 
39#define LINUX_O_NOCTTY 0400 
40#define LINUX_O_TRUNC 01000 
41#define LINUX_O_APPEND 02000 
42#define LINUX_O_NDELAY 04000 
43#define LINUX_O_SYNC 010000 
44#define LINUX_FASYNC 020000 
45#define LINUX_O_DIRECTORY 0x10000 
46 42
47#define LINUX_F_RDLCK 0 43/* flags used in open(2) */
48#define LINUX_F_WRLCK 1  44#define LINUX_O_CREAT 0x00040
49#define LINUX_F_UNLCK 2 45#define LINUX_O_EXCL 0x00080
 46#define LINUX_O_NOCTTY 0x00100
 47#define LINUX_O_TRUNC 0x00200
 48#define LINUX_O_APPEND 0x00400
 49#define LINUX_O_NONBLOCK 0x00800
 50#define LINUX_O_NDELAY LINUX_O_NONBLOCK
 51#define LINUX_O_SYNC 0x01000
 52#define LINUX_FASYNC 0x02000
 53#define LINUX_O_DIRECTORY 0x10000
 54#define LINUX_O_CLOEXEC 0x80000
50 55
 56/* fcntl(2) operations */
51#define LINUX_F_DUPFD 0 57#define LINUX_F_DUPFD 0
52#define LINUX_F_GETFD 1 58#define LINUX_F_GETFD 1
53#define LINUX_F_SETFD 2 59#define LINUX_F_SETFD 2
54#define LINUX_F_GETFL 3 60#define LINUX_F_GETFL 3
55#define LINUX_F_SETFL 4 61#define LINUX_F_SETFL 4
56#define LINUX_F_GETLK 5  62#define LINUX_F_GETLK 5
57#define LINUX_F_SETLK 6 63#define LINUX_F_SETLK 6
58#define LINUX_F_SETLKW 7 64#define LINUX_F_SETLKW 7
59#define LINUX_F_SETOWN 8 65#define LINUX_F_SETOWN 8
60#define LINUX_F_GETOWN 9 66#define LINUX_F_GETOWN 9
61#define LINUX_F_GETLK64 12 67#define LINUX_F_GETLK64 12
62#define LINUX_F_SETLK64 13 68#define LINUX_F_SETLK64 13
63#define LINUX_F_SETLKW64 14 69#define LINUX_F_SETLKW64 14
64 70
 71#define LINUX_F_RDLCK 0
 72#define LINUX_F_WRLCK 1
 73#define LINUX_F_UNLCK 2
 74
65#endif /* !_AMD64_LINUX_FCNTL_H */ 75#endif /* !_AMD64_LINUX_FCNTL_H */

cvs diff -r1.3 -r1.4 src/sys/compat/linux/arch/arm/linux_fcntl.h (expand / switch to unified diff)

--- src/sys/compat/linux/arch/arm/linux_fcntl.h 2010/09/21 19:26:19 1.3
+++ src/sys/compat/linux/arch/arm/linux_fcntl.h 2010/11/02 18:01:25 1.4
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: linux_fcntl.h,v 1.3 2010/09/21 19:26:19 chs Exp $ */ 1/* $NetBSD: linux_fcntl.h,v 1.4 2010/11/02 18:01:25 chs Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc. 4 * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Frank van der Linden and Eric Haszlakiewicz. 8 * by Frank van der Linden and Eric Haszlakiewicz.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -29,35 +29,37 @@ @@ -29,35 +29,37 @@
29 * POSSIBILITY OF SUCH DAMAGE. 29 * POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31 31
32/* 32/*
33 * Various flag values used in Linux for open(2) and fcntl(2). 33 * Various flag values used in Linux for open(2) and fcntl(2).
34 */ 34 */
35 35
36#ifndef _ARM_LINUX_FCNTL_H 36#ifndef _ARM_LINUX_FCNTL_H
37#define _ARM_LINUX_FCNTL_H 37#define _ARM_LINUX_FCNTL_H
38 38
39/* read/write mode for open(2) defined in common/linux_fcntl.h */ 39/* read/write mode for open(2) defined in common/linux_fcntl.h */
40 40
41/* flags used in open(2) */ 41/* flags used in open(2) */
42#define LINUX_O_CREAT 0x0040 42#define LINUX_O_CREAT 0x00040
43#define LINUX_O_EXCL 0x0080 43#define LINUX_O_EXCL 0x00080
44#define LINUX_O_NOCTTY 0x0100 44#define LINUX_O_NOCTTY 0x00100
45#define LINUX_O_TRUNC 0x0200 45#define LINUX_O_TRUNC 0x00200
46#define LINUX_O_APPEND 0x0400 46#define LINUX_O_APPEND 0x00400
47#define LINUX_O_NDELAY 0x0800 47#define LINUX_O_NONBLOCK 0x00800
48#define LINUX_O_SYNC 0x1000 48#define LINUX_O_NDELAY LINUX_O_NONBLOCK
49#define LINUX_FASYNC 0x2000 49#define LINUX_O_SYNC 0x01000
50#define LINUX_O_DIRECTORY 0x4000 50#define LINUX_FASYNC 0x02000
 51#define LINUX_O_DIRECTORY 0x04000
 52#define LINUX_O_CLOEXEC 0x80000
51 53
52/* fcntl(2) operations */ 54/* fcntl(2) operations */
53#define LINUX_F_DUPFD 0 55#define LINUX_F_DUPFD 0
54#define LINUX_F_GETFD 1 56#define LINUX_F_GETFD 1
55#define LINUX_F_SETFD 2 57#define LINUX_F_SETFD 2
56#define LINUX_F_GETFL 3 58#define LINUX_F_GETFL 3
57#define LINUX_F_SETFL 4 59#define LINUX_F_SETFL 4
58#define LINUX_F_GETLK 5 60#define LINUX_F_GETLK 5
59#define LINUX_F_SETLK 6 61#define LINUX_F_SETLK 6
60#define LINUX_F_SETLKW 7 62#define LINUX_F_SETLKW 7
61#define LINUX_F_SETOWN 8 63#define LINUX_F_SETOWN 8
62#define LINUX_F_GETOWN 9 64#define LINUX_F_GETOWN 9
63 65

cvs diff -r1.6 -r1.7 src/sys/compat/linux/arch/i386/linux_fcntl.h (expand / switch to unified diff)

--- src/sys/compat/linux/arch/i386/linux_fcntl.h 2010/09/21 19:26:19 1.6
+++ src/sys/compat/linux/arch/i386/linux_fcntl.h 2010/11/02 18:01:26 1.7
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: linux_fcntl.h,v 1.6 2010/09/21 19:26:19 chs Exp $ */ 1/* $NetBSD: linux_fcntl.h,v 1.7 2010/11/02 18:01:26 chs Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc. 4 * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Frank van der Linden and Eric Haszlakiewicz. 8 * by Frank van der Linden and Eric Haszlakiewicz.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -29,46 +29,49 @@ @@ -29,46 +29,49 @@
29 * POSSIBILITY OF SUCH DAMAGE. 29 * POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31 31
32/* 32/*
33 * Various flag values used in Linux for open(2) and fcntl(2). 33 * Various flag values used in Linux for open(2) and fcntl(2).
34 */ 34 */
35 35
36#ifndef _I386_LINUX_FCNTL_H 36#ifndef _I386_LINUX_FCNTL_H
37#define _I386_LINUX_FCNTL_H 37#define _I386_LINUX_FCNTL_H
38 38
39/* read/write mode for open(2) defined in common/linux_fcntl.h */ 39/* read/write mode for open(2) defined in common/linux_fcntl.h */
40 40
41/* flags used in open(2) */ 41/* flags used in open(2) */
42#define LINUX_O_CREAT 0x0040 42#define LINUX_O_CREAT 0x00040
43#define LINUX_O_EXCL 0x0080 43#define LINUX_O_EXCL 0x00080
44#define LINUX_O_NOCTTY 0x0100 44#define LINUX_O_NOCTTY 0x00100
45#define LINUX_O_TRUNC 0x0200 45#define LINUX_O_TRUNC 0x00200
46#define LINUX_O_APPEND 0x0400 46#define LINUX_O_APPEND 0x00400
47#define LINUX_O_NDELAY 0x0800 47#define LINUX_O_NONBLOCK 0x00800
48#define LINUX_O_SYNC 0x1000 48#define LINUX_O_NDELAY LINUX_O_NONBLOCK
49#define LINUX_FASYNC 0x2000 49#define LINUX_O_SYNC 0x01000
 50#define LINUX_FASYNC 0x02000
50#define LINUX_O_DIRECTORY 0x10000 51#define LINUX_O_DIRECTORY 0x10000
 52#define LINUX_O_CLOEXEC 0x80000
51 53
52/* fcntl(2) operations */ 54/* fcntl(2) operations */
53#define LINUX_F_DUPFD 0 55#define LINUX_F_DUPFD 0
54#define LINUX_F_GETFD 1 56#define LINUX_F_GETFD 1
55#define LINUX_F_SETFD 2 57#define LINUX_F_SETFD 2
56#define LINUX_F_GETFL 3 58#define LINUX_F_GETFL 3
57#define LINUX_F_SETFL 4 59#define LINUX_F_SETFL 4
58#define LINUX_F_GETLK 5 60#define LINUX_F_GETLK 5
59#define LINUX_F_SETLK 6 61#define LINUX_F_SETLK 6
60#define LINUX_F_SETLKW 7 62#define LINUX_F_SETLKW 7
61#define LINUX_F_SETOWN 8 63#define LINUX_F_SETOWN 8
62#define LINUX_F_GETOWN 9 64#define LINUX_F_GETOWN 9
63 65
64#define LINUX_F_RDLCK 0 66#define LINUX_F_RDLCK 0
65#define LINUX_F_WRLCK 1 67#define LINUX_F_WRLCK 1
66#define LINUX_F_UNLCK 2 68#define LINUX_F_UNLCK 2
67 69
68#define LINUX_LOCK_EX 4 70#define LINUX_LOCK_EX 4
69#define LINUX_LOCK_SH 8 71#define LINUX_LOCK_SH 8
70 72
71#define LINUX_F_GETLK64 12 73#define LINUX_F_GETLK64 12
72#define LINUX_F_SETLK64 13 74#define LINUX_F_SETLK64 13
73#define LINUX_F_SETLKW64 14 75#define LINUX_F_SETLKW64 14
 76
74#endif /* !_I386_LINUX_FCNTL_H */ 77#endif /* !_I386_LINUX_FCNTL_H */

cvs diff -r1.3 -r1.4 src/sys/compat/linux/arch/m68k/linux_fcntl.h (expand / switch to unified diff)

--- src/sys/compat/linux/arch/m68k/linux_fcntl.h 2008/04/28 20:23:42 1.3
+++ src/sys/compat/linux/arch/m68k/linux_fcntl.h 2010/11/02 18:01:26 1.4
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: linux_fcntl.h,v 1.3 2008/04/28 20:23:42 martin Exp $ */ 1/* $NetBSD: linux_fcntl.h,v 1.4 2010/11/02 18:01:26 chs Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc. 4 * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Frank van der Linden and Eric Haszlakiewicz. 8 * by Frank van der Linden and Eric Haszlakiewicz.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -29,37 +29,38 @@ @@ -29,37 +29,38 @@
29 * POSSIBILITY OF SUCH DAMAGE. 29 * POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31 31
32/* 32/*
33 * Various flag values used in Linux for open(2) and fcntl(2). 33 * Various flag values used in Linux for open(2) and fcntl(2).
34 */ 34 */
35 35
36#ifndef _M68K_LINUX_FCNTL_H 36#ifndef _M68K_LINUX_FCNTL_H
37#define _M68K_LINUX_FCNTL_H 37#define _M68K_LINUX_FCNTL_H
38 38
39/* read/write mode for open(2) defined in common/linux_fcntl.h */ 39/* read/write mode for open(2) defined in common/linux_fcntl.h */
40 40
41/* flags used in open(2) */ 41/* flags used in open(2) */
42#define LINUX_O_CREAT 0x0040 42#define LINUX_O_CREAT 0x00040
43#define LINUX_O_EXCL 0x0080 43#define LINUX_O_EXCL 0x00080
44#define LINUX_O_NOCTTY 0x0100 44#define LINUX_O_NOCTTY 0x00100
45#define LINUX_O_TRUNC 0x0200 45#define LINUX_O_TRUNC 0x00200
46#define LINUX_O_APPEND 0x0400 46#define LINUX_O_APPEND 0x00400
47#define LINUX_O_NDELAY 0x0800 47#define LINUX_O_NONBLOCK 0x00800
48#define LINUX_O_SYNC 0x1000 48#define LINUX_O_NDELAY LINUX_O_NONBLOCK
49#define LINUX_O_DIRECTORY 0x4000 49#define LINUX_O_SYNC 0x01000
50#define LINUX_O_NOFOLLOW 0x8000 50#define LINUX_FASYNC 0x02000
51 51#define LINUX_O_DIRECTORY 0x04000
52#define LINUX_FASYNC 0x2000 52#define LINUX_O_NOFOLLOW 0x08000
 53#define LINUX_O_CLOEXEC 0x80000
53 54
54/* fcntl(2) operations */ 55/* fcntl(2) operations */
55#define LINUX_F_DUPFD 0 56#define LINUX_F_DUPFD 0
56#define LINUX_F_GETFD 1 57#define LINUX_F_GETFD 1
57#define LINUX_F_SETFD 2 58#define LINUX_F_SETFD 2
58#define LINUX_F_GETFL 3 59#define LINUX_F_GETFL 3
59#define LINUX_F_SETFL 4 60#define LINUX_F_SETFL 4
60#define LINUX_F_GETLK 5 61#define LINUX_F_GETLK 5
61#define LINUX_F_SETLK 6 62#define LINUX_F_SETLK 6
62#define LINUX_F_SETLKW 7 63#define LINUX_F_SETLKW 7
63#define LINUX_F_SETOWN 8 64#define LINUX_F_SETOWN 8
64#define LINUX_F_GETOWN 9 65#define LINUX_F_GETOWN 9
65#define LINUX_F_SETSIG 10 66#define LINUX_F_SETSIG 10
@@ -69,14 +70,15 @@ @@ -69,14 +70,15 @@
69#define LINUX_F_WRLCK 1 70#define LINUX_F_WRLCK 1
70#define LINUX_F_UNLCK 2 71#define LINUX_F_UNLCK 2
71#define LINUX_F_EXLCK 4 72#define LINUX_F_EXLCK 4
72#define LINUX_F_SHLCK 8 73#define LINUX_F_SHLCK 8
73 74
74#define LINUX_LOCK_SH 1 75#define LINUX_LOCK_SH 1
75#define LINUX_LOCK_EX 2 76#define LINUX_LOCK_EX 2
76#define LINUX_LOCK_NB 4 77#define LINUX_LOCK_NB 4
77#define LINUX_LOCK_UN 8 78#define LINUX_LOCK_UN 8
78 79
79#define LINUX_F_GETLK64 12 80#define LINUX_F_GETLK64 12
80#define LINUX_F_SETLK64 13 81#define LINUX_F_SETLK64 13
81#define LINUX_F_SETLKW64 14 82#define LINUX_F_SETLKW64 14
 83
82#endif /* !_M68K_LINUX_FCNTL_H */ 84#endif /* !_M68K_LINUX_FCNTL_H */

cvs diff -r1.6 -r1.7 src/sys/compat/linux/arch/mips/linux_fcntl.h (expand / switch to unified diff)

--- src/sys/compat/linux/arch/mips/linux_fcntl.h 2010/09/21 19:26:20 1.6
+++ src/sys/compat/linux/arch/mips/linux_fcntl.h 2010/11/02 18:01:26 1.7
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: linux_fcntl.h,v 1.6 2010/09/21 19:26:20 chs Exp $ */ 1/* $NetBSD: linux_fcntl.h,v 1.7 2010/11/02 18:01:26 chs Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 1995, 1998, 2001 The NetBSD Foundation, Inc. 4 * Copyright (c) 1995, 1998, 2001 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Frank van der Linden, Eric Haszlakiewicz, and Emmanuel Dreyfus. 8 * by Frank van der Linden, Eric Haszlakiewicz, and Emmanuel Dreyfus.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -30,58 +30,50 @@ @@ -30,58 +30,50 @@
30 */ 30 */
31 31
32/* 32/*
33 * Various flag values used in Linux for open(2) and fcntl(2). 33 * Various flag values used in Linux for open(2) and fcntl(2).
34 */ 34 */
35 35
36#ifndef _MIPS_LINUX_FCNTL_H 36#ifndef _MIPS_LINUX_FCNTL_H
37#define _MIPS_LINUX_FCNTL_H 37#define _MIPS_LINUX_FCNTL_H
38 38
39/* 39/*
40 * read/write mode for open(2) are defined in common/linux_fcntl.h 40 * read/write mode for open(2) are defined in common/linux_fcntl.h
41 */ 41 */
42 42
43/* 43/* flags used in open(2) */
44 * flags used in open(2) 44#define LINUX_O_APPEND 0x00008
45 * From Linux's include/asm-mips/fcntl.h 45#define LINUX_O_SYNC 0x00010
46 */ 46#define LINUX_O_NONBLOCK 0x00080
47#define LINUX_O_CREAT 0x0100 
48#define LINUX_O_EXCL 0x0400 
49#define LINUX_O_NOCTTY 0x0800 
50#define LINUX_O_TRUNC 0x0200 
51#define LINUX_O_APPEND 0x0008 
52#define LINUX_O_NONBLOCK 0x0080 
53#define LINUX_O_NDELAY LINUX_O_NONBLOCK 47#define LINUX_O_NDELAY LINUX_O_NONBLOCK
54#define LINUX_O_SYNC 0x0010 48#define LINUX_O_CREAT 0x00100
55#define LINUX_FASYNC 0x1000 49#define LINUX_O_TRUNC 0x00200
 50#define LINUX_O_EXCL 0x00400
 51#define LINUX_O_NOCTTY 0x00800
 52#define LINUX_FASYNC 0x01000
56#define LINUX_O_DIRECTORY 0x10000 53#define LINUX_O_DIRECTORY 0x10000
 54#define LINUX_O_CLOEXEC 0x80000
57 55
58/* 56/* fcntl(2) operations */
59 * fcntl(2) operations 
60 * From Linux's include/asm-mips/fcntl.h 
61 */ 
62#define LINUX_F_DUPFD 0 57#define LINUX_F_DUPFD 0
63#define LINUX_F_GETFD 1 58#define LINUX_F_GETFD 1
64#define LINUX_F_SETFD 2 59#define LINUX_F_SETFD 2
65#define LINUX_F_GETFL 3 60#define LINUX_F_GETFL 3
66#define LINUX_F_SETFL 4 61#define LINUX_F_SETFL 4
67#define LINUX_F_GETLK 14 62#define LINUX_F_GETLK 14
68#define LINUX_F_SETLK 6 63#define LINUX_F_SETLK 6
69#define LINUX_F_SETLKW 7 64#define LINUX_F_SETLKW 7
70#define LINUX_F_SETOWN 24 65#define LINUX_F_SETOWN 24
71#define LINUX_F_GETOWN 23 66#define LINUX_F_GETOWN 23
72 67
73#define LINUX_F_RDLCK 0 68#define LINUX_F_RDLCK 0
74#define LINUX_F_WRLCK 1 69#define LINUX_F_WRLCK 1
75#define LINUX_F_UNLCK 2 70#define LINUX_F_UNLCK 2
76 71
77#define LINUX_LOCK_EX 4 /* F_EXLCK in Linux, and comment "or 3 " */ 72#define LINUX_LOCK_EX 4 /* F_EXLCK in Linux, and comment "or 3 " */
78#define LINUX_LOCK_SH 8 /* F_SHLCK in Linux, and comment "or 4' */ 73#define LINUX_LOCK_SH 8 /* F_SHLCK in Linux, and comment "or 4' */
79 74
80/* 
81 * From Linux's include/asm-mips64/fcntl.h 
82 */ 
83#define LINUX_F_GETLK64 33 75#define LINUX_F_GETLK64 33
84#define LINUX_F_SETLK64 34 76#define LINUX_F_SETLK64 34
85#define LINUX_F_SETLKW64 35 77#define LINUX_F_SETLKW64 35
86 78
87#endif /* !_MIPS_LINUX_FCNTL_H */ 79#endif /* !_MIPS_LINUX_FCNTL_H */

cvs diff -r1.8 -r1.9 src/sys/compat/linux/arch/powerpc/linux_fcntl.h (expand / switch to unified diff)

--- src/sys/compat/linux/arch/powerpc/linux_fcntl.h 2010/09/21 19:26:20 1.8
+++ src/sys/compat/linux/arch/powerpc/linux_fcntl.h 2010/11/02 18:01:26 1.9
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: linux_fcntl.h,v 1.8 2010/09/21 19:26:20 chs Exp $ */ 1/* $NetBSD: linux_fcntl.h,v 1.9 2010/11/02 18:01:26 chs Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 1995, 1998, 2001 The NetBSD Foundation, Inc. 4 * Copyright (c) 1995, 1998, 2001 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Frank van der Linden, Eric Haszlakiewicz, and Emmanuel Dreyfus. 8 * by Frank van der Linden, Eric Haszlakiewicz, and Emmanuel Dreyfus.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -30,46 +30,40 @@ @@ -30,46 +30,40 @@
30 */ 30 */
31 31
32/* 32/*
33 * Various flag values used in Linux for open(2) and fcntl(2). 33 * Various flag values used in Linux for open(2) and fcntl(2).
34 */ 34 */
35 35
36#ifndef _POWERPC_LINUX_FCNTL_H 36#ifndef _POWERPC_LINUX_FCNTL_H
37#define _POWERPC_LINUX_FCNTL_H 37#define _POWERPC_LINUX_FCNTL_H
38 38
39/* 39/*
40 * read/write mode for open(2) are defined in common/linux_fcntl.h 40 * read/write mode for open(2) are defined in common/linux_fcntl.h
41 */ 41 */
42 42
43/* 43/* flags used in open(2) */
44 * flags used in open(2) 44#define LINUX_O_CREAT 0x00040
45 * From Linux's include/asm-ppc/fcntl.h 45#define LINUX_O_EXCL 0x00080
46 * Theses are octal values (remember 0100 != 100 in C) 46#define LINUX_O_NOCTTY 0x00100
47 */ 47#define LINUX_O_TRUNC 0x00200
48#define LINUX_O_CREAT 0100 48#define LINUX_O_APPEND 0x00400
49#define LINUX_O_EXCL 0200 49#define LINUX_O_NONBLOCK 0x00800
50#define LINUX_O_NOCTTY 0400 
51#define LINUX_O_TRUNC 01000 
52#define LINUX_O_APPEND 02000 
53#define LINUX_O_NONBLOCK 04000 
54#define LINUX_O_NDELAY LINUX_O_NONBLOCK 50#define LINUX_O_NDELAY LINUX_O_NONBLOCK
55#define LINUX_O_SYNC 010000 51#define LINUX_O_SYNC 0x01000
56#define LINUX_FASYNC 020000 52#define LINUX_FASYNC 0x02000
57#define LINUX_O_DIRECTORY 0x4000 53#define LINUX_O_DIRECTORY 0x04000
 54#define LINUX_O_CLOEXEC 0x80000
58 55
59/* 56/* fcntl(2) operations */
60 * fcntl(2) operations 
61 * From Linux's include/asm-ppc/fcntl.h 
62 */ 
63#define LINUX_F_DUPFD 0 57#define LINUX_F_DUPFD 0
64#define LINUX_F_GETFD 1 58#define LINUX_F_GETFD 1
65#define LINUX_F_SETFD 2 59#define LINUX_F_SETFD 2
66#define LINUX_F_GETFL 3 60#define LINUX_F_GETFL 3
67#define LINUX_F_SETFL 4 61#define LINUX_F_SETFL 4
68#define LINUX_F_GETLK 5 62#define LINUX_F_GETLK 5
69#define LINUX_F_SETLK 6 63#define LINUX_F_SETLK 6
70#define LINUX_F_SETLKW 7 64#define LINUX_F_SETLKW 7
71#define LINUX_F_SETOWN 8 65#define LINUX_F_SETOWN 8
72#define LINUX_F_GETOWN 9 66#define LINUX_F_GETOWN 9
73 67
74#define LINUX_F_RDLCK 0 68#define LINUX_F_RDLCK 0
75#define LINUX_F_WRLCK 1 69#define LINUX_F_WRLCK 1