diff options
author | Felix Fietkau <nbd@openwrt.org> | 2008-08-28 00:15:22 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2008-08-28 00:15:22 +0000 |
commit | 4fde06626fae274d22a15475b5f74916002ca92a (patch) | |
tree | abe732b548657bc8e9c3a5693caaeaf5e0253f61 | |
parent | 2c1edb7dd02483be9f6bf9e2e229f6605ded3304 (diff) | |
download | upstream-4fde06626fae274d22a15475b5f74916002ca92a.tar.gz upstream-4fde06626fae274d22a15475b5f74916002ca92a.tar.bz2 upstream-4fde06626fae274d22a15475b5f74916002ca92a.zip |
mtd: add jffs2 cleanmarker for big endian systems
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@12418 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r-- | package/mtd/src/jffs2.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/package/mtd/src/jffs2.c b/package/mtd/src/jffs2.c index 3b47d4158f..d1c6fb66fb 100644 --- a/package/mtd/src/jffs2.c +++ b/package/mtd/src/jffs2.c @@ -7,13 +7,18 @@ #include <string.h> #include <dirent.h> #include <unistd.h> +#include <endian.h> #include "jffs2.h" #include "crc32.h" #include "mtd.h" #define PAD(x) (((x)+3)&~3) -#define CLEANMARKER "\x85\x19\x03\x20\x0c\x00\x00\x00\xb1\xb0\x1e\xe4" +#if BYTE_ORDER == BIG_ENDIAN +# define CLEANMARKER "\x19\x85\x20\x03\x00\x00\x00\x0c\xf0\x60\xdc\x98" +#else +# define CLEANMARKER "\x85\x19\x03\x20\x0c\x00\x00\x00\xb1\xb0\x1e\xe4" +#endif static int last_ino = 0; static int last_version = 0; |