summaryrefslogtreecommitdiffstats
path: root/include/cramfs
diff options
context:
space:
mode:
authorwdenk <wdenk>2004-06-09 17:45:32 +0000
committerwdenk <wdenk>2004-06-09 17:45:32 +0000
commit36c728774edcfca54766f6828173fe24d3d8aa0b (patch)
treea431216abba77d12434c0a01b858d90e71d1075a /include/cramfs
parent4c0d4c3b782ef278f5843eb2533e03b9c4c16e21 (diff)
downloadbarebox-36c728774edcfca54766f6828173fe24d3d8aa0b.tar.gz
barebox-36c728774edcfca54766f6828173fe24d3d8aa0b.tar.xz
* Patch by Mark Jonas, 08 June 2004:
- Make MPC5200 boards evaluate the SVR to print processor name and version in checkcpu() (cpu/mpc5xxx/cpu.c). * Patch by Kai-Uwe Bloem, 06 May 2004: Fix endianess problem in cramfs code
Diffstat (limited to 'include/cramfs')
-rw-r--r--include/cramfs/cramfs_fs.h36
1 files changed, 0 insertions, 36 deletions
diff --git a/include/cramfs/cramfs_fs.h b/include/cramfs/cramfs_fs.h
index 233370988b..e0c14f04af 100644
--- a/include/cramfs/cramfs_fs.h
+++ b/include/cramfs/cramfs_fs.h
@@ -84,21 +84,6 @@ struct cramfs_super {
| CRAMFS_FLAG_WRONG_SIGNATURE \
| CRAMFS_FLAG_SHIFTED_ROOT_OFFSET )
-/*
- * Since cramfs is little-endian, provide macros to swab the bitfields.
- */
-
-#ifndef __BYTE_ORDER
-#if defined(__LITTLE_ENDIAN) && !defined(__BIG_ENDIAN)
-#define __BYTE_ORDER __LITTLE_ENDIAN
-#elif defined(__BIG_ENDIAN) && !defined(__LITTLE_ENDIAN)
-#define __BYTE_ORDER __BIG_ENDIAN
-#else
-#error "unable to define __BYTE_ORDER"
-#endif
-#endif /* not __BYTE_ORDER */
-
-#if __BYTE_ORDER == __LITTLE_ENDIAN
#define CRAMFS_16(x) (x)
#define CRAMFS_24(x) (x)
#define CRAMFS_32(x) (x)
@@ -106,27 +91,6 @@ struct cramfs_super {
#define CRAMFS_GET_OFFSET(x) ((x)->offset)
#define CRAMFS_SET_OFFSET(x,y) ((x)->offset = (y))
#define CRAMFS_SET_NAMELEN(x,y) ((x)->namelen = (y))
-#elif __BYTE_ORDER == __BIG_ENDIAN
-#ifdef __KERNEL__
-#define CRAMFS_16(x) swab16(x)
-#define CRAMFS_24(x) ((swab32(x)) >> 8)
-#define CRAMFS_32(x) swab32(x)
-#else /* not __KERNEL__ */
-#define CRAMFS_16(x) bswap_16(x)
-#define CRAMFS_24(x) ((bswap_32(x)) >> 8)
-#define CRAMFS_32(x) bswap_32(x)
-#endif /* not __KERNEL__ */
-#define CRAMFS_GET_NAMELEN(x) (((u8*)(x))[8] & 0x3f)
-#define CRAMFS_GET_OFFSET(x) ((CRAMFS_24(((u32*)(x))[2] & 0xffffff) << 2) |\
- ((((u32*)(x))[2] & 0xc0000000) >> 30))
-#define CRAMFS_SET_NAMELEN(x,y) (((u8*)(x))[8] = (((0x3f & (y))) | \
- (0xc0 & ((u8*)(x))[8])))
-#define CRAMFS_SET_OFFSET(x,y) (((u32*)(x))[2] = (((y) & 3) << 30) | \
- CRAMFS_24((((y) & 0x03ffffff) >> 2)) | \
- (((u32)(((u8*)(x))[8] & 0x3f)) << 24))
-#else
-#error "__BYTE_ORDER must be __LITTLE_ENDIAN or __BIG_ENDIAN"
-#endif
/* Uncompression interfaces to the underlying zlib */
int cramfs_uncompress_block(void *dst, void *src, int srclen);