Subject: kern/562: msdosfs time stamp handling
To: None <gnats-admin@sun-lamp.cs.berkeley.edu>
From: None <thomas@mathematik.uni-Bremen.de>
List: netbsd-bugs
Date: 11/07/1994 14:05:02
>Number: 562
>Category: kern
>Synopsis: msdosfs time stamp handling
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: gnats-admin (Kernel Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Nov 7 14:05:01 1994
>Originator: Thomas Eberhardt
>Organization:
CeVis, University of Bremen, Germany
>Release: 1.0
>Environment:
System: NetBSD ed209 1.0 NetBSD 1.0 (ED209) #1: Wed Oct 26 19:26:52 MET 1994 thomas@ed209:/usr/src/sys/arch/i386/compile/ED209 i386
Machine: i386
>Description:
The deupdat function in the msdosfs code doesn't put the passed
in time into the directory entry as stated in a comment.
>How-To-Repeat:
touch -t <time> <file on msdos filesystem>
The time stamp is set to the current time.
>Fix:
*** msdosfs_denode.c- Mon Aug 29 17:30:03 1994
--- msdosfs_denode.c Wed Oct 5 21:04:36 1994
***************
*** 312,318 ****
struct buf *bp;
struct direntry *dirp;
struct msdosfsmount *pmp = dep->de_pmp;
- struct timespec ts;
struct vnode *vp = DETOV(dep);
#ifdef MSDOSFS_DEBUG
--- 312,317 ----
***************
*** 342,349 ****
/*
* Put the passed in time into the directory entry.
*/
! TIMEVAL_TO_TIMESPEC(&time, &ts);
! unix2dostime(&ts, &dep->de_Date, &dep->de_Time);
dep->de_flag &= ~DE_UPDATE;
/*
--- 341,347 ----
/*
* Put the passed in time into the directory entry.
*/
! unix2dostime(tp, &dep->de_Date, &dep->de_Time);
dep->de_flag &= ~DE_UPDATE;
/*
>Audit-Trail:
>Unformatted: