Rename struct timespec fields to conform to POSIX.1b

This commit is contained in:
jtc 1996-02-01 00:31:05 +00:00
parent e19bfae4f9
commit 299e1fe9df
7 changed files with 31 additions and 31 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: fdesc_vnops.c,v 1.27 1995/10/09 14:20:04 mycroft Exp $ */
/* $NetBSD: fdesc_vnops.c,v 1.28 1996/02/01 00:31:05 jtc Exp $ */
/*
* Copyright (c) 1992, 1993
@ -424,8 +424,8 @@ fdesc_getattr(ap)
vap->va_gid = 0;
vap->va_fsid = vp->v_mount->mnt_stat.f_fsid.val[0];
vap->va_blocksize = DEV_BSIZE;
vap->va_atime.ts_sec = boottime.tv_sec;
vap->va_atime.ts_nsec = 0;
vap->va_atime.tv_sec = boottime.tv_sec;
vap->va_atime.tv_nsec = 0;
vap->va_mtime = vap->va_atime;
vap->va_ctime = vap->va_mtime;
vap->va_gen = 0;

View File

@ -1,4 +1,4 @@
/* $NetBSD: msdosfs_conv.c,v 1.14 1996/01/31 20:51:40 mycroft Exp $ */
/* $NetBSD: msdosfs_conv.c,v 1.15 1996/02/01 00:37:14 jtc Exp $ */
/*-
* Copyright (C) 1995 Wolfgang Solfrank.
@ -117,7 +117,7 @@ unix2dostime(tsp, ddp, dtp)
* If the time from the last conversion is the same as now, then
* skip the computations and use the saved result.
*/
t = tsp->ts_sec - (tz.tz_minuteswest * 60)
t = tsp->tv_sec - (tz.tz_minuteswest * 60)
/* +- daylight savings time correction */ ;
if (lasttime != t) {
lasttime = t;
@ -216,9 +216,9 @@ dos2unixtime(dd, dt, tsp)
days += ((dd & DD_DAY_MASK) >> DD_DAY_SHIFT) - 1;
lastseconds = (days * 24 * 60 * 60) + SECONDSTO1980;
}
tsp->ts_sec = seconds + lastseconds + (tz.tz_minuteswest * 60)
tsp->tv_sec = seconds + lastseconds + (tz.tz_minuteswest * 60)
/* -+ daylight savings time correction */ ;
tsp->ts_nsec = 0;
tsp->tv_nsec = 0;
}
static u_char

View File

