summaryrefslogtreecommitdiffstats
path: root/sys/fs/devfs
diff options
context:
space:
mode:
authortrhodes <trhodes@FreeBSD.org>2007-04-20 01:47:05 +0000
committertrhodes <trhodes@FreeBSD.org>2007-04-20 01:47:05 +0000
commita559ca64195cf40d4bce16ab02dbcd1e8350f678 (patch)
treee5934458bc738a847d8b5f8d429e500862d05466 /sys/fs/devfs
parent327fac0f6f272b660f0cf71206ab74b9f8411af7 (diff)
downloadFreeBSD-src-a559ca64195cf40d4bce16ab02dbcd1e8350f678.zip
FreeBSD-src-a559ca64195cf40d4bce16ab02dbcd1e8350f678.tar.gz
In some cases, like whenever devfs file times are zero, the fix(aa) will not
be applied to dev entries. This leaves us with file times like "Jan 1 1970." Work around this problem by replacing the tv_sec == 0 check with a <= 3600 check. It's doubtful anyone will be booting within an hour of the Epoch, let alone care about a few seconds worth of nonzero timestamps. It's a hackish work around, but it does work and I have not experienced any negatives in my testing. Discussed with: bde "Ok with me: phk
Diffstat (limited to 'sys/fs/devfs')
-rw-r--r--sys/fs/devfs/devfs_vnops.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/fs/devfs/devfs_vnops.c b/sys/fs/devfs/devfs_vnops.c
index 1e9df72..61ddb54 100644
--- a/sys/fs/devfs/devfs_vnops.c
+++ b/sys/fs/devfs/devfs_vnops.c
@@ -425,7 +425,7 @@ devfs_getattr(struct vop_getattr_args *ap)
#define fix(aa) \
do { \
- if ((aa).tv_sec == 0) { \
+ if ((aa).tv_sec <= 3600) { \
(aa).tv_sec = boottime.tv_sec; \
(aa).tv_nsec = boottime.tv_usec * 1000; \
} \
OpenPOWER on IntegriCloud