patch-2.4.21 linux-2.4.21/fs/befs/super.c
Next file: linux-2.4.21/fs/befs/super.h
Previous file: linux-2.4.21/fs/befs/linuxvfs.c
Back to the patch index
Back to the overall index
- Lines: 24
- Date:
2003-06-13 07:51:37.000000000 -0700
- Orig file:
linux-2.4.20/fs/befs/super.c
- Orig date:
2002-11-28 15:53:15.000000000 -0800
diff -urN linux-2.4.20/fs/befs/super.c linux-2.4.21/fs/befs/super.c
@@ -9,7 +9,8 @@
#include <linux/fs.h>
-#include "befs_fs.h"
+#include "befs.h"
+#include "super.h"
#include "endian.h"
/**
@@ -25,8 +26,11 @@
{
befs_sb_info *befs_sb = BEFS_SB(sb);
- /* byte_order is special, no byte-swap */
- befs_sb->byte_order = disk_sb->fs_byte_order;
+ /* Check the byte order of the filesystem */
+ if (le32_to_cpu(disk_sb->fs_byte_order) == BEFS_BYTEORDER_NATIVE)
+ befs_sb->byte_order = BEFS_BYTESEX_LE;
+ else if (be32_to_cpu(disk_sb->fs_byte_order) == BEFS_BYTEORDER_NATIVE)
+ befs_sb->byte_order = BEFS_BYTESEX_BE;
befs_sb->magic1 = fs32_to_cpu(sb, disk_sb->magic1);
befs_sb->magic2 = fs32_to_cpu(sb, disk_sb->magic2);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)