Another nnpfs fix for FreeBSD/amd64

Garrett Wollman wollman at khavrinen.lcs.mit.edu
Fri Jan 7 23:47:21 CET 2005


(unsigned int)VNOVAL != (time_t)VNOVAL; this was the cause of the
timestamp problem I observed.  (Caution: this may break some other
systems.)

I've also noticed that file modes don't seem to work right.  (I don't
expect them to do anything, but I do want them to behave in the way
that archiving programs expect: i.e., maintain the value they're set
to.)

-GAWollman

--- nnpfs/bsd/nnpfs_vnodeops-common.c.orig	Mon Dec  6 10:11:21 2004
+++ nnpfs/bsd/nnpfs_vnodeops-common.c	Fri Jan  7 17:27:12 2005
@@ -445,7 +445,7 @@
 	    CHECK_NNPFSATTR(va_size,(va_size_t)) &&
 	    CHECK_NNPFSATTR(va_uid,(uid_t)) &&
 	    CHECK_NNPFSATTR(va_gid,(gid_t)) &&
-	    CHECK_NNPFSATTR(va_mtime.tv_sec,(unsigned int)) &&
+	    CHECK_NNPFSATTR(va_mtime.tv_sec,(time_t)) &&
 	    CHECK_NNPFSATTR(va_fileid,(long)) &&
 	    CHECK_NNPFSATTR(va_type,(enum vtype)))
 		return 0;		/* Nothing to do */
@@ -481,7 +481,7 @@
 		    ubc_setsize(vp, msg.attr.xa_size);
 #endif
 	    }
-	    if (vap->va_mtime.tv_sec != (unsigned int)VNOVAL)
+	    if (vap->va_mtime.tv_sec != (time_t)VNOVAL)
 		XA_SET_MTIME(&msg.attr, vap->va_mtime.tv_sec);
 	    else
 		XA_SET_MTIME(&msg.attr, xn->attr.va_mtime.tv_sec);






More information about the Arla-drinkers mailing list