diff options
author | Thomas Huth <thuth@linux.vnet.ibm.com> | 2011-06-29 13:18:28 +0200 |
---|---|---|
committer | Thomas Huth <thuth@linux.vnet.ibm.com> | 2011-10-12 08:43:12 +0200 |
commit | 2e2e4cae3728d7c4565cae90e687555a7df1af12 (patch) | |
tree | 39ccc9ef131065739b5a1343c53598bb0927dcf8 /lib/libnvram/nvram.h | |
parent | b94bde008b0d49ec4bfe933e110d0952d032ac28 (diff) | |
download | SLOF-2e2e4cae3728d7c4565cae90e687555a7df1af12.zip SLOF-2e2e4cae3728d7c4565cae90e687555a7df1af12.tar.gz SLOF-2e2e4cae3728d7c4565cae90e687555a7df1af12.tar.bz2 |
Move functions for byte-swapping into common header file.
The byte-swapping functions were scattered all over the source tree, now they
are merged into a new common header file called byteswap.h.
Signed-off-by: <thuth@linux.vnet.ibm.com>
Diffstat (limited to 'lib/libnvram/nvram.h')
-rw-r--r-- | lib/libnvram/nvram.h | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/lib/libnvram/nvram.h b/lib/libnvram/nvram.h index d15b85e..1324809 100644 --- a/lib/libnvram/nvram.h +++ b/lib/libnvram/nvram.h @@ -33,26 +33,6 @@ typedef struct { #define PARTITION_HEADER_SIZE 16 -/* FIXME this should be done complete and in a more prominent place */ -#define __LITTLE_ENDIAN 1234 -#define __BIG_ENDIAN 4321 -#ifdef __i386__ -#define __BYTE_ORDER __LITTLE_ENDIAN -#else -#define __BYTE_ORDER __BIG_ENDIAN -#endif -#if __BYTE_ORDER == __BIG_ENDIAN -#define cpu_to_be64(x) (x) -#define be64_to_cpu(x) (x) -#define cpu_to_be32(x) (x) -#define be32_to_cpu(x) (x) -#else -#include <byteswap.h> -#define cpu_to_be64(x) bswap_64(x) -#define be64_to_cpu(x) bswap_64(x) -#define cpu_to_be32(x) bswap_32(x) -#define be32_to_cpu(x) bswap_32(x) -#endif /* exported functions */ |