A.out compatibility mode; basically /emul/aout/ checking for syscalls
that use pathnames.
This commit is contained in:
parent
be58edf2b6
commit
5cc7b4c557
|
@ -0,0 +1,82 @@
|
|||
/* $NetBSD: aout_exec.c,v 1.1 1999/02/11 09:41:34 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Christos Zoulas.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the NetBSD
|
||||
* Foundation, Inc. and its contributors.
|
||||
* 4. Neither the name of The NetBSD Foundation nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/exec.h>
|
||||
#include <sys/signalvar.h>
|
||||
|
||||
#include <compat/aout/aout_exec.h>
|
||||
#include <compat/aout/aout_syscall.h>
|
||||
|
||||
const char aout_emul_path[] = "/emul/aout";
|
||||
extern struct sysent aout_sysent[];
|
||||
#ifdef SYSCALL_DEBUG
|
||||
extern char *aout_syscallnames[];
|
||||
#endif
|
||||
extern char sigcode[], esigcode[];
|
||||
|
||||
|
||||
struct emul emul_netbsd_aout = {
|
||||
"netbsd",
|
||||
NULL,
|
||||
sendsig,
|
||||
AOUT_SYS_syscall,
|
||||
AOUT_SYS_MAXSYSCALL,
|
||||
aout_sysent,
|
||||
#ifdef SYSCALL_DEBUG
|
||||
aout_syscallnames,
|
||||
#else
|
||||
NULL,
|
||||
#endif
|
||||
0,
|
||||
copyargs,
|
||||
setregs,
|
||||
sigcode,
|
||||
esigcode,
|
||||
};
|
||||
|
||||
int
|
||||
exec_aoutcompat_makecmds(p, epp)
|
||||
struct proc *p;
|
||||
struct exec_package *epp;
|
||||
{
|
||||
epp->ep_emul = &emul_netbsd_aout;
|
||||
return exec_aout_makecmds(p, epp);
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
/* $NetBSD: aout_exec.h,v 1.1 1999/02/11 09:41:34 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Christos Zoulas.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the NetBSD
|
||||
* Foundation, Inc. and its contributors.
|
||||
* 4. Neither the name of The NetBSD Foundation nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
int exec_aoutcompat_makecmds __P((struct proc *, struct exec_package *));
|
|
@ -0,0 +1,668 @@
|
|||
/* $NetBSD: aout_misc.c,v 1.1 1999/02/11 09:41:34 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Christos Zoulas.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the NetBSD
|
||||
* Foundation, Inc. and its contributors.
|
||||
* 4. Neither the name of The NetBSD Foundation nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "opt_ktrace.h"
|
||||
#include "opt_nfsserver.h"
|
||||
#include "opt_compat_netbsd.h"
|
||||
#include "opt_sysv.h"
|
||||
#include "opt_compat_43.h"
|
||||
|
||||
#include "fs_lfs.h"
|
||||
#include "fs_nfs.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/fcntl.h>
|
||||
#include <sys/proc.h>
|
||||
|
||||
#include <sys/syscall.h>
|
||||
#include <sys/syscallargs.h>
|
||||
|
||||
#include <compat/aout/aout_util.h>
|
||||
#include <compat/aout/aout_syscall.h>
|
||||
#include <compat/aout/aout_syscallargs.h>
|
||||
|
||||
int
|
||||
aout_sys_open(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct aout_sys_open_args *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
if (SCARG(uap, flags) & O_CREAT)
|
||||
AOUT_CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
|
||||
else
|
||||
AOUT_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return sys_open(p, v, retval);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
aout_sys_creat(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct aout_sys_creat_args *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
AOUT_CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
|
||||
|
||||
return compat_43_sys_creat(p, v, retval);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
aout_sys_link(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct aout_sys_link_args *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
AOUT_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
AOUT_CHECK_ALT_CREAT(p, &sg, SCARG(uap, link));
|
||||
|
||||
return sys_link(p, v, retval);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
aout_sys_unlink(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct aout_sys_unlink_args *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
AOUT_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return sys_unlink(p, v, retval);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
aout_sys_chdir(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct aout_sys_chdir_args *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
AOUT_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return sys_chdir(p, v, retval);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
aout_sys_mknod(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct aout_sys_mknod_args *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
AOUT_CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
|
||||
|
||||
return sys_mknod(p, v, retval);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
aout_sys_chmod(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct aout_sys_chmod_args *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
AOUT_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return sys_chmod(p, v, retval);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
aout_sys_chown(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct aout_sys_chown_args *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
AOUT_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return sys_chown(p, v, retval);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
aout_sys_mount(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct aout_sys_mount_args *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
AOUT_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return sys_mount(p, v, retval);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
aout_sys_unmount(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct aout_sys_unmount_args *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
AOUT_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return sys_unmount(p, v, retval);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
aout_sys_access(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct aout_sys_access_args *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
AOUT_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return sys_access(p, v, retval);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
aout_sys_chflags(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct aout_sys_chflags_args *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
AOUT_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return sys_chflags(p, v, retval);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
aout_compat_43_sys_stat(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct aout_compat_43_sys_stat_args *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
AOUT_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return compat_43_sys_stat(p, v, retval);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
aout_compat_43_sys_lstat(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct aout_compat_43_sys_lstat_args *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
AOUT_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return compat_43_sys_lstat(p, v, retval);
|
||||
}
|
||||
|
||||
#ifdef KTRACE
|
||||
int
|
||||
aout_sys_ktrace(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct aout_sys_ktrace_args *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
AOUT_CHECK_ALT_CREAT(p, &sg, SCARG(uap, fname));
|
||||
|
||||
return sys_ktrace(p, v, retval);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
int
|
||||
aout_sys_acct(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct aout_sys_acct_args *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
AOUT_CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
|
||||
|
||||
return sys_acct(p, v, retval);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
aout_sys_revoke(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct aout_sys_revoke_args *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
AOUT_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return sys_revoke(p, v, retval);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
aout_sys_symlink(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct aout_sys_symlink_args *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
AOUT_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
AOUT_CHECK_ALT_CREAT(p, &sg, SCARG(uap, link));
|
||||
|
||||
return sys_symlink(p, v, retval);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
aout_sys_readlink(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct aout_sys_readlink_args *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
AOUT_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return sys_readlink(p, v, retval);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
aout_sys_execve(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct aout_sys_execve_args *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
AOUT_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return sys_execve(p, v, retval);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
aout_sys_chroot(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct aout_sys_chroot_args *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
AOUT_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return sys_chroot(p, v, retval);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
aout_sys_rename(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct aout_sys_rename_args *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
AOUT_CHECK_ALT_EXIST(p, &sg, SCARG(uap, from));
|
||||
AOUT_CHECK_ALT_CREAT(p, &sg, SCARG(uap, to));
|
||||
|
||||
return sys_rename(p, v, retval);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
aout_compat_43_sys_truncate(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct aout_compat_43_sys_truncate_args *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
AOUT_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return compat_43_sys_truncate(p, v, retval);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
aout_sys_mkfifo(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct aout_sys_mkfifo_args *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
AOUT_CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
|
||||
|
||||
return sys_mkfifo(p, v, retval);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
aout_sys_mkdir(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct aout_sys_mkdir_args *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
AOUT_CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
|
||||
|
||||
return sys_mkdir(p, v, retval);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
aout_sys_rmdir(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct aout_sys_rmdir_args *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
AOUT_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return sys_rmdir(p, v, retval);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
aout_sys_utimes(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct aout_sys_utimes_args *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
AOUT_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return sys_utimes(p, v, retval);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
aout_sys_quotactl(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct aout_sys_quotactl_args *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
AOUT_CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
|
||||
|
||||
return sys_quotactl(p, v, retval);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
aout_sys_statfs(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct aout_sys_statfs_args *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
AOUT_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return sys_statfs(p, v, retval);
|
||||
}
|
||||
|
||||
|
||||
#if defined(NFS) || defined(NFSSERVER)
|
||||
int
|
||||
aout_sys_getfh(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct aout_sys_getfh_args *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
AOUT_CHECK_ALT_EXIST(p, &sg, SCARG(uap, fname));
|
||||
|
||||
return sys_getfh(p, v, retval);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
int
|
||||
aout_compat_12_sys_stat(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct aout_compat_12_sys_stat_args *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
AOUT_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return compat_12_sys_stat(p, v, retval);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
aout_compat_12_sys_lstat(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct aout_compat_12_sys_lstat_args *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
AOUT_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return compat_12_sys_lstat(p, v, retval);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
aout_sys_pathconf(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct aout_sys_pathconf_args *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
AOUT_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return sys_pathconf(p, v, retval);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
aout_sys_truncate(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct aout_sys_truncate_args *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
AOUT_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return sys_truncate(p, v, retval);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
aout_sys_undelete(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct aout_sys_undelete_args *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
AOUT_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return sys_undelete(p, v, retval);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
aout_sys___posix_rename(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct aout_sys___posix_rename_args *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
AOUT_CHECK_ALT_EXIST(p, &sg, SCARG(uap, from));
|
||||
AOUT_CHECK_ALT_CREAT(p, &sg, SCARG(uap, to));
|
||||
|
||||
return sys___posix_rename(p, v, retval);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
aout_sys_lchmod(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct aout_sys_lchmod_args *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
AOUT_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return sys_lchmod(p, v, retval);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
aout_sys_lchown(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct aout_sys_lchown_args *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
AOUT_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return sys_lchown(p, v, retval);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
aout_sys_lutimes(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct aout_sys_lutimes_args *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
AOUT_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return sys_lutimes(p, v, retval);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
aout_sys___posix_chown(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct aout_sys___posix_chown_args *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
AOUT_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return sys___posix_chown(p, v, retval);
|
||||
}
|
|
@ -0,0 +1,58 @@
|
|||
/* $NetBSD: aout_util.h,v 1.1 1999/02/11 09:41:34 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Christos Zoulas.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the NetBSD
|
||||
* Foundation, Inc. and its contributors.
|
||||
* 4. Neither the name of The NetBSD Foundation nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef _AOUT_UTIL_H_
|
||||
#define _AOUT_UTIL_H_
|
||||
|
||||
#include <compat/common/compat_util.h>
|
||||
|
||||
#ifdef DEBUG_AOUT
|
||||
#define DPRINTF(a) uprintf a;
|
||||
#else
|
||||
#define DPRINTF(a)
|
||||
#endif
|
||||
|
||||
extern const char aout_emul_path[];
|
||||
|
||||
#define AOUT_CHECK_ALT_EXIST(p, sgp, path) \
|
||||
CHECK_ALT_EXIST(p, sgp, aout_emul_path, path)
|
||||
|
||||
#define AOUT_CHECK_ALT_CREAT(p, sgp, path) \
|
||||
CHECK_ALT_CREAT(p, sgp, aout_emul_path, path)
|
||||
|
||||
#endif /* !_AOUT_UTIL_H_ */
|
|
@ -0,0 +1,12 @@
|
|||
# $NetBSD: files.aout,v 1.1 1999/02/11 09:41:34 christos Exp $
|
||||
#
|
||||
# Config file description for machine-independent SVR4 compat code.
|
||||
# Included by ports that need it.
|
||||
|
||||
# ports should define any machine-specific files they need in their
|
||||
# own file lists.
|
||||
|
||||
file compat/aout/aout_exec.c compat_aout
|
||||
file compat/aout/aout_misc.c compat_aout
|
||||
file compat/aout/aout_syscalls.c compat_aout
|
||||
file compat/aout/aout_sysent.c compat_aout
|
|
@ -0,0 +1,12 @@
|
|||
# $NetBSD: syscalls.conf,v 1.1 1999/02/11 09:41:34 christos Exp $
|
||||
|
||||
sysnames="aout_syscalls.c"
|
||||
sysnumhdr="aout_syscall.h"
|
||||
syssw="aout_sysent.c"
|
||||
sysarghdr="aout_syscallargs.h"
|
||||
compatopts=""
|
||||
libcompatopts=""
|
||||
|
||||
switchname="aout_sysent"
|
||||
namesname="aout_syscallnames"
|
||||
constprefix="AOUT_SYS_"
|
|
@ -0,0 +1,577 @@
|
|||
$NetBSD: syscalls.master,v 1.1 1999/02/11 09:41:34 christos Exp $
|
||||
|
||||
; @(#)syscalls.master 8.2 (Berkeley) 1/13/94
|
||||
|
||||
; NetBSD system call name/number "master" file.
|
||||
; (See syscalls.conf to see what it is processed into.)
|
||||
;
|
||||
; Fields: number type [type-dependent ...]
|
||||
; number system call number, must be in order
|
||||
; type one of STD, OBSOL, UNIMPL, NODEF, NOARGS, or one of
|
||||
; the compatibility options defined in syscalls.conf.
|
||||
;
|
||||
; types:
|
||||
; STD always included
|
||||
; OBSOL obsolete, not included in system
|
||||
; UNIMPL unimplemented, not included in system
|
||||
; NODEF included, but don't define the syscall number
|
||||
; NOARGS included, but don't define the syscall args structure
|
||||
; INDIR included, but don't define the syscall args structure,
|
||||
; and allow it to be "really" varargs.
|
||||
;
|
||||
; The compat options are defined in the syscalls.conf file, and the
|
||||
; compat option name is prefixed to the syscall name. Other than
|
||||
; that, they're like NODEF (for 'compat' options), or STD (for
|
||||
; 'libcompat' options).
|
||||
;
|
||||
; The type-dependent arguments are as follows:
|
||||
; For STD, NODEF, NOARGS, and compat syscalls:
|
||||
; { pseudo-proto } [alias]
|
||||
; For other syscalls:
|
||||
; [comment]
|
||||
;
|
||||
; #ifdef's, etc. may be included, and are copied to the output files.
|
||||
; #include's are copied to the syscall names and switch definition files only.
|
||||
|
||||
#include "opt_ktrace.h"
|
||||
#include "opt_nfsserver.h"
|
||||
#include "opt_compat_netbsd.h"
|
||||
#include "opt_sysv.h"
|
||||
#include "opt_compat_43.h"
|
||||
|
||||
#include "fs_lfs.h"
|
||||
#include "fs_nfs.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/signal.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/syscallargs.h>
|
||||
#include <compat/aout/aout_syscallargs.h>
|
||||
|
||||
; Reserved/unimplemented system calls in the range 0-150 inclusive
|
||||
; are reserved for use in future Berkeley releases.
|
||||
; Additional system calls implemented in vendor and other
|
||||
; redistributions should be placed in the reserved range at the end
|
||||
; of the current calls.
|
||||
|
||||
0 INDIR { int sys_syscall(int number, ...); }
|
||||
1 NOARGS { void sys_exit(int rval); }
|
||||
2 NOARGS { int sys_fork(void); }
|
||||
3 NOARGS { ssize_t sys_read(int fd, void *buf, size_t nbyte); }
|
||||
4 NOARGS { ssize_t sys_write(int fd, const void *buf, \
|
||||
size_t nbyte); }
|
||||
5 STD { int aout_sys_open(const char *path, \
|
||||
int flags, ... mode_t mode); }
|
||||
6 NOARGS { int sys_close(int fd); }
|
||||
7 NOARGS { int sys_wait4(int pid, int *status, int options, \
|
||||
struct rusage *rusage); }
|
||||
8 STD { int aout_sys_creat(const char *path, mode_t mode); } \
|
||||
ocreat
|
||||
9 STD { int aout_sys_link(const char *path, \
|
||||
const char *link); }
|
||||
10 STD { int aout_sys_unlink(const char *path); }
|
||||
11 OBSOL execv
|
||||
12 STD { int aout_sys_chdir(const char *path); }
|
||||
13 NOARGS { int sys_fchdir(int fd); }
|
||||
14 STD { int aout_sys_mknod(const char *path, mode_t mode, \
|
||||
dev_t dev); }
|
||||
15 STD { int aout_sys_chmod(const char *path, mode_t mode); }
|
||||
16 STD { int aout_sys_chown(const char *path, uid_t uid, \
|
||||
gid_t gid); }
|
||||
17 NOARGS { int sys_obreak(char *nsize); } break
|
||||
18 NOARGS { int sys_getfsstat(struct statfs *buf, long bufsize, \
|
||||
int flags); }
|
||||
19 NOARGS { long sys_lseek(int fd, long offset, int whence); } \
|
||||
olseek
|
||||
20 NOARGS { pid_t sys_getpid(void); }
|
||||
21 STD { int aout_sys_mount(const char *type, \
|
||||
const char *path, int flags, void *data); }
|
||||
22 STD { int aout_sys_unmount(const char *path, int flags); }
|
||||
23 NOARGS { int sys_setuid(uid_t uid); }
|
||||
24 NOARGS { uid_t sys_getuid(void); }
|
||||
25 NOARGS { uid_t sys_geteuid(void); }
|
||||
26 NOARGS { int sys_ptrace(int req, pid_t pid, caddr_t addr, \
|
||||
int data); }
|
||||
27 NOARGS { ssize_t sys_recvmsg(int s, struct msghdr *msg, \
|
||||
int flags); }
|
||||
28 NOARGS { ssize_t sys_sendmsg(int s, \
|
||||
const struct msghdr *msg, int flags); }
|
||||
29 NOARGS { ssize_t sys_recvfrom(int s, void *buf, size_t len, \
|
||||
int flags, struct sockaddr *from, \
|
||||
int *fromlenaddr); }
|
||||
30 NOARGS { int sys_accept(int s, struct sockaddr *name, \
|
||||
int *anamelen); }
|
||||
31 NOARGS { int sys_getpeername(int fdes, struct sockaddr *asa, \
|
||||
int *alen); }
|
||||
32 NOARGS { int sys_getsockname(int fdes, struct sockaddr *asa, \
|
||||
int *alen); }
|
||||
33 STD { int aout_sys_access(const char *path, int flags); }
|
||||
34 STD { int aout_sys_chflags(const char *path, \
|
||||
u_long flags); }
|
||||
35 NOARGS { int sys_fchflags(int fd, u_long flags); }
|
||||
36 NOARGS { void sys_sync(void); }
|
||||
37 NOARGS { int sys_kill(int pid, int signum); }
|
||||
38 STD { int aout_compat_43_sys_stat(const char *path, \
|
||||
struct stat43 *ub); } stat43
|
||||
39 NOARGS { pid_t sys_getppid(void); }
|
||||
40 STD { int aout_compat_43_sys_lstat(const char *path, \
|
||||
struct stat43 *ub); } lstat43
|
||||
41 NOARGS { int sys_dup(int fd); }
|
||||
42 NOARGS { int sys_pipe(void); }
|
||||
43 NOARGS { gid_t sys_getegid(void); }
|
||||
44 NOARGS { int sys_profil(caddr_t samples, size_t size, \
|
||||
u_long offset, u_int scale); }
|
||||
#ifdef KTRACE
|
||||
45 STD { int aout_sys_ktrace(const char *fname, int ops, \
|
||||
int facs, int pid); }
|
||||
#else
|
||||
45 UNIMPL ktrace
|
||||
#endif
|
||||
46 NOARGS { int compat_13_sys_sigaction(int signum, \
|
||||
const struct sigaction13 *nsa, \
|
||||
struct sigaction13 *osa); } sigaction13
|
||||
47 NOARGS { gid_t sys_getgid(void); }
|
||||
48 NOARGS { int compat_13_sys_sigprocmask(int how, \
|
||||
int mask); } sigprocmask13
|
||||
49 NOARGS { int sys___getlogin(char *namebuf, u_int namelen); }
|
||||
50 NOARGS { int sys_setlogin(const char *namebuf); }
|
||||
51 STD { int aout_sys_acct(const char *path); }
|
||||
52 NOARGS { int compat_13_sys_sigpending(void); } sigpending13
|
||||
53 NOARGS { int compat_13_sys_sigaltstack( \
|
||||
const struct sigaltstack13 *nss, \
|
||||
struct sigaltstack13 *oss); } sigaltstack13
|
||||
54 NOARGS { int sys_ioctl(int fd, \
|
||||
u_long com, ... void *data); }
|
||||
55 NOARGS { int compat_12_sys_reboot(int opt); } oreboot
|
||||
56 STD { int aout_sys_revoke(const char *path); }
|
||||
57 STD { int aout_sys_symlink(const char *path, \
|
||||
const char *link); }
|
||||
58 STD { int aout_sys_readlink(const char *path, char *buf, \
|
||||
size_t count); }
|
||||
59 STD { int aout_sys_execve(const char *path, \
|
||||
char * const *argp, char * const *envp); }
|
||||
60 NOARGS { mode_t sys_umask(mode_t newmask); }
|
||||
61 STD { int aout_sys_chroot(const char *path); }
|
||||
62 NOARGS { int compat_43_sys_fstat(int fd, \
|
||||
struct stat43 *sb); } fstat43
|
||||
63 NOARGS { int compat_43_sys_getkerninfo(int op, char *where, \
|
||||
int *size, int arg); } ogetkerninfo
|
||||
64 NOARGS { int compat_43_sys_getpagesize(void); } ogetpagesize
|
||||
65 NOARGS { int compat_12_sys_msync(caddr_t addr, size_t len); }
|
||||
; XXX COMPAT_??? for 4.4BSD-compatible vfork(2)?
|
||||
66 NOARGS { int sys_vfork(void); }
|
||||
67 OBSOL vread
|
||||
68 OBSOL vwrite
|
||||
69 NOARGS { int sys_sbrk(int incr); }
|
||||
70 NOARGS { int sys_sstk(int incr); }
|
||||
71 NOARGS { int compat_43_sys_mmap(caddr_t addr, size_t len, \
|
||||
int prot, int flags, int fd, long pos); } ommap
|
||||
72 NOARGS { int sys_ovadvise(int anom); } vadvise
|
||||
73 NOARGS { int sys_munmap(void *addr, size_t len); }
|
||||
74 NOARGS { int sys_mprotect(void *addr, size_t len, \
|
||||
int prot); }
|
||||
75 NOARGS { int sys_madvise(void *addr, size_t len, \
|
||||
int behav); }
|
||||
76 OBSOL vhangup
|
||||
77 OBSOL vlimit
|
||||
78 NOARGS { int sys_mincore(caddr_t addr, size_t len, \
|
||||
char *vec); }
|
||||
79 NOARGS { int sys_getgroups(int gidsetsize, \
|
||||
gid_t *gidset); }
|
||||
80 NOARGS { int sys_setgroups(int gidsetsize, \
|
||||
const gid_t *gidset); }
|
||||
81 NOARGS { int sys_getpgrp(void); }
|
||||
82 NOARGS { int sys_setpgid(int pid, int pgid); }
|
||||
83 NOARGS { int sys_setitimer(int which, \
|
||||
const struct itimerval *itv, \
|
||||
struct itimerval *oitv); }
|
||||
84 NOARGS { int compat_43_sys_wait(void); } owait
|
||||
85 NOARGS { int compat_12_sys_swapon(const char *name); } oswapon
|
||||
86 NOARGS { int sys_getitimer(int which, \
|
||||
struct itimerval *itv); }
|
||||
87 NOARGS { int compat_43_sys_gethostname(char *hostname, \
|
||||
u_int len); } ogethostname
|
||||
88 NOARGS { int compat_43_sys_sethostname(char *hostname, \
|
||||
u_int len); } osethostname
|
||||
89 NOARGS { int compat_43_sys_getdtablesize(void); } \
|
||||
ogetdtablesize
|
||||
90 NOARGS { int sys_dup2(int from, int to); }
|
||||
91 UNIMPL getdopt
|
||||
92 NOARGS { int sys_fcntl(int fd, int cmd, ... void *arg); }
|
||||
93 NOARGS { int sys_select(int nd, fd_set *in, fd_set *ou, \
|
||||
fd_set *ex, struct timeval *tv); }
|
||||
94 UNIMPL setdopt
|
||||
95 NOARGS { int sys_fsync(int fd); }
|
||||
96 NOARGS { int sys_setpriority(int which, int who, int prio); }
|
||||
97 NOARGS { int sys_socket(int domain, int type, int protocol); }
|
||||
98 NOARGS { int sys_connect(int s, const struct sockaddr *name, \
|
||||
int namelen); }
|
||||
99 NOARGS { int compat_43_sys_accept(int s, caddr_t name, \
|
||||
int *anamelen); } oaccept
|
||||
100 NOARGS { int sys_getpriority(int which, int who); }
|
||||
101 NOARGS { int compat_43_sys_send(int s, caddr_t buf, int len, \
|
||||
int flags); } osend
|
||||
102 NOARGS { int compat_43_sys_recv(int s, caddr_t buf, int len, \
|
||||
int flags); } orecv
|
||||
103 NOARGS { int compat_13_sys_sigreturn( \
|
||||
struct sigcontext13 *sigcntxp); } sigreturn13
|
||||
104 NOARGS { int sys_bind(int s, const struct sockaddr *name, \
|
||||
int namelen); }
|
||||
105 NOARGS { int sys_setsockopt(int s, int level, int name, \
|
||||
const void *val, int valsize); }
|
||||
106 NOARGS { int sys_listen(int s, int backlog); }
|
||||
107 OBSOL vtimes
|
||||
108 NOARGS { int compat_43_sys_sigvec(int signum, \
|
||||
struct sigvec *nsv, struct sigvec *osv); } osigvec
|
||||
109 NOARGS { int compat_43_sys_sigblock(int mask); } osigblock
|
||||
110 NOARGS { int compat_43_sys_sigsetmask(int mask); } osigsetmask
|
||||
111 NOARGS { int compat_13_sys_sigsuspend(int mask); } sigsuspend13
|
||||
112 NOARGS { int compat_43_sys_sigstack(struct sigstack *nss, \
|
||||
struct sigstack *oss); } osigstack
|
||||
113 NOARGS { int compat_43_sys_recvmsg(int s, \
|
||||
struct omsghdr *msg, int flags); } orecvmsg
|
||||
114 NOARGS { int compat_43_sys_sendmsg(int s, caddr_t msg, \
|
||||
int flags); } osendmsg
|
||||
#ifdef TRACE
|
||||
115 NOARGS { int sys_vtrace(int request, int value); }
|
||||
#else
|
||||
115 OBSOL vtrace
|
||||
#endif
|
||||
116 NOARGS { int sys_gettimeofday(struct timeval *tp, \
|
||||
struct timezone *tzp); }
|
||||
117 NOARGS { int sys_getrusage(int who, struct rusage *rusage); }
|
||||
118 NOARGS { int sys_getsockopt(int s, int level, int name, \
|
||||
void *val, int *avalsize); }
|
||||
119 OBSOL resuba
|
||||
120 NOARGS { ssize_t sys_readv(int fd, \
|
||||
const struct iovec *iovp, int iovcnt); }
|
||||
121 NOARGS { ssize_t sys_writev(int fd, \
|
||||
const struct iovec *iovp, int iovcnt); }
|
||||
122 NOARGS { int sys_settimeofday(const struct timeval *tv, \
|
||||
const struct timezone *tzp); }
|
||||
123 NOARGS { int sys_fchown(int fd, uid_t uid, gid_t gid); }
|
||||
124 NOARGS { int sys_fchmod(int fd, mode_t mode); }
|
||||
125 NOARGS { int compat_43_sys_recvfrom(int s, caddr_t buf, \
|
||||
size_t len, int flags, caddr_t from, \
|
||||
int *fromlenaddr); } orecvfrom
|
||||
126 NOARGS { int sys_setreuid(uid_t ruid, uid_t euid); }
|
||||
127 NOARGS { int sys_setregid(gid_t rgid, gid_t egid); }
|
||||
128 STD { int aout_sys_rename(const char *from, \
|
||||
const char *to); }
|
||||
129 STD { int aout_compat_43_sys_truncate(const char *path, \
|
||||
long length); } otruncate
|
||||
130 NOARGS { int compat_43_sys_ftruncate(int fd, long length); } \
|
||||
oftruncate
|
||||
131 NOARGS { int sys_flock(int fd, int how); }
|
||||
132 STD { int aout_sys_mkfifo(const char *path, mode_t mode); }
|
||||
133 NOARGS { ssize_t sys_sendto(int s, const void *buf, \
|
||||
size_t len, int flags, const struct sockaddr *to, \
|
||||
int tolen); }
|
||||
134 NOARGS { int sys_shutdown(int s, int how); }
|
||||
135 NOARGS { int sys_socketpair(int domain, int type, \
|
||||
int protocol, int *rsv); }
|
||||
136 STD { int aout_sys_mkdir(const char *path, mode_t mode); }
|
||||
137 STD { int aout_sys_rmdir(const char *path); }
|
||||
138 STD { int aout_sys_utimes(const char *path, \
|
||||
const struct timeval *tptr); }
|
||||
139 OBSOL 4.2 sigreturn
|
||||
140 NOARGS { int sys_adjtime(const struct timeval *delta, \
|
||||
struct timeval *olddelta); }
|
||||
141 NOARGS { int compat_43_sys_getpeername(int fdes, caddr_t asa, \
|
||||
int *alen); } ogetpeername
|
||||
142 NOARGS { int32_t compat_43_sys_gethostid(void); } ogethostid
|
||||
143 NOARGS { int compat_43_sys_sethostid(int32_t hostid); } \
|
||||
osethostid
|
||||
144 NOARGS { int compat_43_sys_getrlimit(int which, \
|
||||
struct orlimit *rlp); } ogetrlimit
|
||||
145 NOARGS { int compat_43_sys_setrlimit(int which, \
|
||||
const struct orlimit *rlp); } osetrlimit
|
||||
146 NOARGS { int compat_43_sys_killpg(int pgid, int signum); } \
|
||||
okillpg
|
||||
147 NOARGS { int sys_setsid(void); }
|
||||
148 STD { int aout_sys_quotactl(const char *path, \
|
||||
int cmd, int uid, caddr_t arg); }
|
||||
149 NOARGS { int compat_43_sys_quota(void); } oquota
|
||||
150 NOARGS { int compat_43_sys_getsockname(int fdec, caddr_t asa, \
|
||||
int *alen); } ogetsockname
|
||||
; Syscalls 151-180 inclusive are reserved for vendor-specific
|
||||
; system calls. (This includes various calls added for compatibity
|
||||
; with other Unix variants.)
|
||||
; Some of these calls are now supported by BSD...
|
||||
151 UNIMPL
|
||||
152 UNIMPL
|
||||
153 UNIMPL
|
||||
154 UNIMPL
|
||||
#if defined(NFS) || defined(NFSSERVER)
|
||||
155 NOARGS { int sys_nfssvc(int flag, void *argp); }
|
||||
#else
|
||||
155 UNIMPL
|
||||
#endif
|
||||
156 NOARGS { int compat_43_sys_getdirentries(int fd, char *buf, \
|
||||
u_int count, long *basep); } ogetdirentries
|
||||
157 STD { int aout_sys_statfs(const char *path, \
|
||||
struct statfs *buf); }
|
||||
158 NOARGS { int sys_fstatfs(int fd, struct statfs *buf); }
|
||||
159 UNIMPL
|
||||
160 UNIMPL
|
||||
#if defined(NFS) || defined(NFSSERVER)
|
||||
161 STD { int aout_sys_getfh(const char *fname, \
|
||||
fhandle_t *fhp); }
|
||||
#else
|
||||
161 UNIMPL getfh
|
||||
#endif
|
||||
162 NOARGS { int compat_09_sys_getdomainname(char *domainname, \
|
||||
int len); } ogetdomainname
|
||||
163 NOARGS { int compat_09_sys_setdomainname(char *domainname, \
|
||||
int len); } osetdomainname
|
||||
164 NOARGS { int compat_09_sys_uname(struct outsname *name); } \
|
||||
ouname
|
||||
165 NOARGS { int sys_sysarch(int op, void *parms); }
|
||||
166 UNIMPL
|
||||
167 UNIMPL
|
||||
168 UNIMPL
|
||||
; XXX more generally, never on machines where sizeof(void *) != sizeof(int)
|
||||
#if defined(SYSVSEM) && !defined(alpha)
|
||||
169 NOARGS { int compat_10_sys_semsys(int which, int a2, int a3, \
|
||||
int a4, int a5); } osemsys
|
||||
#else
|
||||
169 UNIMPL 1.0 semsys
|
||||
#endif
|
||||
; XXX more generally, never on machines where sizeof(void *) != sizeof(int)
|
||||
#if defined(SYSVMSG) && !defined(alpha)
|
||||
170 NOARGS { int compat_10_sys_msgsys(int which, int a2, int a3, \
|
||||
int a4, int a5, int a6); } omsgsys
|
||||
#else
|
||||
170 UNIMPL 1.0 msgsys
|
||||
#endif
|
||||
; XXX more generally, never on machines where sizeof(void *) != sizeof(int)
|
||||
#if defined(SYSVSHM) && !defined(alpha)
|
||||
171 NOARGS { int compat_10_sys_shmsys(int which, int a2, int a3, \
|
||||
int a4); } oshmsys
|
||||
#else
|
||||
171 UNIMPL 1.0 shmsys
|
||||
#endif
|
||||
172 UNIMPL
|
||||
173 NOARGS { ssize_t sys_pread(int fd, void *buf, \
|
||||
size_t nbyte, int pad, off_t offset); }
|
||||
174 NOARGS { ssize_t sys_pwrite(int fd, const void *buf, \
|
||||
size_t nbyte, int pad, off_t offset); }
|
||||
175 NOARGS { int sys_ntp_gettime(struct ntptimeval *ntvp); }
|
||||
176 NOARGS { int sys_ntp_adjtime(struct timex *tp); }
|
||||
177 UNIMPL
|
||||
178 UNIMPL
|
||||
179 UNIMPL
|
||||
180 UNIMPL
|
||||
|
||||
; Syscalls 180-199 are used by/reserved for BSD
|
||||
181 NOARGS { int sys_setgid(gid_t gid); }
|
||||
182 NOARGS { int sys_setegid(gid_t egid); }
|
||||
183 NOARGS { int sys_seteuid(uid_t euid); }
|
||||
#ifdef LFS
|
||||
184 NOARGS { int lfs_bmapv(fsid_t *fsidp, \
|
||||
struct block_info *blkiov, int blkcnt); }
|
||||
185 NOARGS { int lfs_markv(fsid_t *fsidp, \
|
||||
struct block_info *blkiov, int blkcnt); }
|
||||
186 NOARGS { int lfs_segclean(fsid_t *fsidp, u_long segment); }
|
||||
187 NOARGS { int lfs_segwait(fsid_t *fsidp, struct timeval *tv); }
|
||||
#else
|
||||
184 UNIMPL
|
||||
185 UNIMPL
|
||||
186 UNIMPL
|
||||
187 UNIMPL
|
||||
#endif
|
||||
188 STD { int aout_compat_12_sys_stat(const char *path, \
|
||||
struct stat12 *ub); } stat12
|
||||
189 NOARGS { int compat_12_sys_fstat(int fd, struct stat12 *sb); } fstat12
|
||||
190 STD { int aout_compat_12_sys_lstat(const char *path, \
|
||||
struct stat12 *ub); } lstat12
|
||||
191 STD { long aout_sys_pathconf(const char *path, int name); }
|
||||
192 NOARGS { long sys_fpathconf(int fd, int name); }
|
||||
193 UNIMPL
|
||||
194 NOARGS { int sys_getrlimit(int which, \
|
||||
struct rlimit *rlp); }
|
||||
195 NOARGS { int sys_setrlimit(int which, \
|
||||
const struct rlimit *rlp); }
|
||||
196 NOARGS { int compat_12_sys_getdirentries(int fd, char *buf, \
|
||||
u_int count, long *basep); }
|
||||
197 NOARGS { void *sys_mmap(void *addr, size_t len, int prot, \
|
||||
int flags, int fd, long pad, off_t pos); }
|
||||
198 INDIR { quad_t sys___syscall(quad_t num, ...); }
|
||||
199 NOARGS { off_t sys_lseek(int fd, int pad, off_t offset, \
|
||||
int whence); }
|
||||
200 STD { int aout_sys_truncate(const char *path, int pad, \
|
||||
off_t length); }
|
||||
201 NOARGS { int sys_ftruncate(int fd, int pad, off_t length); }
|
||||
202 NOARGS { int sys___sysctl(int *name, u_int namelen, \
|
||||
void *old, size_t *oldlenp, void *new, \
|
||||
size_t newlen); }
|
||||
203 NOARGS { int sys_mlock(const void *addr, size_t len); }
|
||||
204 NOARGS { int sys_munlock(const void *addr, size_t len); }
|
||||
205 STD { int aout_sys_undelete(const char *path); }
|
||||
206 NOARGS { int sys_futimes(int fd, \
|
||||
const struct timeval *tptr); }
|
||||
207 NOARGS { pid_t sys_getpgid(pid_t pid); }
|
||||
208 NOARGS { int sys_reboot(int opt, char *bootstr); }
|
||||
209 NOARGS { int sys_poll(struct pollfd *fds, u_int nfds, \
|
||||
int timeout); }
|
||||
;
|
||||
; Syscalls 210-219 are reserved for dynamically loaded syscalls
|
||||
;
|
||||
#ifdef LKM
|
||||
210 NODEF { int sys_lkmnosys(void); }
|
||||
211 NODEF { int sys_lkmnosys(void); }
|
||||
212 NODEF { int sys_lkmnosys(void); }
|
||||
213 NODEF { int sys_lkmnosys(void); }
|
||||
214 NODEF { int sys_lkmnosys(void); }
|
||||
215 NODEF { int sys_lkmnosys(void); }
|
||||
216 NODEF { int sys_lkmnosys(void); }
|
||||
217 NODEF { int sys_lkmnosys(void); }
|
||||
218 NODEF { int sys_lkmnosys(void); }
|
||||
219 NODEF { int sys_lkmnosys(void); }
|
||||
#else /* !LKM */
|
||||
210 UNIMPL
|
||||
211 UNIMPL
|
||||
212 UNIMPL
|
||||
213 UNIMPL
|
||||
214 UNIMPL
|
||||
215 UNIMPL
|
||||
216 UNIMPL
|
||||
217 UNIMPL
|
||||
218 UNIMPL
|
||||
219 UNIMPL
|
||||
#endif /* !LKM */
|
||||
; System calls 220-300 are reserved for use by NetBSD
|
||||
#ifdef SYSVSEM
|
||||
220 NOARGS { int sys___semctl(int semid, int semnum, int cmd, \
|
||||
union semun *arg); }
|
||||
221 NOARGS { int sys_semget(key_t key, int nsems, int semflg); }
|
||||
222 NOARGS { int sys_semop(int semid, struct sembuf *sops, \
|
||||
size_t nsops); }
|
||||
223 NOARGS { int sys_semconfig(int flag); }
|
||||
#else
|
||||
220 UNIMPL semctl
|
||||
221 UNIMPL semget
|
||||
222 UNIMPL semop
|
||||
223 UNIMPL semconfig
|
||||
#endif
|
||||
#ifdef SYSVMSG
|
||||
224 NOARGS { int sys_msgctl(int msqid, int cmd, \
|
||||
struct msqid_ds *buf); }
|
||||
225 NOARGS { int sys_msgget(key_t key, int msgflg); }
|
||||
226 NOARGS { int sys_msgsnd(int msqid, const void *msgp, \
|
||||
size_t msgsz, int msgflg); }
|
||||
227 NOARGS { ssize_t sys_msgrcv(int msqid, void *msgp, \
|
||||
size_t msgsz, long msgtyp, int msgflg); }
|
||||
#else
|
||||
224 UNIMPL msgctl
|
||||
225 UNIMPL msgget
|
||||
226 UNIMPL msgsnd
|
||||
227 UNIMPL msgrcv
|
||||
#endif
|
||||
#ifdef SYSVSHM
|
||||
228 NOARGS { void *sys_shmat(int shmid, const void *shmaddr, \
|
||||
int shmflg); }
|
||||
229 NOARGS { int sys_shmctl(int shmid, int cmd, \
|
||||
struct shmid_ds *buf); }
|
||||
230 NOARGS { int sys_shmdt(const void *shmaddr); }
|
||||
231 NOARGS { int sys_shmget(key_t key, size_t size, int shmflg); }
|
||||
#else
|
||||
228 UNIMPL shmat
|
||||
229 UNIMPL shmctl
|
||||
230 UNIMPL shmdt
|
||||
231 UNIMPL shmget
|
||||
#endif
|
||||
232 NOARGS { int sys_clock_gettime(clockid_t clock_id, \
|
||||
struct timespec *tp); }
|
||||
233 NOARGS { int sys_clock_settime(clockid_t clock_id, \
|
||||
const struct timespec *tp); }
|
||||
234 NOARGS { int sys_clock_getres(clockid_t clock_id, \
|
||||
struct timespec *tp); }
|
||||
235 UNIMPL timer_create
|
||||
236 UNIMPL timer_delete
|
||||
237 UNIMPL timer_settime
|
||||
238 UNIMPL timer_gettime
|
||||
239 UNIMPL timer_getoverrun
|
||||
;
|
||||
; Syscalls 240-269 are reserved for other IEEE Std1003.1b syscalls
|
||||
;
|
||||
240 NOARGS { int sys_nanosleep(const struct timespec *rqtp, \
|
||||
struct timespec *rmtp); }
|
||||
241 NOARGS { int sys_fdatasync(int fd); }
|
||||
242 UNIMPL
|
||||
243 UNIMPL
|
||||
244 UNIMPL
|
||||
245 UNIMPL
|
||||
246 UNIMPL
|
||||
247 UNIMPL
|
||||
248 UNIMPL
|
||||
249 UNIMPL
|
||||
250 UNIMPL
|
||||
251 UNIMPL
|
||||
252 UNIMPL
|
||||
253 UNIMPL
|
||||
254 UNIMPL
|
||||
255 UNIMPL
|
||||
256 UNIMPL
|
||||
257 UNIMPL
|
||||
258 UNIMPL
|
||||
259 UNIMPL
|
||||
260 UNIMPL
|
||||
261 UNIMPL
|
||||
262 UNIMPL
|
||||
263 UNIMPL
|
||||
264 UNIMPL
|
||||
265 UNIMPL
|
||||
266 UNIMPL
|
||||
267 UNIMPL
|
||||
268 UNIMPL
|
||||
269 UNIMPL
|
||||
270 STD { int aout_sys___posix_rename(const char *from, \
|
||||
const char *to); }
|
||||
271 NOARGS { int sys_swapctl(int cmd, const void *arg, int misc); }
|
||||
272 NOARGS { int sys_getdents(int fd, char *buf, size_t count); }
|
||||
273 NOARGS { int sys_minherit(void *addr, size_t len, \
|
||||
int inherit); }
|
||||
274 STD { int aout_sys_lchmod(const char *path, mode_t mode); }
|
||||
275 STD { int aout_sys_lchown(const char *path, uid_t uid, \
|
||||
gid_t gid); }
|
||||
276 STD { int aout_sys_lutimes(const char *path, \
|
||||
const struct timeval *tptr); }
|
||||
277 NOARGS { int sys___msync13(void *addr, size_t len, int flags); }
|
||||
278 NOARGS { int sys___stat13(const char *path, struct stat *ub); }
|
||||
279 NOARGS { int sys___fstat13(int fd, struct stat *sb); }
|
||||
280 NOARGS { int sys___lstat13(const char *path, struct stat *ub); }
|
||||
281 NOARGS { int sys___sigaltstack14( \
|
||||
const struct sigaltstack *nss, \
|
||||
struct sigaltstack *oss); }
|
||||
282 NOARGS { int sys___vfork14(void); }
|
||||
283 STD { int aout_sys___posix_chown(const char *path, \
|
||||
uid_t uid, gid_t gid); }
|
||||
284 NOARGS { int sys___posix_fchown(int fd, uid_t uid, \
|
||||
gid_t gid); }
|
||||
285 NOARGS { int sys___posix_lchown(const char *path, uid_t uid, \
|
||||
gid_t gid); }
|
||||
286 NOARGS { pid_t sys_getsid(pid_t pid); }
|
||||
287 UNIMPL
|
||||
#ifdef KTRACE
|
||||
288 NOARGS { int sys_fktrace(const int fd, int ops, \
|
||||
int facs, int pid); }
|
||||
#else
|
||||
288 UNIMPL
|
||||
#endif
|
||||
289 NOARGS { ssize_t sys_preadv(int fd, \
|
||||
const struct iovec *iovp, int iovcnt, \
|
||||
int pad, off_t offset); }
|
||||
290 NOARGS { ssize_t sys_pwritev(int fd, \
|
||||
const struct iovec *iovp, int iovcnt, \
|
||||
int pad, off_t offset); }
|
||||
291 NOARGS { int sys___sigaction14(int signum, \
|
||||
const struct sigaction *nsa, \
|
||||
struct sigaction *osa); }
|
||||
292 NOARGS { int sys___sigpending14(sigset_t *set); }
|
||||
293 NOARGS { int sys___sigprocmask14(int how, \
|
||||
const sigset_t *set, \
|
||||
sigset_t *oset); }
|
||||
294 NOARGS { int sys___sigsuspend14(const sigset_t *set); }
|
||||
295 NOARGS { int sys___sigreturn14(struct sigcontext *sigcntxp); }
|
Loading…
Reference in New Issue