[PATCH 08/10] xfsprogs: move __be*/__le* types and __arch_pack to xfs_arch.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



These are defines and typedefs only needed for the XFS on disk format,
so there is no need to have the available for every user of xfs.h.

Signed-off-by: Christoph Hellwig <hch@xxxxxx>
---
 include/platform_defs.h.in | 23 -----------------------
 include/xfs_arch.h         | 23 +++++++++++++++++++++++
 2 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/include/platform_defs.h.in b/include/platform_defs.h.in
index 529c0a6..81741c4 100644
--- a/include/platform_defs.h.in
+++ b/include/platform_defs.h.in
@@ -50,22 +50,6 @@ typedef unsigned long long int	__u64;
 typedef signed long long int	__s64;
 #endif
 
-#ifdef __CHECKER__
-#define __bitwise		__attribute__((bitwise))
-#define __force			__attribute__((force))
-#else
-#define __bitwise
-#define __force
-#endif
-
-typedef __u16	__bitwise	__le16;
-typedef __u32	__bitwise	__le32;
-typedef __u64	__bitwise	__le64;
-
-typedef __u16	__bitwise	__be16;
-typedef __u32	__bitwise	__be32;
-typedef __u64	__bitwise	__be64;
-
 typedef struct filldir		filldir_t;
 
 #if defined(__linux__)
@@ -130,13 +114,6 @@ typedef unsigned short umode_t;
 					| (minor&IRIX_DEV_MAXMIN)))
 #define IRIX_DEV_TO_KDEVT(dev)	makedev(IRIX_DEV_MAJOR(dev),IRIX_DEV_MINOR(dev))
 
-/* ARM old ABI has some weird alignment/padding */
-#if defined(__arm__) && !defined(__ARM_EABI__)
-#define __arch_pack __attribute__((packed))
-#else
-#define __arch_pack
-#endif
-
 #ifndef min
 #define min(a,b)	(((a)<(b))?(a):(b))
 #define max(a,b)	(((a)>(b))?(a):(b))
diff --git a/include/xfs_arch.h b/include/xfs_arch.h
index 310a17e..87650f1 100644
--- a/include/xfs_arch.h
+++ b/include/xfs_arch.h
@@ -24,6 +24,22 @@
 #undef XFS_NATIVE_HOST
 #endif
 
+#ifdef __CHECKER__
+#define __bitwise		__attribute__((bitwise))
+#define __force			__attribute__((force))
+#else
+#define __bitwise
+#define __force
+#endif
+
+typedef __u16	__bitwise	__le16;
+typedef __u32	__bitwise	__le32;
+typedef __u64	__bitwise	__le64;
+
+typedef __u16	__bitwise	__be16;
+typedef __u32	__bitwise	__be32;
+typedef __u64	__bitwise	__be64;
+
 /*
  * Casts are necessary for constants, because we never know how for sure
  * how U/UL/ULL map to __u16, __u32, __u64. At least not in a portable way.
@@ -262,4 +278,11 @@ static inline void put_unaligned_be64(__uint64_t val, void *p)
 	put_unaligned_be32(val, p + 4);
 }
 
+/* ARM old ABI has some weird alignment/padding */
+#if defined(__arm__) && !defined(__ARM_EABI__)
+#define __arch_pack __attribute__((packed))
+#else
+#define __arch_pack
+#endif
+
 #endif	/* __XFS_ARCH_H__ */
-- 
1.9.1

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs



[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux