[Ocfs2-commits] smushran commits r3106 - in branches/ocfs2-1.2.9: . fs/ocfs2 kapi-compat/include
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Tue Nov 11 16:37:18 PST 2008
Author: smushran
Date: 2008-11-11 16:37:18 -0800 (Tue, 11 Nov 2008)
New Revision: 3106
Added:
branches/ocfs2-1.2.9/kapi-compat/include/be32_add_cpu.h
Modified:
branches/ocfs2-1.2.9/Makefile
branches/ocfs2-1.2.9/configure.in
branches/ocfs2-1.2.9/fs/ocfs2/endian.h
Log:
ocfs2: be32_add_cpu() moved to kapi-compat
be32_add_cpu() moved to kapi-compat to allow building with kernels
that already define this function.
Signed-off-by: jlbec
Modified: branches/ocfs2-1.2.9/Makefile
===================================================================
--- branches/ocfs2-1.2.9/Makefile 2008-11-12 00:36:34 UTC (rev 3105)
+++ branches/ocfs2-1.2.9/Makefile 2008-11-12 00:37:18 UTC (rev 3106)
@@ -21,7 +21,8 @@
kapi-compat/include/reboot.h \
kapi-compat/include/le16_add_cpu.h \
kapi-compat/include/le32_add_cpu.h \
- kapi-compat/include/le32_and_cpu.h
+ kapi-compat/include/le32_and_cpu.h \
+ kapi-compat/include/be32_add_cpu.h
PATCH_FILES = \
patches/export_generic_drop_inode.patch
Modified: branches/ocfs2-1.2.9/configure.in
===================================================================
--- branches/ocfs2-1.2.9/configure.in 2008-11-12 00:36:34 UTC (rev 3105)
+++ branches/ocfs2-1.2.9/configure.in 2008-11-12 00:37:18 UTC (rev 3106)
@@ -299,6 +299,11 @@
, le32_and_cpu_compat_header="le32_and_cpu.h", [^static inline void le32_and_cpu(])
KAPI_COMPAT_HEADERS="$KAPI_COMPAT_HEADERS $le32_and_cpu_compat_header"
+be32_add_cpu_compat_header=""
+OCFS2_CHECK_KERNEL([be32_add_cpu() in byteorder/generic.h], byteorder/generic.h,
+ , be32_add_cpu_compat_header="be32_add_cpu.h", [^static inline void be32_add_cpu(])
+KAPI_COMPAT_HEADERS="$KAPI_COMPAT_HEADERS $be32_add_cpu_compat_header"
+
# using -include has two advantages:
# the source doesn't need to know to include compat headers
# the compat header file names don't go through the search path
Modified: branches/ocfs2-1.2.9/fs/ocfs2/endian.h
===================================================================
--- branches/ocfs2-1.2.9/fs/ocfs2/endian.h 2008-11-12 00:36:34 UTC (rev 3105)
+++ branches/ocfs2-1.2.9/fs/ocfs2/endian.h 2008-11-12 00:37:18 UTC (rev 3106)
@@ -22,9 +22,4 @@
#ifndef OCFS2_ENDIAN_H
#define OCFS2_ENDIAN_H
-static inline void be32_add_cpu(__be32 *var, u32 val)
-{
- *var = cpu_to_be32(be32_to_cpu(*var) + val);
-}
-
#endif /* OCFS2_ENDIAN_H */
Added: branches/ocfs2-1.2.9/kapi-compat/include/be32_add_cpu.h
===================================================================
--- branches/ocfs2-1.2.9/kapi-compat/include/be32_add_cpu.h (rev 0)
+++ branches/ocfs2-1.2.9/kapi-compat/include/be32_add_cpu.h 2008-11-12 00:37:18 UTC (rev 3106)
@@ -0,0 +1,9 @@
+#ifndef BE32_ADD_CPU_H
+#define BE32_ADD_CPU_H
+
+static inline void be32_add_cpu(__be32 *var, u32 val)
+{
+ *var = cpu_to_be32(be32_to_cpu(*var) + val);
+}
+
+#endif
More information about the Ocfs2-commits
mailing list