@ -1,4 +1,4 @@
/* $NetBSD: msdosfs_vnops.c,v 1.43 1995/12/01 07:26:58 mycroft Exp $ */
/* $NetBSD: msdosfs_vnops.c,v 1.44 1996/02/01 00:37:36 jtc Exp $ */
/*-
* Copyright (C) 1994, 1995 Wolfgang Solfrank.
@ -343,16 +343,16 @@ msdosfs_setattr(ap)
if (error = detrunc(dep, (u_long)vap->va_size, 0, cred, ap->a_p))
return (error);
}
if (vap->va_atime.ts_sec != VNOVAL || vap->va_mtime.ts_sec != VNOVAL) {
if (vap->va_atime.tv_sec != VNOVAL || vap->va_mtime.tv_sec != VNOVAL) {
if (cred->cr_uid != dep->de_pmp->pm_uid &&
(error = suser(cred, &ap->a_p->p_acflag)) &&
((vap->va_vaflags & VA_UTIMES_NULL) == 0 ||
(error = VOP_ACCESS(ap->a_vp, VWRITE, cred, ap->a_p))))
return (error);
if (!(dep->de_pmp->pm_flags & MSDOSFSMNT_NOWIN95)
&& vap->va_atime.ts_sec != VNOVAL)
&& vap->va_atime.tv_sec != VNOVAL)
unix2dostime(&vap->va_atime, &dep->de_ADate, &dep->de_ATime);
if (vap->va_mtime.ts_sec != VNOVAL)
if (vap->va_mtime.tv_sec != VNOVAL)
unix2dostime(&vap->va_mtime, &dep->de_MDate, &dep->de_MTime);
dep->de_Attributes |= ATTR_ARCHIVE;
dep->de_flag |= DE_MODIFIED;

View File

@ -1,4 +1,4 @@
/* $NetBSD: nfs_bio.c,v 1.21 1995/07/24 21:20:46 cgd Exp $ */
/* $NetBSD: nfs_bio.c,v 1.22 1996/02/01 00:39:50 jtc Exp $ */
/*
* Copyright (c) 1989, 1993
@ -125,15 +125,15 @@ nfs_bioread(vp, uio, ioflag, cred)
np->n_direofoffset = 0;
if (error = VOP_GETATTR(vp, &vattr, cred, p))
return (error);
np->n_mtime = vattr.va_mtime.ts_sec;
np->n_mtime = vattr.va_mtime.tv_sec;
} else {
if (error = VOP_GETATTR(vp, &vattr, cred, p))
return (error);
if (np->n_mtime != vattr.va_mtime.ts_sec) {
if (np->n_mtime != vattr.va_mtime.tv_sec) {
np->n_direofoffset = 0;
if (error = nfs_vinvalbuf(vp, V_SAVE, cred, p, 1))
return (error);
np->n_mtime = vattr.va_mtime.ts_sec;
np->n_mtime = vattr.va_mtime.tv_sec;
}
}
}
@ -749,7 +749,7 @@ nfs_doio(bp, cr, p)
NQNFS_CKINVALID(vp, np, NQL_READ) &&
np->n_lrev != np->n_brev) ||
(!(nmp->nm_flag & NFSMNT_NQNFS) &&
np->n_mtime != np->n_vattr.va_mtime.ts_sec))) {
np->n_mtime != np->n_vattr.va_mtime.tv_sec))) {
uprintf("Process killed due to text file modification\n");
psignal(p, SIGKILL);
p->p_holdcnt++;

View File

@ -1,4 +1,4 @@
/* $NetBSD: nfs_serv.c,v 1.19 1995/12/19 23:07:32 cgd Exp $ */
/* $NetBSD: nfs_serv.c,v 1.20 1996/02/01 00:40:13 jtc Exp $ */
/*
* Copyright (c) 1989, 1993
@ -212,9 +212,9 @@ nfsrv_setattr(nfsd, mrep, md, dpos, cred, nam, mrq)
#ifdef notyet
fxdr_nfstime(&sp->sa_nfsatime, &va.va_atime);
#else
va.va_atime.ts_sec =
va.va_atime.tv_sec =
fxdr_unsigned(int32_t, sp->sa_nfsatime.nfs_sec);
va.va_atime.ts_nsec = 0;
va.va_atime.tv_nsec = 0;
#endif
}
if (sp->sa_nfsmtime.nfs_sec != nfs_xdrneg1)

View File

@ -1,4 +1,4 @@
/* $NetBSD: nfs_subs.c,v 1.22 1995/12/19 23:07:43 cgd Exp $ */
/* $NetBSD: nfs_subs.c,v 1.23 1996/02/01 00:40:44 jtc Exp $ */
/*
* Copyright (c) 1989, 1993
@ -732,7 +732,7 @@ nfs_loadattrcache(vpp, mdp, dposp, vaper)
*vpp = vp = nvp;
}
}
np->n_mtime = mtime.ts_sec;
np->n_mtime = mtime.tv_sec;
}
vap = &np->n_vattr;
vap->va_type = vtyp;
@ -789,13 +789,13 @@ nfs_loadattrcache(vpp, mdp, dposp, vaper)
#endif
if (np->n_flag & NCHG) {
if (np->n_flag & NACC) {
vaper->va_atime.ts_sec = np->n_atim.tv_sec;
vaper->va_atime.ts_nsec =
vaper->va_atime.tv_sec = np->n_atim.tv_sec;
vaper->va_atime.tv_nsec =
np->n_atim.tv_usec * 1000;
}
if (np->n_flag & NUPD) {
vaper->va_mtime.ts_sec = np->n_mtim.tv_sec;
vaper->va_mtime.ts_nsec =
vaper->va_mtime.tv_sec = np->n_mtim.tv_sec;
vaper->va_mtime.tv_nsec =
np->n_mtim.tv_usec * 1000;
}
}
@ -850,12 +850,12 @@ nfs_getattrcache(vp, vaper)
#endif
if (np->n_flag & NCHG) {
if (np->n_flag & NACC) {
vaper->va_atime.ts_sec = np->n_atim.tv_sec;
vaper->va_atime.ts_nsec = np->n_atim.tv_usec * 1000;
vaper->va_atime.tv_sec = np->n_atim.tv_sec;
vaper->va_atime.tv_nsec = np->n_atim.tv_usec * 1000;
}
if (np->n_flag & NUPD) {
vaper->va_mtime.ts_sec = np->n_mtim.tv_sec;
vaper->va_mtime.ts_nsec = np->n_mtim.tv_usec * 1000;
vaper->va_mtime.tv_sec = np->n_mtim.tv_sec;
vaper->va_mtime.tv_nsec = np->n_mtim.tv_usec * 1000;
}
}
return (0);

View File

@ -1,4 +1,4 @@
/* $NetBSD: nfs_vfsops.c,v 1.39 1995/12/19 23:07:49 cgd Exp $ */
/* $NetBSD: nfs_vfsops.c,v 1.40 1996/02/01 00:41:05 jtc Exp $ */
/*
* Copyright (c) 1989, 1993
@ -212,7 +212,7 @@ nfs_mountroot()
/* Get root attributes (for the time). */
error = VOP_GETATTR(vp, &attr, procp->p_ucred, procp);
if (error) panic("nfs_mountroot: getattr for root");
n = attr.va_mtime.ts_sec;
n = attr.va_mtime.tv_sec;
#ifdef DEBUG
printf("root time: 0x%x\n", n);
#endif