Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/miscfs be consistent about how va_[acm]time is set to th...
details: https://anonhg.NetBSD.org/src/rev/b14c64a8965b
branches: trunk
changeset: 533605:b14c64a8965b
user: lukem <lukem%NetBSD.org@localhost>
date: Fri Jul 05 03:24:06 2002 +0000
description:
be consistent about how va_[acm]time is set to the current time
(inspired by how procfs does it)
diffstat:
sys/miscfs/kernfs/kernfs_vnops.c | 12 +++++++-----
sys/miscfs/portal/portal_vnops.c | 12 +++++++-----
2 files changed, 14 insertions(+), 10 deletions(-)
diffs (68 lines):
diff -r 88e71d0d9bc0 -r b14c64a8965b sys/miscfs/kernfs/kernfs_vnops.c
--- a/sys/miscfs/kernfs/kernfs_vnops.c Fri Jul 05 02:02:00 2002 +0000
+++ b/sys/miscfs/kernfs/kernfs_vnops.c Fri Jul 05 03:24:06 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kernfs_vnops.c,v 1.80 2002/07/05 02:02:00 lukem Exp $ */
+/* $NetBSD: kernfs_vnops.c,v 1.81 2002/07/05 03:24:06 lukem Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -43,7 +43,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kernfs_vnops.c,v 1.80 2002/07/05 02:02:00 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kernfs_vnops.c,v 1.81 2002/07/05 03:24:06 lukem Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -469,10 +469,12 @@
vap->va_fsid = vp->v_mount->mnt_stat.f_fsid.val[0];
vap->va_size = 0;
vap->va_blocksize = DEV_BSIZE;
+ /*
+ * Make all times be current TOD.
+ */
microtime(&tv);
- TIMEVAL_TO_TIMESPEC(&tv, &vap->va_atime);
- vap->va_mtime = vap->va_atime;
- vap->va_ctime = vap->va_atime;
+ TIMEVAL_TO_TIMESPEC(&tv, &vap->va_ctime);
+ vap->va_atime = vap->va_mtime = vap->va_ctime;
vap->va_gen = 0;
vap->va_flags = 0;
vap->va_rdev = 0;
diff -r 88e71d0d9bc0 -r b14c64a8965b sys/miscfs/portal/portal_vnops.c
--- a/sys/miscfs/portal/portal_vnops.c Fri Jul 05 02:02:00 2002 +0000
+++ b/sys/miscfs/portal/portal_vnops.c Fri Jul 05 03:24:06 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: portal_vnops.c,v 1.41 2001/12/06 04:27:42 chs Exp $ */
+/* $NetBSD: portal_vnops.c,v 1.42 2002/07/05 03:24:07 lukem Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -44,7 +44,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: portal_vnops.c,v 1.41 2001/12/06 04:27:42 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: portal_vnops.c,v 1.42 2002/07/05 03:24:07 lukem Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -554,10 +554,12 @@
vap->va_fsid = vp->v_mount->mnt_stat.f_fsid.val[0];
vap->va_size = DEV_BSIZE;
vap->va_blocksize = DEV_BSIZE;
+ /*
+ * Make all times be current TOD.
+ */
microtime(&tv);
- TIMEVAL_TO_TIMESPEC(&tv, &vap->va_atime);
- vap->va_mtime = vap->va_atime;
- vap->va_ctime = vap->va_ctime;
+ TIMEVAL_TO_TIMESPEC(&tv, &vap->va_ctime);
+ vap->va_atime = vap->va_mtime = vap->va_ctime;
vap->va_gen = 0;
vap->va_flags = 0;
vap->va_rdev = 0;
Home |
Main Index |
Thread Index |
Old Index