Add missing *at syscalls among others

This commit is contained in:
matt 2012-01-31 22:53:56 +00:00
parent 1c72d69ada
commit f7a1e1f692
2 changed files with 337 additions and 4 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: netbsd32_execve.c,v 1.32 2008/05/29 14:51:26 mrg Exp $ */
/* $NetBSD: netbsd32_execve.c,v 1.33 2012/01/31 22:53:56 matt Exp $ */
/*
* Copyright (c) 1998, 2001 Matthew R. Green
@ -28,7 +28,7 @@
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: netbsd32_execve.c,v 1.32 2008/05/29 14:51:26 mrg Exp $");
__KERNEL_RCSID(0, "$NetBSD: netbsd32_execve.c,v 1.33 2012/01/31 22:53:56 matt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -72,3 +72,21 @@ netbsd32_execve(struct lwp *l, const struct netbsd32_execve_args *uap, register_
return execve1(l, path, SCARG_P32(uap, argp),
SCARG_P32(uap, envp), netbsd32_execve_fetch_element);
}
int
netbsd32_fexecve(struct lwp *l, const struct netbsd32_fexecve_args *uap,
register_t *retval)
{
/* {
syscallarg(int) fd;
syscallarg(netbsd32_charpp) argp;
syscallarg(netbsd32_charpp) envp;
} */
struct sys_fexecve_args ua;
NETBSD32TO64_UAP(fd);
NETBSD32TOP_UAP(argp, char * const);
NETBSD32TOP_UAP(envp, char * const);
return sys_fexecve(l, &ua, retval);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: netbsd32_netbsd.c,v 1.176 2012/01/29 06:29:04 dholland Exp $ */
/* $NetBSD: netbsd32_netbsd.c,v 1.177 2012/01/31 22:53:56 matt Exp $ */
/*
* Copyright (c) 1998, 2001, 2008 Matthew R. Green
@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.176 2012/01/29 06:29:04 dholland Exp $");
__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.177 2012/01/31 22:53:56 matt Exp $");
#if defined(_KERNEL_OPT)
#include "opt_ddb.h"
@ -2621,9 +2621,324 @@ netbsd32_kqueue1(struct lwp *l, const struct netbsd32_kqueue1_args *uap,
struct sys_kqueue1_args ua;
NETBSD32TO64_UAP(flags);
return sys_kqueue1(l, &ua, retval);
}
int
netbsd32_paccept(struct lwp *l, const struct netbsd32_paccept_args *uap,
register_t *retval)
{
/* {
syscallarg(int) s;
syscallarg(netbsd32_sockaddrp_t) name;
syscallarg(netbsd32_socklenp_t) anamelen;
syscallarg(const netbsd32_sigsetp_t) mask;
syscallarg(int) flags;
} */
struct sys_paccept_args ua;
NETBSD32TO64_UAP(s);
NETBSD32TOP_UAP(name, struct sockaddr *);
NETBSD32TOP_UAP(anamelen, socklen_t *);
NETBSD32TOP_UAP(mask, const sigset_t *);
NETBSD32TO64_UAP(flags);
return sys_paccept(l, &ua, retval);
}
int
netbsd32_linkat(struct lwp *l, const struct netbsd32_linkat_args *uap,
register_t *retval)
{
/* {
syscallarg(int) fd1;
syscallarg(const netbsd32_charp) name1;
syscallarg(int) fd2;
syscallarg(const netbsd32_charp) name2;
syscallarg(int) flags;
} */
struct sys_linkat_args ua;
NETBSD32TO64_UAP(fd1);
NETBSD32TOP_UAP(name1, const char);
NETBSD32TO64_UAP(fd2);
NETBSD32TOP_UAP(name2, const char);
NETBSD32TO64_UAP(flags);
return sys_linkat(l, &ua, retval);
}
int
netbsd32_renameat(struct lwp *l, const struct netbsd32_renameat_args *uap,
register_t *retval)
{
/* {
syscallarg(int) fromfd;
syscallarg(const netbsd32_charp) from;
syscallarg(int) tofd;
syscallarg(const netbsd32_charp) to;
} */
struct sys_renameat_args ua;
NETBSD32TO64_UAP(fromfd);
NETBSD32TOP_UAP(from, const char);
NETBSD32TO64_UAP(tofd);
NETBSD32TOP_UAP(to, const char);
return sys_renameat(l, &ua, retval);
}
int
netbsd32_mkfifoat(struct lwp *l, const struct netbsd32_mkfifoat_args *uap,
register_t *retval)
{
/* {
syscallarg(int) fd;
syscallarg(const netbsd32_charp) path;
syscallarg(mode_t) mode;
} */
struct sys_mkfifoat_args ua;
NETBSD32TO64_UAP(fd);
NETBSD32TOP_UAP(path, const char);
NETBSD32TO64_UAP(mode);
return sys_mkfifoat(l, &ua, retval);
}
int
netbsd32_mknodat(struct lwp *l, const struct netbsd32_mknodat_args *uap,
register_t *retval)
{
/* {
syscallarg(int) fd;
syscallarg(netbsd32_charp) path;
syscallarg(mode_t) mode;
syscallarg(uint32_t) dev;
} */
struct sys_mknodat_args ua;
NETBSD32TO64_UAP(fd);
NETBSD32TOP_UAP(path, const char);
NETBSD32TO64_UAP(mode);
NETBSD32TO64_UAP(dev);
return sys_mknodat(l, &ua, retval);
}
int
netbsd32_mkdirat(struct lwp *l, const struct netbsd32_mkdirat_args *uap,
register_t *retval)
{
/* {
syscallarg(int) fd;
syscallarg(netbsd32_charp) path;
syscallarg(mode_t) mode;
} */
struct sys_mkdirat_args ua;
NETBSD32TO64_UAP(fd);
NETBSD32TOP_UAP(path, const char);
NETBSD32TO64_UAP(mode);
return sys_mkdirat(l, &ua, retval);
}
int
netbsd32_faccessat(struct lwp *l, const struct netbsd32_faccessat_args *uap,
register_t *retval)
{
/* {
syscallarg(int) fd;
syscallarg(netbsd32_charp) path;
syscallarg(int) amode;
syscallarg(int) flag;
} */
struct sys_faccessat_args ua;
NETBSD32TO64_UAP(fd);
NETBSD32TOP_UAP(path, const char);
NETBSD32TO64_UAP(amode);
NETBSD32TO64_UAP(flag);
return sys_faccessat(l, &ua, retval);
}
int
netbsd32_fchmodat(struct lwp *l, const struct netbsd32_fchmodat_args *uap,
register_t *retval)
{
/* {
syscallarg(int) fd;
syscallarg(netbsd32_charp) path;
syscallarg(mode_t) mode;
syscallarg(int) flag;
} */
struct sys_fchmodat_args ua;
NETBSD32TO64_UAP(fd);
NETBSD32TOP_UAP(path, const char);
NETBSD32TO64_UAP(mode);
NETBSD32TO64_UAP(flag);
return sys_fchmodat(l, &ua, retval);
}
int
netbsd32_fchownat(struct lwp *l, const struct netbsd32_fchownat_args *uap,
register_t *retval)
{
/* {
syscallarg(int) fd;
syscallarg(netbsd32_charp) path;
syscallarg(uid_t) owner;
syscallarg(gid_t) group;
syscallarg(int) flag;
} */
struct sys_fchownat_args ua;
NETBSD32TO64_UAP(fd);
NETBSD32TOP_UAP(path, const char);
NETBSD32TO64_UAP(owner);
NETBSD32TO64_UAP(group);
NETBSD32TO64_UAP(flag);
return sys_fchownat(l, &ua, retval);
}
int
netbsd32_fstatat(struct lwp *l, const struct netbsd32_fstatat_args *uap,
register_t *retval)
{
/* {
syscallarg(int) fd;
syscallarg(netbsd32_charp) path;
syscallarg(netbsd32_statp_t) buf;
syscallarg(int) flag;
} */
struct sys_fstatat_args ua;
NETBSD32TO64_UAP(fd);
NETBSD32TOP_UAP(path, const char);
NETBSD32TOP_UAP(buf, const struct stat);
NETBSD32TO64_UAP(flag);
return sys_fstatat(l, &ua, retval);
}
int
netbsd32_utimensat(struct lwp *l, const struct netbsd32_utimensat_args *uap,
register_t *retval)
{
/* {
syscallarg(int) fd;
syscallarg(netbsd32_charp) path;
syscallarg(netbsd32_timespecp_t) tptr;
syscallarg(int) flag;
} */
struct sys_utimensat_args ua;
NETBSD32TO64_UAP(fd);
NETBSD32TOP_UAP(path, const char);
NETBSD32TOP_UAP(tptr, const struct timespec);
NETBSD32TO64_UAP(flag);
return sys_utimensat(l, &ua, retval);
}
int
netbsd32_openat(struct lwp *l, const struct netbsd32_openat_args *uap,
register_t *retval)
{
/* {
syscallarg(int) fd;
syscallarg(netbsd32_charp) path;
syscallarg(int) oflags;
syscallarg(mode_t) mode;
} */
struct sys_openat_args ua;
NETBSD32TO64_UAP(fd);
NETBSD32TOP_UAP(path, const char);
NETBSD32TO64_UAP(oflags);
NETBSD32TO64_UAP(mode);
return sys_openat(l, &ua, retval);
}
int
netbsd32_readlinkat(struct lwp *l, const struct netbsd32_readlinkat_args *uap,
register_t *retval)
{
/* {
syscallarg(int) fd;
syscallarg(netbsd32_charp) path;
syscallarg(netbsd32_charp) buf;
syscallarg(netbsd32_size_t) bufsize;
} */
struct sys_readlinkat_args ua;
NETBSD32TO64_UAP(fd);
NETBSD32TOP_UAP(path, const char *);
NETBSD32TOP_UAP(buf, char *);
NETBSD32TOX_UAP(bufsize, size_t);
return sys_readlinkat(l, &ua, retval);
}
int
netbsd32_symlinkat(struct lwp *l, const struct netbsd32_symlinkat_args *uap,
register_t *retval)
{
/* {
syscallarg(netbsd32_charp) path1;
syscallarg(int) fd;
syscallarg(netbsd32_charp) path2;
} */
struct sys_symlinkat_args ua;
NETBSD32TOP_UAP(path1, const char *);
NETBSD32TO64_UAP(fd);
NETBSD32TOP_UAP(path2, const char *);
return sys_symlinkat(l, &ua, retval);
}
int
netbsd32_unlinkat(struct lwp *l, const struct netbsd32_unlinkat_args *uap,
register_t *retval)
{
/* {
syscallarg(int) fd;
syscallarg(netbsd32_charp) path;
syscallarg(int) flag;
} */
struct sys_unlinkat_args ua;
NETBSD32TO64_UAP(fd);
NETBSD32TOP_UAP(path, const char *);
NETBSD32TO64_UAP(flag);
return sys_unlinkat(l, &ua, retval);
}
int
netbsd32_futimens(struct lwp *l, const struct netbsd32_futimens_args *uap,
register_t *retval)
{
/* {
syscallarg(int) fd;
syscallarg(netbsd32_timespecp_t) tptr;
} */
struct sys_futimens_args ua;
NETBSD32TO64_UAP(fd);
NETBSD32TOP_UAP(tptr, const struct timespec *);
return sys_futimens(l, &ua, retval);
}
/*
* MI indirect system call support.
* Only used if the MD netbsd32_syscall.c doesn't intercept the calls.