summaryrefslogtreecommitdiffstats
path: root/sys/compat/freebsd32
diff options
context:
space:
mode:
authorambrisko <ambrisko@FreeBSD.org>2006-01-20 16:22:06 +0000
committerambrisko <ambrisko@FreeBSD.org>2006-01-20 16:22:06 +0000
commit1e3545831a18b2adfdc4a2904623aaa780ba53ba (patch)
tree7a618f9236f56fe9e818ceb6f8c28334ccebd2b3 /sys/compat/freebsd32
parent56d35a6f8c495d2427f0335397f1f37f7d8ec022 (diff)
downloadFreeBSD-src-1e3545831a18b2adfdc4a2904623aaa780ba53ba.zip
FreeBSD-src-1e3545831a18b2adfdc4a2904623aaa780ba53ba.tar.gz
Add 32bit version of lutimes so untar doesn't mess up sym-links on amd64.
Diffstat (limited to 'sys/compat/freebsd32')
-rw-r--r--sys/compat/freebsd32/freebsd32_misc.c21
-rw-r--r--sys/compat/freebsd32/syscalls.master4
2 files changed, 23 insertions, 2 deletions
diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c
index feb03a5..f2acf1a 100644
--- a/sys/compat/freebsd32/freebsd32_misc.c
+++ b/sys/compat/freebsd32/freebsd32_misc.c
@@ -1221,6 +1221,27 @@ freebsd32_utimes(struct thread *td, struct freebsd32_utimes_args *uap)
}
int
+freebsd32_lutimes(struct thread *td, struct freebsd32_lutimes_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_lutimes(td, uap->path, UIO_USERSPACE, sp, UIO_SYSSPACE));
+}
+
+int
freebsd32_futimes(struct thread *td, struct freebsd32_futimes_args *uap)
{
struct timeval32 s32[2];
diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master
index 16449b9..3336159 100644
--- a/sys/compat/freebsd32/syscalls.master
+++ b/sys/compat/freebsd32/syscalls.master
@@ -476,8 +476,8 @@
275 AUE_NULL MNOPROTO { int lchown(char *path, uid_t uid, \
gid_t gid); } netbsd_lchown \
lchown_args int
-276 AUE_NULL MNOPROTO { int lutimes(char *path, \
- struct timeval *tptr); }
+276 AUE_NULL MSTD { int freebsd32_lutimes(char *path, \
+ struct timeval32 *tptr); }
277 AUE_NULL MNOPROTO { int msync(void *addr, size_t len, \
int flags); } netbsd_msync msync_args int
278 AUE_NULL MNOPROTO { int nstat(char *path, struct nstat *ub); }
OpenPOWER on IntegriCloud