patch-2.3.13 linux/fs/ncpfs/inode.c

Next file: linux/fs/proc/array.c
Previous file: linux/fs/ncpfs/dir.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.12/linux/fs/ncpfs/inode.c linux/fs/ncpfs/inode.c
@@ -134,7 +134,15 @@
 	if ((inode->i_size)&&(inode->i_blksize)) {
 		inode->i_blocks = (inode->i_size-1)/(inode->i_blksize)+1;
 	}
+
 	/* TODO: times? I'm not sure... */
+	inode->i_mtime = ncp_date_dos2unix(le16_to_cpu(nwinfo->i.modifyTime),
+			  		   le16_to_cpu(nwinfo->i.modifyDate));
+	inode->i_ctime = ncp_date_dos2unix(le16_to_cpu(nwinfo->i.creationTime),
+			    		   le16_to_cpu(nwinfo->i.creationDate));
+	inode->i_atime = ncp_date_dos2unix(0,
+					   le16_to_cpu(nwinfo->i.lastAccessDate));
+
 	NCP_FINFO(inode)->DosDirNum = nwinfo->i.DosDirNum;
 	NCP_FINFO(inode)->dirEntNum = nwinfo->i.dirEntNum;
 	NCP_FINFO(inode)->volNumber = nwinfo->i.volNumber;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)