diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2015-06-04 04:34:08 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2015-06-04 04:34:08 +0200 |
commit | 16b3a688c304bd94935288509af79ed39cb2a427 (patch) | |
tree | 984801689981dd2857f73fd77f37ef5b82106d48 /sys/src/cmd/dossrv/dosfs.c | |
parent | e83ef3d1e24e5248e4cdd86aec6f8710ad929be9 (diff) |
dossrv: maintain file creation date/time on disk, fsinfo sector can be 0 (disabled)
Diffstat (limited to 'sys/src/cmd/dossrv/dosfs.c')
-rw-r--r-- | sys/src/cmd/dossrv/dosfs.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/src/cmd/dossrv/dosfs.c b/sys/src/cmd/dossrv/dosfs.c index f30d1ab8a..eff5e2a8f 100644 --- a/sys/src/cmd/dossrv/dosfs.c +++ b/sys/src/cmd/dossrv/dosfs.c @@ -329,6 +329,9 @@ mkdentry(Xfs *xf, Dosptr *ndp, char *name, char *sname, int longtype, int nattr, nd->attr = nattr; puttime(nd, 0); + PSHORT(nd->cdate, GSHORT(nd->date)); + PSHORT(nd->ctime, GSHORT(nd->time)); + nd->ctimetenth = 0; putstart(xf, nd, start); nd->length[0] = length; nd->length[1] = length>>8; @@ -873,7 +876,8 @@ rwstat(void) * copy invisible fields */ d = dp->d; - for(i = 0; i < 2; i++) + d->ctimetenth = od.ctimetenth; + for(i = 0; i < nelem(od.ctime); i++) d->ctime[i] = od.ctime[i]; for(i = 0; i < nelem(od.cdate); i++) d->cdate[i] = od.cdate[i]; |