summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2005-09-06 15:18:01 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-07 16:57:38 -0700
commit8d286aa5eaf951bf53d4a0f64576d4b377c435ba (patch)
treec2304e6fc3af25b6a09f974fa09db753f6bd8cea
parent5ac353f9baf7169298ebb7de86b2d697b25bca44 (diff)
downloadblackbird-obmc-linux-8d286aa5eaf951bf53d4a0f64576d4b377c435ba.tar.gz
blackbird-obmc-linux-8d286aa5eaf951bf53d4a0f64576d4b377c435ba.zip
[PATCH] Clean up struct flock64 definitions
This patch gathers all the struct flock64 definitions (and the operations), puts them under !CONFIG_64BIT and cleans up the arch files. 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>
-rw-r--r--include/asm-arm/fcntl.h12
-rw-r--r--include/asm-arm26/fcntl.h12
-rw-r--r--include/asm-cris/fcntl.h17
-rw-r--r--include/asm-frv/fcntl.h18
-rw-r--r--include/asm-generic/fcntl.h25
-rw-r--r--include/asm-h8300/fcntl.h12
-rw-r--r--include/asm-i386/fcntl.h17
-rw-r--r--include/asm-m32r/fcntl.h17
-rw-r--r--include/asm-m68k/fcntl.h12
-rw-r--r--include/asm-mips/fcntl.h12
-rw-r--r--include/asm-parisc/fcntl.h8
-rw-r--r--include/asm-ppc/fcntl.h14
-rw-r--r--include/asm-s390/fcntl.h26
-rw-r--r--include/asm-sh/fcntl.h18
-rw-r--r--include/asm-sh64/fcntl.h6
-rw-r--r--include/asm-sparc/fcntl.h14
-rw-r--r--include/asm-v850/fcntl.h12
-rw-r--r--include/asm-xtensa/fcntl.h1
18 files changed, 30 insertions, 223 deletions
diff --git a/include/asm-arm/fcntl.h b/include/asm-arm/fcntl.h
index 1816a6ac6f10..a80b6607b2ef 100644
--- a/include/asm-arm/fcntl.h
+++ b/include/asm-arm/fcntl.h
@@ -6,18 +6,6 @@
#define O_DIRECT 0200000 /* direct disk access hint - currently ignored */
#define O_LARGEFILE 0400000
-#define F_GETLK64 12 /* using 'struct flock64' */
-#define F_SETLK64 13
-#define F_SETLKW64 14
-
-struct flock64 {
- short l_type;
- short l_whence;
- loff_t l_start;
- loff_t l_len;
- pid_t l_pid;
-};
-
#include <asm-generic/fcntl.h>
#endif
diff --git a/include/asm-arm26/fcntl.h b/include/asm-arm26/fcntl.h
index b88f8d08c60c..d85995e7459e 100644
--- a/include/asm-arm26/fcntl.h
+++ b/include/asm-arm26/fcntl.h
@@ -8,18 +8,6 @@
#define O_DIRECT 0200000 /* direct disk access hint - currently ignored */
#define O_LARGEFILE 0400000
-#define F_GETLK64 12 /* using 'struct flock64' */
-#define F_SETLK64 13
-#define F_SETLKW64 14
-
-struct flock64 {
- short l_type;
- short l_whence;
- loff_t l_start;
- loff_t l_len;
- pid_t l_pid;
-};
-
#include <asm-generic/fcntl.h>
#endif
diff --git a/include/asm-cris/fcntl.h b/include/asm-cris/fcntl.h
index f8e7d1307ebc..46ab12db5739 100644
--- a/include/asm-cris/fcntl.h
+++ b/include/asm-cris/fcntl.h
@@ -1,18 +1 @@
-#ifndef _CRIS_FCNTL_H
-#define _CRIS_FCNTL_H
-
-#define F_GETLK64 12 /* using 'struct flock64' */
-#define F_SETLK64 13
-#define F_SETLKW64 14
-
-struct flock64 {
- short l_type;
- short l_whence;
- loff_t l_start;
- loff_t l_len;
- pid_t l_pid;
-};
-
#include <asm-generic/fcntl.h>
-
-#endif
diff --git a/include/asm-frv/fcntl.h b/include/asm-frv/fcntl.h
index 0b212d945adb..46ab12db5739 100644
--- a/include/asm-frv/fcntl.h
+++ b/include/asm-frv/fcntl.h
@@ -1,19 +1 @@
-#ifndef _ASM_FCNTL_H
-#define _ASM_FCNTL_H
-
-#define F_GETLK64 12 /* using 'struct flock64' */
-#define F_SETLK64 13
-#define F_SETLKW64 14
-
-struct flock64 {
- short l_type;
- short l_whence;
- loff_t l_start;
- loff_t l_len;
- pid_t l_pid;
-};
-
#include <asm-generic/fcntl.h>
-
-#endif /* _ASM_FCNTL_H */
-
diff --git a/include/asm-generic/fcntl.h b/include/asm-generic/fcntl.h
index b001d7fe0384..b663520dcdc4 100644
--- a/include/asm-generic/fcntl.h
+++ b/include/asm-generic/fcntl.h
@@ -1,6 +1,7 @@
#ifndef _ASM_GENERIC_FCNTL_H
#define _ASM_GENERIC_FCNTL_H
+#include <linux/config.h>
#include <linux/types.h>
/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
@@ -121,4 +122,28 @@ struct flock {
};
#endif
+#ifndef CONFIG_64BIT
+
+#ifndef F_GETLK64
+#define F_GETLK64 12 /* using 'struct flock64' */
+#define F_SETLK64 13
+#define F_SETLKW64 14
+#endif
+
+#ifndef HAVE_ARCH_STRUCT_FLOCK64
+#ifndef __ARCH_FLOCK64_PAD
+#define __ARCH_FLOCK64_PAD
+#endif
+
+struct flock64 {
+ short l_type;
+ short l_whence;
+ loff_t l_start;
+ loff_t l_len;
+ pid_t l_pid;
+ __ARCH_FLOCK64_PAD
+};
+#endif
+#endif /* !CONFIG_64BIT */
+
#endif /* _ASM_GENERIC_FCNTL_H */
diff --git a/include/asm-h8300/fcntl.h b/include/asm-h8300/fcntl.h
index 8caeb05e84df..1952cb2e3b06 100644
--- a/include/asm-h8300/fcntl.h
+++ b/include/asm-h8300/fcntl.h
@@ -6,18 +6,6 @@
#define O_DIRECT 0200000 /* direct disk access hint - currently ignored */
#define O_LARGEFILE 0400000
-#define F_GETLK64 12 /* using 'struct flock64' */
-#define F_SETLK64 13
-#define F_SETLKW64 14
-
-struct flock64 {
- short l_type;
- short l_whence;
- loff_t l_start;
- loff_t l_len;
- pid_t l_pid;
-};
-
#include <asm-generic/fcntl.h>
#endif /* _H8300_FCNTL_H */
diff --git a/include/asm-i386/fcntl.h b/include/asm-i386/fcntl.h
index 01f17d29d288..46ab12db5739 100644
--- a/include/asm-i386/fcntl.h
+++ b/include/asm-i386/fcntl.h
@@ -1,18 +1 @@
-#ifndef _I386_FCNTL_H
-#define _I386_FCNTL_H
-
-#define F_GETLK64 12 /* using 'struct flock64' */
-#define F_SETLK64 13
-#define F_SETLKW64 14
-
-struct flock64 {
- short l_type;
- short l_whence;
- loff_t l_start;
- loff_t l_len;
- pid_t l_pid;
-};
-
#include <asm-generic/fcntl.h>
-
-#endif
diff --git a/include/asm-m32r/fcntl.h b/include/asm-m32r/fcntl.h
index 90f71735fa9a..46ab12db5739 100644
--- a/include/asm-m32r/fcntl.h
+++ b/include/asm-m32r/fcntl.h
@@ -1,18 +1 @@
-#ifndef _ASM_M32R_FCNTL_H
-#define _ASM_M32R_FCNTL_H
-
-#define F_GETLK64 12 /* using 'struct flock64' */
-#define F_SETLK64 13
-#define F_SETLKW64 14
-
-struct flock64 {
- short l_type;
- short l_whence;
- loff_t l_start;
- loff_t l_len;
- pid_t l_pid;
-};
-
#include <asm-generic/fcntl.h>
-
-#endif /* _ASM_M32R_FCNTL_H */
diff --git a/include/asm-m68k/fcntl.h b/include/asm-m68k/fcntl.h
index d3b24e3fbac0..1c369b20dc45 100644
--- a/include/asm-m68k/fcntl.h
+++ b/include/asm-m68k/fcntl.h
@@ -6,18 +6,6 @@
#define O_DIRECT 0200000 /* direct disk access hint - currently ignored */
#define O_LARGEFILE 0400000
-#define F_GETLK64 12 /* using 'struct flock64' */
-#define F_SETLK64 13
-#define F_SETLKW64 14
-
-struct flock64 {
- short l_type;
- short l_whence;
- loff_t l_start;
- loff_t l_len;
- pid_t l_pid;
-};
-
#include <asm-generic/fcntl.h>
#endif /* _M68K_FCNTL_H */
diff --git a/include/asm-mips/fcntl.h b/include/asm-mips/fcntl.h
index fb824bf09296..06c5d13faf66 100644
--- a/include/asm-mips/fcntl.h
+++ b/include/asm-mips/fcntl.h
@@ -52,15 +52,6 @@ struct flock {
long pad[4];
};
-typedef struct flock64 {
- short l_type;
- short l_whence;
- loff_t l_start;
- loff_t l_len;
- pid_t l_pid;
-} flock64_t;
-
-
#define HAVE_ARCH_STRUCT_FLOCK
#endif
@@ -68,5 +59,8 @@ typedef struct flock64 {
#include <asm-generic/fcntl.h>
typedef struct flock flock_t;
+#ifndef __mips64
+typedef struct flock64 flock64_t;
+#endif
#endif /* _ASM_FCNTL_H */
diff --git a/include/asm-parisc/fcntl.h b/include/asm-parisc/fcntl.h
index eadda003c201..317851fa78f3 100644
--- a/include/asm-parisc/fcntl.h
+++ b/include/asm-parisc/fcntl.h
@@ -33,14 +33,6 @@
#define F_WRLCK 02
#define F_UNLCK 03
-struct flock64 {
- short l_type;
- short l_whence;
- loff_t l_start;
- loff_t l_len;
- pid_t l_pid;
-};
-
#include <asm-generic/fcntl.h>
#endif
diff --git a/include/asm-ppc/fcntl.h b/include/asm-ppc/fcntl.h
index 4480f21bfdea..7ef37443cc5c 100644
--- a/include/asm-ppc/fcntl.h
+++ b/include/asm-ppc/fcntl.h
@@ -6,20 +6,6 @@
#define O_LARGEFILE 0200000
#define O_DIRECT 0400000 /* direct disk access hint */
-#ifndef __powerpc64__
-#define F_GETLK64 12 /* using 'struct flock64' */
-#define F_SETLK64 13
-#define F_SETLKW64 14
-
-struct flock64 {
- short l_type;
- short l_whence;
- loff_t l_start;
- loff_t l_len;
- pid_t l_pid;
-};
-#endif
-
#include <asm-generic/fcntl.h>
#endif /* _PPC_FCNTL_H */
diff --git a/include/asm-s390/fcntl.h b/include/asm-s390/fcntl.h
index 3a66fba09ee9..46ab12db5739 100644
--- a/include/asm-s390/fcntl.h
+++ b/include/asm-s390/fcntl.h
@@ -1,27 +1 @@
-/*
- * include/asm-s390/fcntl.h
- *
- * S390 version
- *
- * Derived from "include/asm-i386/fcntl.h"
- */
-#ifndef _S390_FCNTL_H
-#define _S390_FCNTL_H
-
-#ifndef __s390x__
-#define F_GETLK64 12 /* using 'struct flock64' */
-#define F_SETLK64 13
-#define F_SETLKW64 14
-
-struct flock64 {
- short l_type;
- short l_whence;
- loff_t l_start;
- loff_t l_len;
- pid_t l_pid;
-};
-#endif
-
#include <asm-generic/fcntl.h>
-
-#endif
diff --git a/include/asm-sh/fcntl.h b/include/asm-sh/fcntl.h
index c481bab8ba17..46ab12db5739 100644
--- a/include/asm-sh/fcntl.h
+++ b/include/asm-sh/fcntl.h
@@ -1,19 +1 @@
-#ifndef __ASM_SH_FCNTL_H
-#define __ASM_SH_FCNTL_H
-
-#define F_GETLK64 12 /* using 'struct flock64' */
-#define F_SETLK64 13
-#define F_SETLKW64 14
-
-struct flock64 {
- short l_type;
- short l_whence;
- loff_t l_start;
- loff_t l_len;
- pid_t l_pid;
-};
-
#include <asm-generic/fcntl.h>
-
-#endif /* __ASM_SH_FCNTL_H */
-
diff --git a/include/asm-sh64/fcntl.h b/include/asm-sh64/fcntl.h
index ffcc36c64fa5..744dd79b9d5d 100644
--- a/include/asm-sh64/fcntl.h
+++ b/include/asm-sh64/fcntl.h
@@ -1,7 +1 @@
-#ifndef __ASM_SH64_FCNTL_H
-#define __ASM_SH64_FCNTL_H
-
#include <asm-sh/fcntl.h>
-
-#endif /* __ASM_SH64_FCNTL_H */
-
diff --git a/include/asm-sparc/fcntl.h b/include/asm-sparc/fcntl.h
index 634557374e95..5db60b5ae7b0 100644
--- a/include/asm-sparc/fcntl.h
+++ b/include/asm-sparc/fcntl.h
@@ -23,25 +23,13 @@
#define F_SETLK 8
#define F_SETLKW 9
-#define F_GETLK64 12 /* using 'struct flock64' */
-#define F_SETLK64 13
-#define F_SETLKW64 14
-
/* for posix fcntl() and lockf() */
#define F_RDLCK 1
#define F_WRLCK 2
#define F_UNLCK 3
-struct flock64 {
- short l_type;
- short l_whence;
- loff_t l_start;
- loff_t l_len;
- pid_t l_pid;
- short __unused;
-};
-
#define __ARCH_FLOCK_PAD short __unused;
+#define __ARCH_FLOCK64_PAD short __unused;
#include <asm-generic/fcntl.h>
diff --git a/include/asm-v850/fcntl.h b/include/asm-v850/fcntl.h
index 0fd47f0c6a8a..3af4d56776dd 100644
--- a/include/asm-v850/fcntl.h
+++ b/include/asm-v850/fcntl.h
@@ -6,18 +6,6 @@
#define O_DIRECT 0200000 /* direct disk access hint - currently ignored */
#define O_LARGEFILE 0400000
-#define F_GETLK64 12 /* using 'struct flock64' */
-#define F_SETLK64 13
-#define F_SETLKW64 14
-
-struct flock64 {
- short l_type;
- short l_whence;
- loff_t l_start;
- loff_t l_len;
- pid_t l_pid;
-};
-
#include <asm-generic/fcntl.h>
#endif /* __V850_FCNTL_H__ */
diff --git a/include/asm-xtensa/fcntl.h b/include/asm-xtensa/fcntl.h
index fdae0e170585..ec066ae96caf 100644
--- a/include/asm-xtensa/fcntl.h
+++ b/include/asm-xtensa/fcntl.h
@@ -54,6 +54,7 @@ struct flock64 {
};
#define HAVE_ARCH_STRUCT_FLOCK
+#define HAVE_ARCH_STRUCT_FLOCK64
#include <asm-generic/fcntl.h>
OpenPOWER on IntegriCloud