summaryrefslogtreecommitdiffstats
path: root/sys/fs/msdosfs/msdosfs_fat.c
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1994-12-12 12:35:50 +0000
committerbde <bde@FreeBSD.org>1994-12-12 12:35:50 +0000
commite62de5875e5dab92ad9733a6e768297f341993a6 (patch)
tree626f6527e26b0513eec8fb26c3b5465e0455661d /sys/fs/msdosfs/msdosfs_fat.c
parent5e1c91854979f54637a24def6160e2296d5ff499 (diff)
downloadFreeBSD-src-e62de5875e5dab92ad9733a6e768297f341993a6.zip
FreeBSD-src-e62de5875e5dab92ad9733a6e768297f341993a6.tar.gz
Fix numerous timestamp bugs.
DE_UPDATE was confused with DE_MODIFIED in some places (they do have confusing names). Handle them exactly the same as IN_UPDATE and IN_MODIFIED. This fixes chmod() and chown() clobbering the mtime and other bugs. DE_MODIFIED was set but not used. Parenthesize macro args. DE_TIMES() now takes a timeval arg instead of a timespec arg. It was stupid to use a macro for speed and do unused conversions to prepare for the macro. Restore the left shifting of the DOS seconds count by 1. It got lost among the shifts for the bitfields, so DOS seconds counts appeared to range from 0 to 29 seconds (step 1) instead of 0 to 58 seconds (step 2). Actually use the passed-in mtime in deupdat() as documented so that utimes() works. Change `extern __inline's to `static inline's so that msdosfs_fat.o can be linked when it is compiled without -O. Remove faking of directory mtimes to always be the current time. It's more surprising for directory mtimes to change when you read the directories than for them not to change when you write the directories. This should be controlled by a mount-time option if at all.
Diffstat (limited to 'sys/fs/msdosfs/msdosfs_fat.c')
-rw-r--r--sys/fs/msdosfs/msdosfs_fat.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/fs/msdosfs/msdosfs_fat.c b/sys/fs/msdosfs/msdosfs_fat.c
index 2e38296..742325d 100644
--- a/sys/fs/msdosfs/msdosfs_fat.c
+++ b/sys/fs/msdosfs/msdosfs_fat.c
@@ -1,4 +1,4 @@
-/* $Id: msdosfs_fat.c,v 1.2 1994/09/27 20:42:46 phk Exp $ */
+/* $Id: msdosfs_fat.c,v 1.3 1994/10/10 07:57:33 phk Exp $ */
/* $NetBSD: msdosfs_fat.c,v 1.12 1994/08/21 18:44:04 ws Exp $ */
/*-
@@ -361,7 +361,7 @@ updatefats(pmp, bp, fatbn)
* Where n is even. m = n + (n >> 2)
*
*/
-extern __inline void
+static inline void
usemap_alloc(pmp, cn)
struct msdosfsmount *pmp;
u_long cn;
@@ -371,7 +371,7 @@ usemap_alloc(pmp, cn)
pmp->pm_freeclustercount--;
}
-extern __inline void
+static inline void
usemap_free(pmp, cn)
struct msdosfsmount *pmp;
u_long cn;
OpenPOWER on IntegriCloud