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

Next file: linux/fs/nfs/dir.c
Previous file: linux/fs/namei.c
Back to the patch index
Back to the overall index

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

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