patch-2.1.19 linux/fs/ncpfs/dir.c

Next file: linux/fs/ncpfs/inode.c
Previous file: linux/fs/fat/inode.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.18/linux/fs/ncpfs/dir.c linux/fs/ncpfs/dir.c
@@ -2,6 +2,7 @@
  *  dir.c
  *
  *  Copyright (C) 1995, 1996 by Volker Lendecke
+ *  Modified for big endian by J.F. Chadima and David S. Miller
  *
  */
 
@@ -14,10 +15,12 @@
 #include <linux/mm.h>
 #include <linux/ncp_fs.h>
 #include <asm/uaccess.h>
+#include <asm/byteorder.h>
 #include <linux/errno.h>
 #include <linux/locks.h>
 #include "ncplib_kernel.h"
 
+
 struct ncp_dirent {
 	struct nw_info_struct i;
 	struct nw_search_sequence s; /* given back for i */
@@ -672,6 +675,11 @@
 	ncp_date_unix2dos(0, &(i->creationTime), &(i->creationDate));
 	ncp_date_unix2dos(0, &(i->modifyTime), &(i->modifyDate));
 	ncp_date_unix2dos(0, &dummy, &(i->lastAccessDate));
+	i->creationTime = le16_to_cpu(i->creationTime);
+	i->creationDate = le16_to_cpu(i->creationDate);
+	i->modifyTime = le16_to_cpu(i->modifyTime);
+	i->modifyDate = le16_to_cpu(i->modifyDate);
+	i->lastAccessDate = le16_to_cpu(i->lastAccessDate);
 	i->nameLen = 0;
 	i->entryName[0] = '\0';
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov