summaryrefslogtreecommitdiff
path: root/e2fsprogs/e2fsck.c
diff options
context:
space:
mode:
authorRob Landley2006-01-23 21:38:06 +0000
committerRob Landley2006-01-23 21:38:06 +0000
commit391a904f46d96430c8462bf077708b7179f4810d (patch)
tree5bdb4d58c9fb7bad6096a7e889caaeac0da11e96 /e2fsprogs/e2fsck.c
parent6130b9b16027d09cacff9da44f3cd6efb57b9c54 (diff)
downloadbusybox-391a904f46d96430c8462bf077708b7179f4810d.zip
busybox-391a904f46d96430c8462bf077708b7179f4810d.tar.gz
Ken McGuire's patch to make mke2fs and e2fsck work on big endian systems like
PPC, with an obligatory couple of swipes from me.
Diffstat (limited to 'e2fsprogs/e2fsck.c')
-rw-r--r--e2fsprogs/e2fsck.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/e2fsprogs/e2fsck.c b/e2fsprogs/e2fsck.c
index 8b96b50..94ba1ee 100644
--- a/e2fsprogs/e2fsck.c
+++ b/e2fsprogs/e2fsck.c
@@ -15674,9 +15674,16 @@ restart:
if (ctx->flags & E2F_FLAG_SIGNAL_MASK)
fatal_error(ctx, 0);
#ifdef ENABLE_SWAPFS
+
+#ifdef WORDS_BIGENDIAN
+#define NATIVE_FLAG EXT2_FLAG_SWAP_BYTES;
+#else
+#define NATIVE_FLAG 0;
+#endif
+
+
if (normalize_swapfs) {
- if ((fs->flags & EXT2_FLAG_SWAP_BYTES) ==
- ext2fs_native_flag()) {
+ if ((fs->flags & EXT2_FLAG_SWAP_BYTES) == NATIVE_FLAG) {
fprintf(stderr, _("%s: Filesystem byte order "
"already normalized.\n"), ctx->device_name);
fatal_error(ctx, 0);