From ddd090d506eb5eae53adcb605c2c0b496f861cd3 Mon Sep 17 00:00:00 2001 From: Erez Zadok Date: Mon, 26 Sep 2005 05:17:11 +0000 Subject: [PATCH] * hlfsd/stubs.c (nfsproc_getattr_2_svc, nfsproc_lookup_2_svc, nfsproc_readlink_2_svc, nfsproc_readdir_2_svc), hlfsd/hlfsd.c (hlfsd_init): use new clocktime() function. --- ChangeLog | 6 ++++++ hlfsd/hlfsd.c | 2 +- hlfsd/stubs.c | 12 ++++++------ 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index ed8a9bd..b879d96 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-09-26 Erez Zadok + + * hlfsd/stubs.c (nfsproc_getattr_2_svc, nfsproc_lookup_2_svc, + nfsproc_readlink_2_svc, nfsproc_readdir_2_svc), hlfsd/hlfsd.c + (hlfsd_init): use new clocktime() function. + 2005-09-18 Erez Zadok * README.attrcache: document netbsd's patchs to support noac. diff --git a/hlfsd/hlfsd.c b/hlfsd/hlfsd.c index 4549b5a..567b09a 100644 --- a/hlfsd/hlfsd.c +++ b/hlfsd/hlfsd.c @@ -731,7 +731,7 @@ hlfsd_init(void) if (setitimer(ITIMER_REAL, &reloadinterval, (struct itimerval *) NULL) < 0) fatal("setitimer: %m"); - gettimeofday((struct timeval *) ((void *)&startup), (struct timezone *) NULL); + clocktime(&startup); /* * If -D daemon, then start serving here in the child, diff --git a/hlfsd/stubs.c b/hlfsd/stubs.c index 28870a0..2303b92 100644 --- a/hlfsd/stubs.c +++ b/hlfsd/stubs.c @@ -134,7 +134,7 @@ nfsproc_getattr_2_svc(am_nfs_fh *argp, struct svc_req *rqstp) * Some NFS clients may need this code. */ if (uid != rootfattr.na_uid) { - rootfattr.na_mtime.nt_seconds++; + clocktime(&rootfattr.na_mtime); rootfattr.na_uid = uid; } #endif /* 0 */ @@ -153,7 +153,7 @@ nfsproc_getattr_2_svc(am_nfs_fh *argp, struct svc_req *rqstp) * so we must update the nt_seconds field every time. */ if (uid != slinkfattr.na_uid) { - slinkfattr.na_mtime.nt_seconds++; + clocktime(&slinkfattr.na_mtime); slinkfattr.na_uid = uid; } #endif /* not MNT2_NFS_OPT_SYMTTL */ @@ -238,7 +238,7 @@ nfsproc_lookup_2_svc(nfsdiropargs *argp, struct svc_req *rqstp) * Some NFS clients may need this code. */ if (uid != rootfattr.na_uid) { - rootfattr.na_mtime.nt_seconds++; + clocktime(&rootfattr.na_mtime); rootfattr.na_uid = uid; } #endif /* 0 */ @@ -260,7 +260,7 @@ nfsproc_lookup_2_svc(nfsdiropargs *argp, struct svc_req *rqstp) * so we must update the nt_seconds field every time. */ if (uid != slinkfattr.na_uid) { - slinkfattr.na_mtime.nt_seconds++; + clocktime(&slinkfattr.na_mtime); slinkfattr.na_uid = uid; } #endif /* not MNT2_NFS_OPT_SYMTTL */ @@ -317,7 +317,7 @@ nfsproc_readlink_2_svc(am_nfs_fh *argp, struct svc_req *rqstp) if (getcreds(rqstp, &userid, &groupid, nfsxprt) < 0) return (nfsreadlinkres *) NULL; - gettimeofday((struct timeval *) &slinkfattr.na_atime, (struct timezone *) NULL); + clocktime(&slinkfattr.na_atime); res.rlr_status = NFS_OK; if (groupid == hlfs_gid) { @@ -490,7 +490,7 @@ nfsproc_readdir_2_svc(nfsreaddirargs *argp, struct svc_req *rqstp) if (eq_fh(&argp->rda_fhandle, &slink)) { res.rdr_status = NFSERR_NOTDIR; } else if (eq_fh(&argp->rda_fhandle, &root)) { - gettimeofday((struct timeval *) &rootfattr.na_atime, (struct timezone *) NULL); + clocktime(&rootfattr.na_atime); res.rdr_status = NFS_OK; switch (argp->rda_cookie[0]) { -- 2.43.0