mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-23 11:18:54 +00:00
Add 32bit version of futimes so untar doesn't result in bad dates
(Jan 1, 1970) when run on amd64. Reviewed by: ps
This commit is contained in:
parent
0673e800e9
commit
8e7604db06
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=153247
@ -1220,6 +1220,28 @@ freebsd32_utimes(struct thread *td, struct freebsd32_utimes_args *uap)
|
|||||||
return (kern_utimes(td, uap->path, UIO_USERSPACE, sp, UIO_SYSSPACE));
|
return (kern_utimes(td, uap->path, UIO_USERSPACE, sp, UIO_SYSSPACE));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
freebsd32_futimes(struct thread *td, struct freebsd32_futimes_args *uap)
|
||||||
|
{
|
||||||
|
struct timeval32 s32[2];
|
||||||
|
struct timeval s[2], *sp;
|
||||||
|
int error;
|
||||||
|
|
||||||
|
if (uap->tptr != NULL) {
|
||||||
|
error = copyin(uap->tptr, s32, sizeof(s32));
|
||||||
|
if (error)
|
||||||
|
return (error);
|
||||||
|
CP(s32[0], s[0], tv_sec);
|
||||||
|
CP(s32[0], s[0], tv_usec);
|
||||||
|
CP(s32[1], s[1], tv_sec);
|
||||||
|
CP(s32[1], s[1], tv_usec);
|
||||||
|
sp = s;
|
||||||
|
} else
|
||||||
|
sp = NULL;
|
||||||
|
return (kern_futimes(td, uap->fd, sp, UIO_SYSSPACE));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
freebsd32_adjtime(struct thread *td, struct freebsd32_adjtime_args *uap)
|
freebsd32_adjtime(struct thread *td, struct freebsd32_adjtime_args *uap)
|
||||||
{
|
{
|
||||||
|
@ -374,7 +374,8 @@
|
|||||||
204 AUE_NULL MNOPROTO { int munlock(const void *addr, \
|
204 AUE_NULL MNOPROTO { int munlock(const void *addr, \
|
||||||
size_t len); }
|
size_t len); }
|
||||||
205 AUE_NULL MNOPROTO { int undelete(char *path); }
|
205 AUE_NULL MNOPROTO { int undelete(char *path); }
|
||||||
206 AUE_NULL MNOPROTO { int futimes(int fd, struct timeval *tptr); }
|
206 AUE_NULL MSTD { int freebsd32_futimes(int fd, \
|
||||||
|
struct timeval32 *tptr); }
|
||||||
207 AUE_NULL MNOPROTO { int getpgid(pid_t pid); }
|
207 AUE_NULL MNOPROTO { int getpgid(pid_t pid); }
|
||||||
208 AUE_NULL UNIMPL newreboot (NetBSD)
|
208 AUE_NULL UNIMPL newreboot (NetBSD)
|
||||||
209 AUE_NULL MNOPROTO { int poll(struct pollfd *fds, u_int nfds, \
|
209 AUE_NULL MNOPROTO { int poll(struct pollfd *fds, u_int nfds, \
|
||||||
|
Loading…
Reference in New Issue
Block a user