* hlfsd/stubs.c (nfsproc_getattr_2_svc, nfsproc_lookup_2_svc,
authorErez Zadok <ezk@cs.sunysb.edu>
Mon, 26 Sep 2005 05:17:11 +0000 (05:17 +0000)
committerErez Zadok <ezk@cs.sunysb.edu>
Mon, 26 Sep 2005 05:17:11 +0000 (05:17 +0000)
nfsproc_readlink_2_svc, nfsproc_readdir_2_svc), hlfsd/hlfsd.c
(hlfsd_init): use new clocktime() function.

ChangeLog
hlfsd/hlfsd.c
hlfsd/stubs.c

index ed8a9bd6211069d2054fdfc2932ddb49403621ca..b879d968c315310a33732e83239557e2f897bc35 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-09-26  Erez Zadok  <ezk@cs.sunysb.edu>
+
+       * 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  <ezk@cs.sunysb.edu>
 
        * README.attrcache: document netbsd's patchs to support noac.
index 4549b5aa5a47147d916f247da9b625c2f2884277..567b09ab6e20c1784ec9157accddd97d530a53da 100644 (file)
@@ -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,
index 28870a0117b7bf8ca6ffcf20482baf42f6bc7501..2303b9200304c7a5a0e2a3d483e8399966125e7e 100644 (file)
@@ -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]) {