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

rpms/device-mapper-multipath/devel kpartx_endian.patch,NONE,1.1



Update of /cvs/dist/rpms/device-mapper-multipath/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv19195

Added Files:
	kpartx_endian.patch 
Log Message:
Incorporate numerous upstream fixes.
Update init script to distribution standards.


kpartx_endian.patch:
 gpt.c |   15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletion(-)

--- NEW FILE kpartx_endian.patch ---
diff -ru multipath-tools-0.4.4-pre8/kpartx/gpt.c multipath-tools-0.4.4-pre8-new1/kpartx/gpt.c
--- multipath-tools-0.4.4-pre8/kpartx/gpt.c	2005-01-23 22:48:05.000000000 +0000
+++ multipath-tools-0.4.4-pre8-new1/kpartx/gpt.c	2005-04-05 17:21:04.000000000 +0100
@@ -34,9 +34,22 @@
 #include <fcntl.h>
 #include <unistd.h>
 #include <errno.h>
-#include <asm/byteorder.h>
+#include <endian.h>
+#include <byteswap.h>
 #include "crc32.h"
 
+#if BYTE_ORDER == LITTLE_ENDIAN
+#  define __le16_to_cpu(x) (x)
+#  define __le32_to_cpu(x) (x)
+#  define __le64_to_cpu(x) (x)
+#  define __cpu_to_le32(x) (x)
+#elif BYTE_ORDER == BIG_ENDIAN
+#  define __le16_to_cpu(x) bswap_16(x)
+#  define __le32_to_cpu(x) bswap_32(x)
+#  define __le64_to_cpu(x) bswap_64(x)
+#  define __cpu_to_le32(x) bswap_32(x)
+#endif
+
 #define BLKGETLASTSECT  _IO(0x12,108)   /* get last sector of block device */
 #define BLKGETSIZE _IO(0x12,96)	        /* return device size */
 #define BLKSSZGET  _IO(0x12,104)	/* get block device sector size */


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