Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PATCH] Clean up struct flock definitions

This patch just gathers together all the struct flock definitions except
xtensa into asm-generic/fcntl.h.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Stephen Rothwell and committed by
Linus Torvalds
5ac353f9 1abf62af

+26 -171
-8
include/asm-alpha/fcntl.h
··· 37 37 38 38 #define F_INPROGRESS 64 39 39 40 - struct flock { 41 - short l_type; 42 - short l_whence; 43 - __kernel_off_t l_start; 44 - __kernel_off_t l_len; 45 - __kernel_pid_t l_pid; 46 - }; 47 - 48 40 #include <asm-generic/fcntl.h> 49 41 50 42 #endif
-8
include/asm-arm/fcntl.h
··· 10 10 #define F_SETLK64 13 11 11 #define F_SETLKW64 14 12 12 13 - struct flock { 14 - short l_type; 15 - short l_whence; 16 - off_t l_start; 17 - off_t l_len; 18 - pid_t l_pid; 19 - }; 20 - 21 13 struct flock64 { 22 14 short l_type; 23 15 short l_whence;
-8
include/asm-arm26/fcntl.h
··· 12 12 #define F_SETLK64 13 13 13 #define F_SETLKW64 14 14 14 15 - struct flock { 16 - short l_type; 17 - short l_whence; 18 - off_t l_start; 19 - off_t l_len; 20 - pid_t l_pid; 21 - }; 22 - 23 15 struct flock64 { 24 16 short l_type; 25 17 short l_whence;
-8
include/asm-cris/fcntl.h
··· 5 5 #define F_SETLK64 13 6 6 #define F_SETLKW64 14 7 7 8 - struct flock { 9 - short l_type; 10 - short l_whence; 11 - off_t l_start; 12 - off_t l_len; 13 - pid_t l_pid; 14 - }; 15 - 16 8 struct flock64 { 17 9 short l_type; 18 10 short l_whence;
-8
include/asm-frv/fcntl.h
··· 5 5 #define F_SETLK64 13 6 6 #define F_SETLKW64 14 7 7 8 - struct flock { 9 - short l_type; 10 - short l_whence; 11 - off_t l_start; 12 - off_t l_len; 13 - pid_t l_pid; 14 - }; 15 - 16 8 struct flock64 { 17 9 short l_type; 18 10 short l_whence;
+17
include/asm-generic/fcntl.h
··· 1 1 #ifndef _ASM_GENERIC_FCNTL_H 2 2 #define _ASM_GENERIC_FCNTL_H 3 3 4 + #include <linux/types.h> 5 + 4 6 /* open/fcntl - O_SYNC is only implemented on blocks devices and on files 5 7 located on an ext2 file system */ 6 8 #define O_ACCMODE 00000003 ··· 105 103 #define LOCK_RW 192 /* which allows concurrent read & write ops */ 106 104 107 105 #define F_LINUX_SPECIFIC_BASE 1024 106 + 107 + #ifndef HAVE_ARCH_STRUCT_FLOCK 108 + #ifndef __ARCH_FLOCK_PAD 109 + #define __ARCH_FLOCK_PAD 110 + #endif 111 + 112 + struct flock { 113 + short l_type; 114 + short l_whence; 115 + off_t l_start; 116 + off_t l_len; 117 + pid_t l_pid; 118 + __ARCH_FLOCK_PAD 119 + }; 120 + #endif 108 121 109 122 #endif /* _ASM_GENERIC_FCNTL_H */
-8
include/asm-h8300/fcntl.h
··· 10 10 #define F_SETLK64 13 11 11 #define F_SETLKW64 14 12 12 13 - struct flock { 14 - short l_type; 15 - short l_whence; 16 - off_t l_start; 17 - off_t l_len; 18 - pid_t l_pid; 19 - }; 20 - 21 13 struct flock64 { 22 14 short l_type; 23 15 short l_whence;
-8
include/asm-i386/fcntl.h
··· 5 5 #define F_SETLK64 13 6 6 #define F_SETLKW64 14 7 7 8 - struct flock { 9 - short l_type; 10 - short l_whence; 11 - off_t l_start; 12 - off_t l_len; 13 - pid_t l_pid; 14 - }; 15 - 16 8 struct flock64 { 17 9 short l_type; 18 10 short l_whence;
-8
include/asm-ia64/fcntl.h
··· 5 5 * David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co. 6 6 */ 7 7 8 - struct flock { 9 - short l_type; 10 - short l_whence; 11 - off_t l_start; 12 - off_t l_len; 13 - pid_t l_pid; 14 - }; 15 - 16 8 #define force_o_largefile() \ 17 9 (personality(current->personality) != PER_LINUX32) 18 10
-12
include/asm-m32r/fcntl.h
··· 1 1 #ifndef _ASM_M32R_FCNTL_H 2 2 #define _ASM_M32R_FCNTL_H 3 3 4 - /* $Id$ */ 5 - 6 - /* orig : i386 2.4.18 */ 7 - 8 4 #define F_GETLK64 12 /* using 'struct flock64' */ 9 5 #define F_SETLK64 13 10 6 #define F_SETLKW64 14 11 - 12 - struct flock { 13 - short l_type; 14 - short l_whence; 15 - off_t l_start; 16 - off_t l_len; 17 - pid_t l_pid; 18 - }; 19 7 20 8 struct flock64 { 21 9 short l_type;
-8
include/asm-m68k/fcntl.h
··· 10 10 #define F_SETLK64 13 11 11 #define F_SETLKW64 14 12 12 13 - struct flock { 14 - short l_type; 15 - short l_whence; 16 - off_t l_start; 17 - off_t l_len; 18 - pid_t l_pid; 19 - }; 20 - 21 13 struct flock64 { 22 14 short l_type; 23 15 short l_whence;
+4 -13
include/asm-mips/fcntl.h
··· 50 50 long l_sysid; 51 51 __kernel_pid_t l_pid; 52 52 long pad[4]; 53 - } flock_t; 53 + }; 54 54 55 55 typedef struct flock64 { 56 56 short l_type; ··· 60 60 pid_t l_pid; 61 61 } flock64_t; 62 62 63 - #else /* 64-bit definitions */ 64 63 65 - typedef struct flock { 66 - short l_type; 67 - short l_whence; 68 - __kernel_off_t l_start; 69 - __kernel_off_t l_len; 70 - __kernel_pid_t l_pid; 71 - } flock_t; 72 - 73 - #ifdef __KERNEL__ 74 - #define flock64 flock 75 - #endif 64 + #define HAVE_ARCH_STRUCT_FLOCK 76 65 77 66 #endif 78 67 79 68 #include <asm-generic/fcntl.h> 69 + 70 + typedef struct flock flock_t; 80 71 81 72 #endif /* _ASM_FCNTL_H */
-8
include/asm-parisc/fcntl.h
··· 33 33 #define F_WRLCK 02 34 34 #define F_UNLCK 03 35 35 36 - struct flock { 37 - short l_type; 38 - short l_whence; 39 - off_t l_start; 40 - off_t l_len; 41 - pid_t l_pid; 42 - }; 43 - 44 36 struct flock64 { 45 37 short l_type; 46 38 short l_whence;
-10
include/asm-ppc/fcntl.h
··· 10 10 #define F_GETLK64 12 /* using 'struct flock64' */ 11 11 #define F_SETLK64 13 12 12 #define F_SETLKW64 14 13 - #endif 14 13 15 - struct flock { 16 - short l_type; 17 - short l_whence; 18 - off_t l_start; 19 - off_t l_len; 20 - pid_t l_pid; 21 - }; 22 - 23 - #ifndef __powerpc64__ 24 14 struct flock64 { 25 15 short l_type; 26 16 short l_whence;
-10
include/asm-s390/fcntl.h
··· 12 12 #define F_GETLK64 12 /* using 'struct flock64' */ 13 13 #define F_SETLK64 13 14 14 #define F_SETLKW64 14 15 - #endif /* ! __s390x__ */ 16 15 17 - struct flock { 18 - short l_type; 19 - short l_whence; 20 - off_t l_start; 21 - off_t l_len; 22 - pid_t l_pid; 23 - }; 24 - 25 - #ifndef __s390x__ 26 16 struct flock64 { 27 17 short l_type; 28 18 short l_whence;
-8
include/asm-sh/fcntl.h
··· 5 5 #define F_SETLK64 13 6 6 #define F_SETLKW64 14 7 7 8 - struct flock { 9 - short l_type; 10 - short l_whence; 11 - off_t l_start; 12 - off_t l_len; 13 - pid_t l_pid; 14 - }; 15 - 16 8 struct flock64 { 17 9 short l_type; 18 10 short l_whence;
+2 -9
include/asm-sparc/fcntl.h
··· 32 32 #define F_WRLCK 2 33 33 #define F_UNLCK 3 34 34 35 - struct flock { 36 - short l_type; 37 - short l_whence; 38 - off_t l_start; 39 - off_t l_len; 40 - pid_t l_pid; 41 - short __unused; 42 - }; 43 - 44 35 struct flock64 { 45 36 short l_type; 46 37 short l_whence; ··· 40 49 pid_t l_pid; 41 50 short __unused; 42 51 }; 52 + 53 + #define __ARCH_FLOCK_PAD short __unused; 43 54 44 55 #include <asm-generic/fcntl.h> 45 56
+1 -8
include/asm-sparc64/fcntl.h
··· 29 29 #define F_WRLCK 2 30 30 #define F_UNLCK 3 31 31 32 - struct flock { 33 - short l_type; 34 - short l_whence; 35 - off_t l_start; 36 - off_t l_len; 37 - pid_t l_pid; 38 - short __unused; 39 - }; 32 + #define __ARCH_FLOCK_PAD short __unused; 40 33 41 34 #include <asm-generic/fcntl.h> 42 35
-8
include/asm-v850/fcntl.h
··· 10 10 #define F_SETLK64 13 11 11 #define F_SETLKW64 14 12 12 13 - struct flock { 14 - short l_type; 15 - short l_whence; 16 - off_t l_start; 17 - off_t l_len; 18 - pid_t l_pid; 19 - }; 20 - 21 13 struct flock64 { 22 14 short l_type; 23 15 short l_whence;
-13
include/asm-x86_64/fcntl.h
··· 1 - #ifndef _X86_64_FCNTL_H 2 - #define _X86_64_FCNTL_H 3 - 4 - struct flock { 5 - short l_type; 6 - short l_whence; 7 - off_t l_start; 8 - off_t l_len; 9 - pid_t l_pid; 10 - }; 11 - 12 1 #include <asm-generic/fcntl.h> 13 - 14 - #endif /* !_X86_64_FCNTL_H */
+2
include/asm-xtensa/fcntl.h
··· 53 53 pid_t l_pid; 54 54 }; 55 55 56 + #define HAVE_ARCH_STRUCT_FLOCK 57 + 56 58 #include <asm-generic/fcntl.h> 57 59 58 60 #endif /* _XTENSA_FCNTL_H */