Rename struct timespec fields to conform to POSIX.1b
This commit is contained in:
parent
dd05bd5124
commit
e19bfae4f9
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: hpux_compat.c,v 1.23 1996/01/06 12:44:11 thorpej Exp $ */
|
||||
/* $NetBSD: hpux_compat.c,v 1.24 1996/02/01 00:18:04 jtc Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
|
@ -1393,10 +1393,10 @@ hpux_sys_utime_6x(p, v, retval)
|
|||
} else
|
||||
tv[0] = tv[1] = time.tv_sec;
|
||||
vattr_null(&vattr);
|
||||
vattr.va_atime.ts_sec = tv[0];
|
||||
vattr.va_atime.ts_nsec = 0;
|
||||
vattr.va_mtime.ts_sec = tv[1];
|
||||
vattr.va_mtime.ts_nsec = 0;
|
||||
vattr.va_atime.tv_sec = tv[0];
|
||||
vattr.va_atime.tv_nsec = 0;
|
||||
vattr.va_mtime.tv_sec = tv[1];
|
||||
vattr.va_mtime.tv_nsec = 0;
|
||||
NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF, UIO_USERSPACE,
|
||||
SCARG(uap, fname), p);
|
||||
if (error = namei(&nd))
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: svr4_stat.c,v 1.16 1995/12/19 18:27:02 christos Exp $ */
|
||||
/* $NetBSD: svr4_stat.c,v 1.17 1996/02/01 00:19:52 jtc Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Christos Zoulas
|
||||
|
@ -85,9 +85,9 @@ bsd_to_svr4_stat(st, st4)
|
|||
st4->st_gid = st->st_gid;
|
||||
st4->st_rdev = st->st_rdev;
|
||||
st4->st_size = st->st_size;
|
||||
st4->st_atim = st->st_atimespec.ts_sec;
|
||||
st4->st_mtim = st->st_mtimespec.ts_sec;
|
||||
st4->st_ctim = st->st_ctimespec.ts_sec;
|
||||
st4->st_atim = st->st_atimespec.tv_sec;
|
||||
st4->st_mtim = st->st_mtimespec.tv_sec;
|
||||
st4->st_ctim = st->st_ctimespec.tv_sec;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: cd9660_node.c,v 1.13 1994/12/24 15:30:07 cgd Exp $ */
|
||||
/* $NetBSD: cd9660_node.c,v 1.14 1996/02/01 00:24:19 jtc Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1982, 1986, 1989, 1994
|
||||
|
@ -392,8 +392,8 @@ cd9660_tstamp_conv7(pi,pu)
|
|||
tz = pi[6];
|
||||
|
||||
if (y < 1970) {
|
||||
pu->ts_sec = 0;
|
||||
pu->ts_nsec = 0;
|
||||
pu->tv_sec = 0;
|
||||
pu->tv_nsec = 0;
|
||||
return 0;
|
||||
} else {
|
||||
#ifdef ORIGINAL
|
||||
|
@ -413,8 +413,8 @@ cd9660_tstamp_conv7(pi,pu)
|
|||
if (-48 <= tz && tz <= 52)
|
||||
crtime -= tz * 15 * 60;
|
||||
}
|
||||
pu->ts_sec = crtime;
|
||||
pu->ts_nsec = 0;
|
||||
pu->tv_sec = crtime;
|
||||
pu->tv_nsec = 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: vfs_subr.c,v 1.48 1996/01/30 18:21:08 mycroft Exp $ */
|
||||
/* $NetBSD: vfs_subr.c,v 1.49 1996/02/01 00:26:41 jtc Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1989, 1993
|
||||
|
@ -242,9 +242,9 @@ vattr_null(vap)
|
|||
vap->va_mode = vap->va_nlink = vap->va_uid = vap->va_gid =
|
||||
vap->va_fsid = vap->va_fileid =
|
||||
vap->va_blocksize = vap->va_rdev =
|
||||
vap->va_atime.ts_sec = vap->va_atime.ts_nsec =
|
||||
vap->va_mtime.ts_sec = vap->va_mtime.ts_nsec =
|
||||
vap->va_ctime.ts_sec = vap->va_ctime.ts_nsec =
|
||||
vap->va_atime.tv_sec = vap->va_atime.tv_nsec =
|
||||
vap->va_mtime.tv_sec = vap->va_mtime.tv_nsec =
|
||||
vap->va_ctime.tv_sec = vap->va_ctime.tv_nsec =
|
||||
vap->va_flags = vap->va_gen = VNOVAL;
|
||||
vap->va_vaflags = 0;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: vfs_syscalls.c,v 1.60 1996/01/30 20:05:38 mycroft Exp $ */
|
||||
/* $NetBSD: vfs_syscalls.c,v 1.61 1996/02/01 00:26:46 jtc Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1989, 1993
|
||||
|
@ -1574,10 +1574,10 @@ sys_utimes(p, v, retval)
|
|||
if (vp->v_mount->mnt_flag & MNT_RDONLY)
|
||||
error = EROFS;
|
||||
else {
|
||||
vattr.va_atime.ts_sec = tv[0].tv_sec;
|
||||
vattr.va_atime.ts_nsec = tv[0].tv_usec * 1000;
|
||||
vattr.va_mtime.ts_sec = tv[1].tv_sec;
|
||||
vattr.va_mtime.ts_nsec = tv[1].tv_usec * 1000;
|
||||
vattr.va_atime.tv_sec = tv[0].tv_sec;
|
||||
vattr.va_atime.tv_nsec = tv[0].tv_usec * 1000;
|
||||
vattr.va_mtime.tv_sec = tv[1].tv_sec;
|
||||
vattr.va_mtime.tv_nsec = tv[1].tv_usec * 1000;
|
||||
error = VOP_SETATTR(vp, &vattr, p->p_ucred, p);
|
||||
}
|
||||
vput(vp);
|
||||
|
|
Loading…
Reference in New Issue