]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
[PATCH] Clean up struct flock definitions
authorStephen Rothwell <sfr@canb.auug.org.au>
Tue, 6 Sep 2005 22:18:00 +0000 (15:18 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 7 Sep 2005 23:57:38 +0000 (16:57 -0700)
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>
21 files changed:
include/asm-alpha/fcntl.h
include/asm-arm/fcntl.h
include/asm-arm26/fcntl.h
include/asm-cris/fcntl.h
include/asm-frv/fcntl.h
include/asm-generic/fcntl.h
include/asm-h8300/fcntl.h
include/asm-i386/fcntl.h
include/asm-ia64/fcntl.h
include/asm-m32r/fcntl.h
include/asm-m68k/fcntl.h
include/asm-mips/fcntl.h
include/asm-parisc/fcntl.h
include/asm-ppc/fcntl.h
include/asm-s390/fcntl.h
include/asm-sh/fcntl.h
include/asm-sparc/fcntl.h
include/asm-sparc64/fcntl.h
include/asm-v850/fcntl.h
include/asm-x86_64/fcntl.h
include/asm-xtensa/fcntl.h

index e2aacbbe38bcc67e7e67d6e4608db7228fccbfa2..87f2cf459e266367be6f16f10c545f85d41e9bbc 100644 (file)
 
 #define F_INPROGRESS   64
 
-struct flock {
-       short l_type;
-       short l_whence;
-       __kernel_off_t l_start;
-       __kernel_off_t l_len;
-       __kernel_pid_t l_pid;
-};
-
 #include <asm-generic/fcntl.h>
 
 #endif
index 6337df23831f64f091de465855c1cec950736559..1816a6ac6f10cc1e3bab6c93a42c47e9e5bcaa39 100644 (file)
 #define F_SETLK64      13
 #define F_SETLKW64     14
 
-struct flock {
-       short l_type;
-       short l_whence;
-       off_t l_start;
-       off_t l_len;
-       pid_t l_pid;
-};
-
 struct flock64 {
        short  l_type;
        short  l_whence;
index 2f08302fa8c6ea5a6a62f556fa20f9b08381bef1..b88f8d08c60cc98de2aa9957ffe3e6832748cb31 100644 (file)
 #define F_SETLK64      13
 #define F_SETLKW64     14
 
-struct flock {
-       short l_type;
-       short l_whence;
-       off_t l_start;
-       off_t l_len;
-       pid_t l_pid;
-};
-
 struct flock64 {
        short  l_type;
        short  l_whence;
index e91b576985d2b734f759a2cb9e6217283fd048d4..f8e7d1307ebc28f6df06f7f301c87575e8bdf96e 100644 (file)
@@ -5,14 +5,6 @@
 #define F_SETLK64      13
 #define F_SETLKW64     14
 
-struct flock {
-       short l_type;
-       short l_whence;
-       off_t l_start;
-       off_t l_len;
-       pid_t l_pid;
-};
-
 struct flock64 {
        short  l_type;
        short  l_whence;
index e5523669b62e0dfa70d15dbbd8ef412e5b5bdea1..0b212d945adbb11b6225e8dd5c9c5c7f40224848 100644 (file)
@@ -5,14 +5,6 @@
 #define F_SETLK64      13
 #define F_SETLKW64     14
 
-struct flock {
-       short l_type;
-       short l_whence;
-       off_t l_start;
-       off_t l_len;
-       pid_t l_pid;
-};
-
 struct flock64 {
        short  l_type;
        short  l_whence;
index 1e66f923a252c98dd401bd70431ca4ab1321c455..b001d7fe03848e1560da0dd5a75951b4d9f61832 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef _ASM_GENERIC_FCNTL_H
 #define _ASM_GENERIC_FCNTL_H
 
+#include <linux/types.h>
+
 /* open/fcntl - O_SYNC is only implemented on blocks devices and on files
    located on an ext2 file system */
 #define O_ACCMODE      00000003
 
 #define F_LINUX_SPECIFIC_BASE  1024
 
+#ifndef HAVE_ARCH_STRUCT_FLOCK
+#ifndef __ARCH_FLOCK_PAD
+#define __ARCH_FLOCK_PAD
+#endif
+
+struct flock {
+       short   l_type;
+       short   l_whence;
+       off_t   l_start;
+       off_t   l_len;
+       pid_t   l_pid;
+       __ARCH_FLOCK_PAD
+};
+#endif
+
 #endif /* _ASM_GENERIC_FCNTL_H */
index 805aaa09c7174119ea7359f6992cf8f0177b27fa..8caeb05e84df54ba50b6b61688f2f4cc53cadc5e 100644 (file)
 #define F_SETLK64      13
 #define F_SETLKW64     14
 
-struct flock {
-       short l_type;
-       short l_whence;
-       off_t l_start;
-       off_t l_len;
-       pid_t l_pid;
-};
-
 struct flock64 {
        short  l_type;
        short  l_whence;
index 1d06913c3bfd75b390ff978ae2e8d1588f2a99b7..01f17d29d2880f10073a651f40554cb18522b15f 100644 (file)
@@ -5,14 +5,6 @@
 #define F_SETLK64      13
 #define F_SETLKW64     14
 
-struct flock {
-       short l_type;
-       short l_whence;
-       off_t l_start;
-       off_t l_len;
-       pid_t l_pid;
-};
-
 struct flock64 {
        short  l_type;
        short  l_whence;
index a9d04aca7903726af7db7b653d2f8096767689f4..1dd275dc8f653a0b6be00f469998bfa8711044a0 100644 (file)
@@ -5,14 +5,6 @@
  *     David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co.
  */
 
-struct flock {
-       short l_type;
-       short l_whence;
-       off_t l_start;
-       off_t l_len;
-       pid_t l_pid;
-};
-
 #define force_o_largefile()    \
                (personality(current->personality) != PER_LINUX32)
 
index ff3a0849bb85b85782f41ff918cfd2c43022b3f1..90f71735fa9a2c26a632bc599ef3f131e21a3f5b 100644 (file)
@@ -1,22 +1,10 @@
 #ifndef _ASM_M32R_FCNTL_H
 #define _ASM_M32R_FCNTL_H
 
-/* $Id$ */
-
-/* orig : i386 2.4.18 */
-
 #define F_GETLK64      12      /*  using 'struct flock64' */
 #define F_SETLK64      13
 #define F_SETLKW64     14
 
-struct flock {
-       short l_type;
-       short l_whence;
-       off_t l_start;
-       off_t l_len;
-       pid_t l_pid;
-};
-
 struct flock64 {
        short  l_type;
        short  l_whence;
index 7dd8062c8ce6a27b7dca38abcb8766384f27b258..d3b24e3fbac03d4c770b5185a7bb09fe4e18c8f7 100644 (file)
 #define F_SETLK64      13
 #define F_SETLKW64     14
 
-struct flock {
-       short l_type;
-       short l_whence;
-       off_t l_start;
-       off_t l_len;
-       pid_t l_pid;
-};
-
 struct flock64 {
        short  l_type;
        short  l_whence;
index be971d6ac9b5a7176db8bd23630ee7bf8feddfaf..fb824bf0929660e5791260e7ced2912275e931da 100644 (file)
@@ -50,7 +50,7 @@ struct flock {
        long    l_sysid;
        __kernel_pid_t l_pid;
        long    pad[4];
-} flock_t;
+};
 
 typedef struct flock64 {
        short   l_type;
@@ -60,22 +60,13 @@ typedef struct flock64 {
        pid_t   l_pid;
 } flock64_t;
 
-#else /* 64-bit definitions */
 
-typedef struct flock {
-       short   l_type;
-       short   l_whence;
-       __kernel_off_t l_start;
-       __kernel_off_t l_len;
-       __kernel_pid_t l_pid;
-} flock_t;
-
-#ifdef __KERNEL__
-#define flock64                flock
-#endif
+#define HAVE_ARCH_STRUCT_FLOCK
 
 #endif
 
 #include <asm-generic/fcntl.h>
 
+typedef struct flock flock_t;
+
 #endif /* _ASM_FCNTL_H */
index 59a54fff7c6362eefd257080119c1a69ac1f5750..eadda003c201b31502c54ac523b31718aea809c4 100644 (file)
 #define F_WRLCK                02
 #define F_UNLCK                03
 
-struct flock {
-       short l_type;
-       short l_whence;
-       off_t l_start;
-       off_t l_len;
-       pid_t l_pid;
-};
-
 struct flock64 {
        short l_type;
        short l_whence;
index 8549c0332c98b93a2353c22c174e55e832aba971..4480f21bfdea14a0571ebebc885ba47692bef695 100644 (file)
 #define F_GETLK64      12      /*  using 'struct flock64' */
 #define F_SETLK64      13
 #define F_SETLKW64     14
-#endif
-
-struct flock {
-       short l_type;
-       short l_whence;
-       off_t l_start;
-       off_t l_len;
-       pid_t l_pid;
-};
 
-#ifndef __powerpc64__
 struct flock64 {
        short  l_type;
        short  l_whence;
index 2974433e8ea4052ab45a1b9cbdd52f9c6dc54bdf..3a66fba09ee90569b58bcacb45ac0e30ee36a63d 100644 (file)
 #define F_GETLK64      12      /*  using 'struct flock64' */
 #define F_SETLK64      13
 #define F_SETLKW64     14
-#endif /* ! __s390x__ */
 
-struct flock {
-       short l_type;
-       short l_whence;
-       off_t l_start;
-       off_t l_len;
-       pid_t l_pid;
-};
-
-#ifndef __s390x__
 struct flock64 {
        short  l_type;
        short  l_whence;
index 1db7b74450b5f63e2954b944067223d7faaaeab2..c481bab8ba17a89e341fd975f95299a7917a145f 100644 (file)
@@ -5,14 +5,6 @@
 #define F_SETLK64      13
 #define F_SETLKW64     14
 
-struct flock {
-       short l_type;
-       short l_whence;
-       off_t l_start;
-       off_t l_len;
-       pid_t l_pid;
-};
-
 struct flock64 {
        short  l_type;
        short  l_whence;
index 61334bff18c4098c69d33710f50bd3fdadb86455..634557374e955615004a3adce28ce73f0c8e49b7 100644 (file)
 #define F_WRLCK                2
 #define F_UNLCK                3
 
-struct flock {
-       short l_type;
-       short l_whence;
-       off_t l_start;
-       off_t l_len;
-       pid_t l_pid;
-       short __unused;
-};
-
 struct flock64 {
        short l_type;
        short l_whence;
@@ -50,6 +41,8 @@ struct flock64 {
        short __unused;
 };
 
+#define __ARCH_FLOCK_PAD       short __unused;
+
 #include <asm-generic/fcntl.h>
 
 #endif
index 3db10e076eec252a169f27319226eebba6a933bd..b2aecf0054bd2167b990ddc2da53dec57458aca9 100644 (file)
 #define F_WRLCK                2
 #define F_UNLCK                3
 
-struct flock {
-       short l_type;
-       short l_whence;
-       off_t l_start;
-       off_t l_len;
-       pid_t l_pid;
-       short __unused;
-};
+#define __ARCH_FLOCK_PAD       short __unused;
 
 #include <asm-generic/fcntl.h>
 
index 70015131e4b26866d9d89f39d388e219240612c9..0fd47f0c6a8afa073174f5179aabde35f54a6012 100644 (file)
 #define F_SETLK64      13
 #define F_SETLKW64     14
 
-struct flock {
-       short l_type;
-       short l_whence;
-       off_t l_start;
-       off_t l_len;
-       pid_t l_pid;
-};
-
 struct flock64 {
        short  l_type;
        short  l_whence;
index c7b09ea97d3601c8d01aed4bdcb414acef79adcd..46ab12db57397dfc44a7aa84f9c10ac5e97509d9 100644 (file)
@@ -1,14 +1 @@
-#ifndef _X86_64_FCNTL_H
-#define _X86_64_FCNTL_H
-
-struct flock {
-       short  l_type;
-       short  l_whence;
-       off_t l_start;
-       off_t l_len;
-       pid_t  l_pid;
-};
-
 #include <asm-generic/fcntl.h>
-
-#endif /* !_X86_64_FCNTL_H */
index 06f0dc9cc525c99168de32fc94d904bda1ccc120..fdae0e170585b1a4777024d4125230e9565df159 100644 (file)
@@ -53,6 +53,8 @@ struct flock64 {
        pid_t  l_pid;
 };
 
+#define HAVE_ARCH_STRUCT_FLOCK
+
 #include <asm-generic/fcntl.h>
 
 #endif /* _XTENSA_FCNTL_H */