aboutsummaryrefslogtreecommitdiffstats
path: root/package/mtd/src/jffs2.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2008-08-28 00:15:22 +0000
committerFelix Fietkau <nbd@openwrt.org>2008-08-28 00:15:22 +0000
commit4ac7d33b7a3219c6a494de4d5006a2ad83234c01 (patch)
treef3dce4787295f32b6a4677c2b8ffe6aed1f6e4ca /package/mtd/src/jffs2.c
parent6488abc11c01177233e631118dbfa67d71d435f6 (diff)
downloadupstream-4ac7d33b7a3219c6a494de4d5006a2ad83234c01.tar.gz
upstream-4ac7d33b7a3219c6a494de4d5006a2ad83234c01.tar.bz2
upstream-4ac7d33b7a3219c6a494de4d5006a2ad83234c01.zip
mtd: add jffs2 cleanmarker for big endian systems
SVN-Revision: 12418
Diffstat (limited to 'package/mtd/src/jffs2.c')
-rw-r--r--package/mtd/src/jffs2.c7
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;