add e_path (emulation path) to struct emul, which replaces emulation-specific
*_emul_path variables change macros CHECK_ALT_{CREAT|EXIST} to use that, 'root' doesn't need to be passed explicitly any more and *_CHECK_ALT_{CREAT|EXIST} are removed change explicit emul_find() calls in probe functions to get the emulation path from the checked exec switch entry's emulation remove no longer needed header files add e_flags and e_syscall to struct emul; these are unsed and empty for now
This commit is contained in:
parent
b234617a20
commit
01040d97a2
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: aout_exec.c,v 1.4 2000/11/21 00:37:52 jdolecek Exp $ */
|
||||
/* $NetBSD: aout_exec.c,v 1.5 2000/12/01 12:28:31 jdolecek Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -46,7 +46,6 @@
|
|||
|
||||
#include <compat/aout/aout_syscall.h>
|
||||
|
||||
const char aout_emul_path[] = "/emul/aout";
|
||||
extern struct sysent aout_sysent[];
|
||||
#ifdef SYSCALL_DEBUG
|
||||
extern const char * const aout_syscallnames[];
|
||||
|
@ -56,6 +55,7 @@ extern char sigcode[], esigcode[];
|
|||
|
||||
struct emul emul_netbsd_aout = {
|
||||
"netbsd",
|
||||
"/emul/aout",
|
||||
NULL,
|
||||
sendsig,
|
||||
AOUT_SYS_syscall,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: aout_misc.c,v 1.3 1999/03/15 23:50:07 thorpej Exp $ */
|
||||
/* $NetBSD: aout_misc.c,v 1.4 2000/12/01 12:28:31 jdolecek Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -54,7 +54,7 @@
|
|||
#include <sys/syscall.h>
|
||||
#include <sys/syscallargs.h>
|
||||
|
||||
#include <compat/aout/aout_util.h>
|
||||
#include <compat/common/compat_util.h>
|
||||
#include <compat/aout/aout_syscall.h>
|
||||
#include <compat/aout/aout_syscallargs.h>
|
||||
|
||||
|
@ -69,10 +69,10 @@ aout_sys_open(p, v, retval)
|
|||
|
||||
#if 0
|
||||
if (SCARG(uap, flags) & O_CREAT)
|
||||
AOUT_CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
|
||||
else
|
||||
#endif
|
||||
AOUT_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return sys_open(p, v, retval);
|
||||
}
|
||||
|
@ -88,7 +88,7 @@ aout_sys_creat(p, v, 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));
|
||||
CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
|
||||
#endif
|
||||
|
||||
return compat_43_sys_creat(p, v, retval);
|
||||
|
@ -104,9 +104,9 @@ aout_sys_link(p, v, 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));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
#if 0
|
||||
AOUT_CHECK_ALT_CREAT(p, &sg, SCARG(uap, link));
|
||||
CHECK_ALT_CREAT(p, &sg, SCARG(uap, link));
|
||||
#endif
|
||||
|
||||
return sys_link(p, v, retval);
|
||||
|
@ -122,7 +122,7 @@ aout_sys_unlink(p, v, 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));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return sys_unlink(p, v, retval);
|
||||
}
|
||||
|
@ -137,7 +137,7 @@ aout_sys_chdir(p, v, 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));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return sys_chdir(p, v, retval);
|
||||
}
|
||||
|
@ -153,7 +153,7 @@ aout_sys_mknod(p, v, 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));
|
||||
CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
|
||||
#endif
|
||||
|
||||
return sys_mknod(p, v, retval);
|
||||
|
@ -169,7 +169,7 @@ aout_sys_chmod(p, v, 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));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return sys_chmod(p, v, retval);
|
||||
}
|
||||
|
@ -184,7 +184,7 @@ aout_sys_chown(p, v, 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));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return sys_chown(p, v, retval);
|
||||
}
|
||||
|
@ -204,7 +204,7 @@ aout_sys_mount(p, v, 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));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
#endif
|
||||
|
||||
return sys_mount(p, v, retval);
|
||||
|
@ -220,7 +220,7 @@ aout_sys_unmount(p, v, 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));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return sys_unmount(p, v, retval);
|
||||
}
|
||||
|
@ -235,7 +235,7 @@ aout_sys_access(p, v, 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));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return sys_access(p, v, retval);
|
||||
}
|
||||
|
@ -250,7 +250,7 @@ aout_sys_chflags(p, v, 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));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return sys_chflags(p, v, retval);
|
||||
}
|
||||
|
@ -265,7 +265,7 @@ aout_compat_43_sys_stat(p, v, 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));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return compat_43_sys_stat(p, v, retval);
|
||||
}
|
||||
|
@ -280,7 +280,7 @@ aout_compat_43_sys_lstat(p, v, 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));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return compat_43_sys_lstat(p, v, retval);
|
||||
}
|
||||
|
@ -296,7 +296,7 @@ aout_sys_ktrace(p, v, 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));
|
||||
CHECK_ALT_CREAT(p, &sg, SCARG(uap, fname));
|
||||
#endif
|
||||
|
||||
return sys_ktrace(p, v, retval);
|
||||
|
@ -314,7 +314,7 @@ aout_sys_acct(p, v, 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));
|
||||
CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
|
||||
#endif
|
||||
|
||||
return sys_acct(p, v, retval);
|
||||
|
@ -330,7 +330,7 @@ aout_sys_revoke(p, v, 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));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return sys_revoke(p, v, retval);
|
||||
}
|
||||
|
@ -345,9 +345,9 @@ aout_sys_symlink(p, v, 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));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
#if 0
|
||||
AOUT_CHECK_ALT_CREAT(p, &sg, SCARG(uap, link));
|
||||
CHECK_ALT_CREAT(p, &sg, SCARG(uap, link));
|
||||
#endif
|
||||
|
||||
return sys_symlink(p, v, retval);
|
||||
|
@ -363,7 +363,7 @@ aout_sys_readlink(p, v, 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));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return sys_readlink(p, v, retval);
|
||||
}
|
||||
|
@ -378,7 +378,7 @@ aout_sys_execve(p, v, 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));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return sys_execve(p, v, retval);
|
||||
}
|
||||
|
@ -393,7 +393,7 @@ aout_sys_chroot(p, v, 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));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return sys_chroot(p, v, retval);
|
||||
}
|
||||
|
@ -408,9 +408,9 @@ aout_sys_rename(p, v, 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));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, from));
|
||||
#if 0
|
||||
AOUT_CHECK_ALT_CREAT(p, &sg, SCARG(uap, to));
|
||||
CHECK_ALT_CREAT(p, &sg, SCARG(uap, to));
|
||||
#endif
|
||||
|
||||
return sys_rename(p, v, retval);
|
||||
|
@ -426,7 +426,7 @@ aout_compat_43_sys_truncate(p, v, 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));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return compat_43_sys_truncate(p, v, retval);
|
||||
}
|
||||
|
@ -442,7 +442,7 @@ aout_sys_mkfifo(p, v, 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));
|
||||
CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
|
||||
#endif
|
||||
|
||||
return sys_mkfifo(p, v, retval);
|
||||
|
@ -459,7 +459,7 @@ aout_sys_mkdir(p, v, 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));
|
||||
CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
|
||||
#endif
|
||||
|
||||
return sys_mkdir(p, v, retval);
|
||||
|
@ -475,7 +475,7 @@ aout_sys_rmdir(p, v, 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));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return sys_rmdir(p, v, retval);
|
||||
}
|
||||
|
@ -490,7 +490,7 @@ aout_sys_utimes(p, v, 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));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return sys_utimes(p, v, retval);
|
||||
}
|
||||
|
@ -506,7 +506,7 @@ aout_sys_quotactl(p, v, 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));
|
||||
CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
|
||||
#endif
|
||||
|
||||
return sys_quotactl(p, v, retval);
|
||||
|
@ -522,7 +522,7 @@ aout_sys_statfs(p, v, 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));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return sys_statfs(p, v, retval);
|
||||
}
|
||||
|
@ -538,7 +538,7 @@ aout_sys_getfh(p, v, 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));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, fname));
|
||||
|
||||
return sys_getfh(p, v, retval);
|
||||
}
|
||||
|
@ -554,7 +554,7 @@ aout_compat_12_sys_stat(p, v, 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));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return compat_12_sys_stat(p, v, retval);
|
||||
}
|
||||
|
@ -569,7 +569,7 @@ aout_compat_12_sys_lstat(p, v, 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));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return compat_12_sys_lstat(p, v, retval);
|
||||
}
|
||||
|
@ -584,7 +584,7 @@ aout_sys_pathconf(p, v, 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));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return sys_pathconf(p, v, retval);
|
||||
}
|
||||
|
@ -599,7 +599,7 @@ aout_sys_truncate(p, v, 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));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return sys_truncate(p, v, retval);
|
||||
}
|
||||
|
@ -614,7 +614,7 @@ aout_sys_undelete(p, v, 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));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return sys_undelete(p, v, retval);
|
||||
}
|
||||
|
@ -629,9 +629,9 @@ aout_sys___posix_rename(p, v, 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));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, from));
|
||||
#if 0
|
||||
AOUT_CHECK_ALT_CREAT(p, &sg, SCARG(uap, to));
|
||||
CHECK_ALT_CREAT(p, &sg, SCARG(uap, to));
|
||||
#endif
|
||||
|
||||
return sys___posix_rename(p, v, retval);
|
||||
|
@ -647,7 +647,7 @@ aout_sys_lchmod(p, v, 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));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return sys_lchmod(p, v, retval);
|
||||
}
|
||||
|
@ -662,7 +662,7 @@ aout_sys_lchown(p, v, 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));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return sys_lchown(p, v, retval);
|
||||
}
|
||||
|
@ -677,7 +677,7 @@ aout_sys_lutimes(p, v, 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));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return sys_lutimes(p, v, retval);
|
||||
}
|
||||
|
@ -692,7 +692,7 @@ aout_sys___posix_chown(p, v, 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));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return sys___posix_chown(p, v, retval);
|
||||
}
|
||||
|
|
|
@ -1,58 +0,0 @@
|
|||
/* $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_ */
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: compat_util.h,v 1.7 2000/11/20 20:23:07 jdolecek Exp $ */
|
||||
/* $NetBSD: compat_util.h,v 1.8 2000/12/01 12:28:31 jdolecek Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1994 The NetBSD Foundation, Inc.
|
||||
|
@ -87,10 +87,10 @@ unsigned long emul_flags_translate(const struct emul_flags_xtab *tab,
|
|||
|
||||
void compat_offseterr __P((struct vnode *, char *msg));
|
||||
|
||||
#define CHECK_ALT_EXIST(p, sgp, root, path) \
|
||||
emul_find(p, sgp, root, path, &(path), 0)
|
||||
#define CHECK_ALT_EXIST(p, sgp, path) \
|
||||
emul_find(p, sgp, p->p_emul->e_path, path, &(path), 0)
|
||||
|
||||
#define CHECK_ALT_CREAT(p, sgp, root, path) \
|
||||
emul_find(p, sgp, root, path, &(path), 1)
|
||||
#define CHECK_ALT_CREAT(p, sgp, path) \
|
||||
emul_find(p, sgp, p->p_emul->e_path, path, &(path), 1)
|
||||
|
||||
#endif /* !_COMPAT_UTIL_H_ */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: freebsd_exec.c,v 1.8 2000/11/21 00:37:53 jdolecek Exp $ */
|
||||
/* $NetBSD: freebsd_exec.c,v 1.9 2000/12/01 12:28:31 jdolecek Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1993, 1994 Christopher G. Demetriou
|
||||
|
@ -49,7 +49,7 @@
|
|||
#include <machine/freebsd_machdep.h>
|
||||
|
||||
#include <compat/freebsd/freebsd_exec.h>
|
||||
#include <compat/freebsd/freebsd_util.h>
|
||||
#include <compat/common/compat_util.h>
|
||||
|
||||
#include <compat/freebsd/freebsd_syscall.h>
|
||||
|
||||
|
@ -58,6 +58,7 @@ extern const char * const freebsd_syscallnames[];
|
|||
|
||||
const struct emul emul_freebsd = {
|
||||
"freebsd",
|
||||
"/emul/freebsd",
|
||||
NULL,
|
||||
freebsd_sendsig,
|
||||
FREEBSD_SYS_syscall,
|
||||
|
@ -132,7 +133,7 @@ ELFNAME2(freebsd,probe)(p, epp, veh, itp, pos)
|
|||
}
|
||||
|
||||
if (itp[0]) {
|
||||
if ((error = emul_find(p, NULL, freebsd_emul_path,
|
||||
if ((error = emul_find(p, NULL, epp->ep_esch->es_emul->e_path,
|
||||
itp, &bp, 0)))
|
||||
return error;
|
||||
if ((error = copystr(bp, itp, MAXPATHLEN, &i)) != 0)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: freebsd_file.c,v 1.9 1998/02/19 00:36:03 thorpej Exp $ */
|
||||
/* $NetBSD: freebsd_file.c,v 1.10 2000/12/01 12:28:31 jdolecek Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Frank van der Linden
|
||||
|
@ -50,12 +50,10 @@
|
|||
#include <sys/syscallargs.h>
|
||||
|
||||
#include <compat/freebsd/freebsd_syscallargs.h>
|
||||
#include <compat/freebsd/freebsd_util.h>
|
||||
#include <compat/common/compat_util.h>
|
||||
|
||||
#define ARRAY_LENGTH(array) (sizeof(array)/sizeof(array[0]))
|
||||
|
||||
const char freebsd_emul_path[] = "/emul/freebsd";
|
||||
|
||||
static char * convert_from_freebsd_mount_type __P((int));
|
||||
|
||||
static char *
|
||||
|
@ -113,7 +111,7 @@ freebsd_sys_mount(p, v, retval)
|
|||
if ((error = copyout(type, s, strlen(type) + 1)) != 0)
|
||||
return error;
|
||||
SCARG(&bma, type) = s;
|
||||
FREEBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
SCARG(&bma, path) = SCARG(uap, path);
|
||||
SCARG(&bma, flags) = SCARG(uap, flags);
|
||||
SCARG(&bma, data) = SCARG(uap, data);
|
||||
|
@ -142,9 +140,9 @@ freebsd_sys_open(p, v, retval)
|
|||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
if (SCARG(uap, flags) & O_CREAT)
|
||||
FREEBSD_CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
|
||||
else
|
||||
FREEBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
return sys_open(p, uap, retval);
|
||||
}
|
||||
|
||||
|
@ -160,7 +158,7 @@ compat_43_freebsd_sys_creat(p, v, retval)
|
|||
} */ *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
FREEBSD_CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
|
||||
return compat_43_sys_creat(p, uap, retval);
|
||||
}
|
||||
|
||||
|
@ -176,8 +174,8 @@ freebsd_sys_link(p, v, retval)
|
|||
} */ *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
FREEBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
FREEBSD_CHECK_ALT_CREAT(p, &sg, SCARG(uap, link));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_CREAT(p, &sg, SCARG(uap, link));
|
||||
return sys_link(p, uap, retval);
|
||||
}
|
||||
|
||||
|
@ -192,7 +190,7 @@ freebsd_sys_unlink(p, v, retval)
|
|||
} */ *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
FREEBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
return sys_unlink(p, uap, retval);
|
||||
}
|
||||
|
||||
|
@ -207,7 +205,7 @@ freebsd_sys_chdir(p, v, retval)
|
|||
} */ *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
FREEBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
return sys_chdir(p, uap, retval);
|
||||
}
|
||||
|
||||
|
@ -224,7 +222,7 @@ freebsd_sys_mknod(p, v, retval)
|
|||
} */ *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
FREEBSD_CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
|
||||
return sys_mknod(p, uap, retval);
|
||||
}
|
||||
|
||||
|
@ -240,7 +238,7 @@ freebsd_sys_chmod(p, v, retval)
|
|||
} */ *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
FREEBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
return sys_chmod(p, uap, retval);
|
||||
}
|
||||
|
||||
|
@ -257,7 +255,7 @@ freebsd_sys_chown(p, v, retval)
|
|||
} */ *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
FREEBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
return sys_chown(p, uap, retval);
|
||||
}
|
||||
|
||||
|
@ -274,7 +272,7 @@ freebsd_sys_lchown(p, v, retval)
|
|||
} */ *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
FREEBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
return sys_lchown(p, uap, retval);
|
||||
}
|
||||
|
||||
|
@ -290,7 +288,7 @@ freebsd_sys_unmount(p, v, retval)
|
|||
} */ *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
FREEBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
return sys_unmount(p, uap, retval);
|
||||
}
|
||||
|
||||
|
@ -306,7 +304,7 @@ freebsd_sys_access(p, v, retval)
|
|||
} */ *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
FREEBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
return sys_access(p, uap, retval);
|
||||
}
|
||||
|
||||
|
@ -322,7 +320,7 @@ freebsd_sys_chflags(p, v, retval)
|
|||
} */ *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
FREEBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
return sys_chflags(p, uap, retval);
|
||||
}
|
||||
|
||||
|
@ -338,7 +336,7 @@ compat_43_freebsd_sys_stat(p, v, retval)
|
|||
} */ *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
FREEBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
return compat_43_sys_stat(p, uap, retval);
|
||||
}
|
||||
|
||||
|
@ -354,7 +352,7 @@ compat_43_freebsd_sys_lstat(p, v, retval)
|
|||
} */ *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
FREEBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
return compat_43_sys_lstat(p, uap, retval);
|
||||
}
|
||||
|
||||
|
@ -369,7 +367,7 @@ freebsd_sys_revoke(p, v, retval)
|
|||
} */ *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
FREEBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
return sys_revoke(p, uap, retval);
|
||||
}
|
||||
|
||||
|
@ -385,8 +383,8 @@ freebsd_sys_symlink(p, v, retval)
|
|||
} */ *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
FREEBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
FREEBSD_CHECK_ALT_CREAT(p, &sg, SCARG(uap, link));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_CREAT(p, &sg, SCARG(uap, link));
|
||||
return sys_symlink(p, uap, retval);
|
||||
}
|
||||
|
||||
|
@ -403,7 +401,7 @@ freebsd_sys_readlink(p, v, retval)
|
|||
} */ *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
FREEBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
return sys_readlink(p, uap, retval);
|
||||
}
|
||||
|
||||
|
@ -422,7 +420,7 @@ freebsd_sys_execve(p, v, retval)
|
|||
caddr_t sg;
|
||||
|
||||
sg = stackgap_init(p->p_emul);
|
||||
FREEBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
SCARG(&ap, path) = SCARG(uap, path);
|
||||
SCARG(&ap, argp) = SCARG(uap, argp);
|
||||
|
@ -442,7 +440,7 @@ freebsd_sys_chroot(p, v, retval)
|
|||
} */ *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
FREEBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
return sys_chroot(p, uap, retval);
|
||||
}
|
||||
|
||||
|
@ -458,8 +456,8 @@ freebsd_sys_rename(p, v, retval)
|
|||
} */ *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
FREEBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, from));
|
||||
FREEBSD_CHECK_ALT_CREAT(p, &sg, SCARG(uap, to));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, from));
|
||||
CHECK_ALT_CREAT(p, &sg, SCARG(uap, to));
|
||||
return sys_rename(p, uap, retval);
|
||||
}
|
||||
|
||||
|
@ -475,7 +473,7 @@ compat_43_freebsd_sys_truncate(p, v, retval)
|
|||
} */ *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
FREEBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
return compat_43_sys_truncate(p, uap, retval);
|
||||
}
|
||||
|
||||
|
@ -491,7 +489,7 @@ freebsd_sys_mkfifo(p, v, retval)
|
|||
} */ *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
FREEBSD_CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
|
||||
return sys_mkfifo(p, uap, retval);
|
||||
}
|
||||
|
||||
|
@ -507,7 +505,7 @@ freebsd_sys_mkdir(p, v, retval)
|
|||
} */ *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
FREEBSD_CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
|
||||
return sys_mkdir(p, uap, retval);
|
||||
}
|
||||
|
||||
|
@ -522,7 +520,7 @@ freebsd_sys_rmdir(p, v, retval)
|
|||
} */ *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
FREEBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
return sys_rmdir(p, uap, retval);
|
||||
}
|
||||
|
||||
|
@ -538,7 +536,7 @@ freebsd_sys_statfs(p, v, retval)
|
|||
} */ *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
FREEBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
return sys_statfs(p, uap, retval);
|
||||
}
|
||||
|
||||
|
@ -555,7 +553,7 @@ freebsd_sys_getfh(p, v, retval)
|
|||
} */ *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
FREEBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, fname));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, fname));
|
||||
return sys_getfh(p, uap, retval);
|
||||
}
|
||||
#endif /* NFS */
|
||||
|
@ -572,7 +570,7 @@ freebsd_sys_stat(p, v, retval)
|
|||
} */ *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
FREEBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
return compat_12_sys_stat(p, uap, retval);
|
||||
}
|
||||
|
||||
|
@ -588,7 +586,7 @@ freebsd_sys_lstat(p, v, retval)
|
|||
} */ *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
FREEBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
return compat_12_sys_lstat(p, uap, retval);
|
||||
}
|
||||
|
||||
|
@ -604,7 +602,7 @@ freebsd_sys_pathconf(p, v, retval)
|
|||
} */ *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
FREEBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
return sys_pathconf(p, uap, retval);
|
||||
}
|
||||
|
||||
|
@ -621,6 +619,6 @@ freebsd_sys_truncate(p, v, retval)
|
|||
} */ *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
FREEBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
return sys_truncate(p, uap, retval);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: freebsd_ioctl.c,v 1.4 2000/10/09 06:19:31 onoe Exp $ */
|
||||
/* $NetBSD: freebsd_ioctl.c,v 1.5 2000/12/01 12:28:31 jdolecek Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Frank van der Linden
|
||||
|
@ -42,7 +42,7 @@
|
|||
#include <net/if.h>
|
||||
|
||||
#include <compat/freebsd/freebsd_syscallargs.h>
|
||||
#include <compat/freebsd/freebsd_util.h>
|
||||
#include <compat/common/compat_util.h>
|
||||
#include <compat/freebsd/freebsd_ioctl.h>
|
||||
|
||||
#include <compat/ossaudio/ossaudio.h>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: freebsd_misc.c,v 1.7 2000/08/07 18:10:24 bjh21 Exp $ */
|
||||
/* $NetBSD: freebsd_misc.c,v 1.8 2000/12/01 12:28:31 jdolecek Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Frank van der Linden
|
||||
|
@ -47,7 +47,7 @@
|
|||
#include <sys/syscallargs.h>
|
||||
|
||||
#include <compat/freebsd/freebsd_syscallargs.h>
|
||||
#include <compat/freebsd/freebsd_util.h>
|
||||
#include <compat/common/compat_util.h>
|
||||
#include <compat/freebsd/freebsd_rtprio.h>
|
||||
#include <compat/freebsd/freebsd_timex.h>
|
||||
#include <compat/freebsd/freebsd_signal.h>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: freebsd_ptrace.c,v 1.2 1996/05/03 17:03:12 christos Exp $ */
|
||||
/* $NetBSD: freebsd_ptrace.c,v 1.3 2000/12/01 12:28:31 jdolecek Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1994 Christopher G. Demetriou. All rights reserved.
|
||||
|
@ -55,7 +55,7 @@
|
|||
#include <machine/freebsd_machdep.h>
|
||||
|
||||
#include <compat/freebsd/freebsd_syscallargs.h>
|
||||
#include <compat/freebsd/freebsd_util.h>
|
||||
#include <compat/common/compat_util.h>
|
||||
#include <compat/freebsd/freebsd_ptrace.h>
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,88 +0,0 @@
|
|||
/* $NetBSD: freebsd_util.h,v 1.2 1998/09/05 14:50:26 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1994 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Frank van der Linden
|
||||
* All rights reserved.
|
||||
*
|
||||
* 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. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
|
||||
*
|
||||
* from: svr4_util.h,v 1.5 1994/11/18 02:54:31 christos Exp
|
||||
* from: linux_util.h,v 1.3 1995/04/07 22:23:27 fvdl Exp
|
||||
*/
|
||||
|
||||
/*
|
||||
* This file is pretty much the same as Christos' svr4_util.h
|
||||
* This file is pretty much the same as Fvdl's linux_util.h
|
||||
* (for now).
|
||||
*/
|
||||
|
||||
#ifndef _FREEBSD_UTIL_H_
|
||||
#define _FREEBSD_UTIL_H_
|
||||
|
||||
#include <compat/common/compat_util.h>
|
||||
|
||||
extern const char freebsd_emul_path[];
|
||||
|
||||
#define FREEBSD_CHECK_ALT_EXIST(p, sgp, path) \
|
||||
CHECK_ALT_EXIST(p, sgp, freebsd_emul_path, path)
|
||||
|
||||
#define FREEBSD_CHECK_ALT_CREAT(p, sgp, path) \
|
||||
CHECK_ALT_CREAT(p, sgp, freebsd_emul_path, path)
|
||||
|
||||
#endif /* !_FREEBSD_UTIL_H_ */
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: hpux_exec.c,v 1.18 2000/11/21 00:37:53 jdolecek Exp $ */
|
||||
/* $NetBSD: hpux_exec.c,v 1.19 2000/12/01 12:28:32 jdolecek Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
|
||||
|
@ -94,7 +94,6 @@
|
|||
|
||||
#include <machine/hpux_machdep.h>
|
||||
|
||||
const char hpux_emul_path[] = "/emul/hpux";
|
||||
extern char sigcode[], esigcode[];
|
||||
extern struct sysent hpux_sysent[];
|
||||
extern const char * const hpux_syscallnames[];
|
||||
|
@ -106,6 +105,7 @@ static int exec_hpux_prep_omagic __P((struct proc *, struct exec_package *));
|
|||
|
||||
const struct emul emul_hpux = {
|
||||
"hpux",
|
||||
"/emul/hpux",
|
||||
native_to_hpux_errno,
|
||||
hpux_sendsig,
|
||||
HPUX_SYS_syscall,
|
||||
|
@ -314,7 +314,7 @@ hpux_sys_execv(p, v, retval)
|
|||
caddr_t sg;
|
||||
|
||||
sg = stackgap_init(p->p_emul);
|
||||
HPUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
SCARG(&ap, path) = SCARG(uap, path);
|
||||
SCARG(&ap, argp) = SCARG(uap, argp);
|
||||
|
@ -338,7 +338,7 @@ hpux_sys_execve(p, v, retval)
|
|||
caddr_t sg;
|
||||
|
||||
sg = stackgap_init(p->p_emul);
|
||||
HPUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
SCARG(&ap, path) = SCARG(uap, path);
|
||||
SCARG(&ap, argp) = SCARG(uap, argp);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: hpux_file.c,v 1.14 2000/08/29 14:33:26 sommerfeld Exp $ */
|
||||
/* $NetBSD: hpux_file.c,v 1.15 2000/12/01 12:28:32 jdolecek Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
|
||||
|
@ -141,7 +141,7 @@ hpux_sys_creat(p, v, retval)
|
|||
caddr_t sg;
|
||||
|
||||
sg = stackgap_init(p->p_emul);
|
||||
HPUX_CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
|
||||
|
||||
SCARG(&oa, path) = SCARG(uap, path);
|
||||
SCARG(&oa, flags) = O_CREAT | O_TRUNC | O_WRONLY;
|
||||
|
@ -205,9 +205,9 @@ hpux_sys_open(p, v, retval)
|
|||
* Do the alternate pathname check.
|
||||
*/
|
||||
if (SCARG(&oa, flags) & O_CREAT)
|
||||
HPUX_CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
|
||||
else
|
||||
HPUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
/*
|
||||
* Fill in the new arguments and call the NetBSD open(2).
|
||||
|
@ -483,7 +483,7 @@ hpux_stat1(p, v, retval, dolstat)
|
|||
|
||||
sg = stackgap_init(p->p_emul);
|
||||
st = stackgap_alloc(&sg, sizeof (struct stat));
|
||||
HPUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
SCARG(&sa, ub) = st;
|
||||
SCARG(&sa, path) = SCARG(uap, path);
|
||||
|
@ -562,7 +562,7 @@ hpux_sys_stat_6x(p, v, retval)
|
|||
|
||||
sg = stackgap_init(p->p_emul);
|
||||
|
||||
HPUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
st = stackgap_alloc(&sg, sizeof (struct stat));
|
||||
SCARG(&sa, ub) = st;
|
||||
|
@ -660,7 +660,7 @@ hpux_sys_access(p, v, retval)
|
|||
} */ *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
HPUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return (sys_access(p, uap, retval));
|
||||
}
|
||||
|
@ -679,7 +679,7 @@ hpux_sys_unlink(p, v, retval)
|
|||
} */ *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
HPUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return (sys_unlink(p, uap, retval));
|
||||
}
|
||||
|
@ -698,7 +698,7 @@ hpux_sys_chdir(p, v, retval)
|
|||
} */ *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
HPUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return (sys_chdir(p, uap, retval));
|
||||
}
|
||||
|
@ -720,7 +720,7 @@ hpux_sys_mknod(p, v, retval)
|
|||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
struct sys_mkfifo_args bma;
|
||||
|
||||
HPUX_CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
|
||||
|
||||
/*
|
||||
* BSD handles FIFOs separately.
|
||||
|
@ -748,7 +748,7 @@ hpux_sys_chmod(p, v, retval)
|
|||
} */ *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
HPUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return (sys_chmod(p, uap, retval));
|
||||
}
|
||||
|
@ -769,7 +769,7 @@ hpux_sys_chown(p, v, retval)
|
|||
} */ *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
HPUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
/* XXX What about older HP-UX executables? */
|
||||
|
||||
|
@ -791,8 +791,8 @@ hpux_sys_rename(p, v, retval)
|
|||
} */ *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
HPUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, from));
|
||||
HPUX_CHECK_ALT_CREAT(p, &sg, SCARG(uap, to));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, from));
|
||||
CHECK_ALT_CREAT(p, &sg, SCARG(uap, to));
|
||||
|
||||
return (sys___posix_rename(p, uap, retval));
|
||||
}
|
||||
|
@ -812,7 +812,7 @@ hpux_sys_mkdir(p, v, retval)
|
|||
} */ *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
HPUX_CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
|
||||
|
||||
return (sys_mkdir(p, uap, retval));
|
||||
}
|
||||
|
@ -831,7 +831,7 @@ hpux_sys_rmdir(p, v, retval)
|
|||
} */ *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
HPUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return (sys_rmdir(p, uap, retval));
|
||||
}
|
||||
|
@ -851,8 +851,8 @@ hpux_sys_symlink(p, v, retval)
|
|||
} */ *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
HPUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
HPUX_CHECK_ALT_CREAT(p, &sg, SCARG(uap, link));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_CREAT(p, &sg, SCARG(uap, link));
|
||||
|
||||
return (sys_symlink(p, uap, retval));
|
||||
}
|
||||
|
@ -873,7 +873,7 @@ hpux_sys_readlink(p, v, retval)
|
|||
} */ *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
HPUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return (sys_readlink(p, uap, retval));
|
||||
}
|
||||
|
@ -893,7 +893,7 @@ hpux_sys_truncate(p, v, retval)
|
|||
} */ *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
HPUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return (compat_43_sys_truncate(p, uap, retval));
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: hpux_util.h,v 1.6 1998/09/05 14:50:26 christos Exp $ */
|
||||
/* $NetBSD: hpux_util.h,v 1.7 2000/12/01 12:28:32 jdolecek Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1995 The NetBSD Foundation, Inc.
|
||||
|
@ -41,14 +41,6 @@
|
|||
|
||||
#include <compat/common/compat_util.h>
|
||||
|
||||
extern const char hpux_emul_path[];
|
||||
|
||||
#define HPUX_CHECK_ALT_EXIST(p, sgp, path) \
|
||||
CHECK_ALT_EXIST(p, sgp, hpux_emul_path, path)
|
||||
|
||||
#define HPUX_CHECK_ALT_CREAT(p, sgp, path) \
|
||||
CHECK_ALT_CREAT(p, sgp, hpux_emul_path, path)
|
||||
|
||||
#ifdef DEBUG_HPUX
|
||||
#define DPRINTF(a) printf a;
|
||||
#else
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ibcs2_exec.c,v 1.37 2000/11/21 00:37:53 jdolecek Exp $ */
|
||||
/* $NetBSD: ibcs2_exec.c,v 1.38 2000/12/01 12:28:32 jdolecek Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995, 1998 Scott Bartram
|
||||
|
@ -98,8 +98,6 @@ extern struct sysent ibcs2_sysent[];
|
|||
extern const char * const ibcs2_syscallnames[];
|
||||
extern char ibcs2_sigcode[], ibcs2_esigcode[];
|
||||
|
||||
const char ibcs2_emul_path[] = "/emul/ibcs2";
|
||||
|
||||
#ifdef IBCS2_DEBUG
|
||||
int ibcs2_debug = 1;
|
||||
#else
|
||||
|
@ -108,6 +106,7 @@ int ibcs2_debug = 0;
|
|||
|
||||
const struct emul emul_ibcs2 = {
|
||||
"ibcs2",
|
||||
"/emul/ibcs2",
|
||||
native_to_ibcs2_errno,
|
||||
ibcs2_sendsig,
|
||||
0,
|
||||
|
@ -193,7 +192,8 @@ ibcs2_elf32_probe(p, epp, eh, itp, pos)
|
|||
return error;
|
||||
|
||||
if (itp[0]) {
|
||||
if ((error = emul_find(p, NULL, ibcs2_emul_path, itp, &bp, 0)))
|
||||
if ((error = emul_find(p, NULL, epp->ep_esch->es_emul->e_path,
|
||||
itp, &bp, 0)))
|
||||
return error;
|
||||
if ((error = copystr(bp, itp, MAXPATHLEN, &len)))
|
||||
return error;
|
||||
|
@ -724,7 +724,7 @@ coff_load_shlib(p, path, epp)
|
|||
* 2. read filehdr
|
||||
* 3. map text, data, and bss out of it using VM_*
|
||||
*/
|
||||
IBCS2_CHECK_ALT_EXIST(p, NULL, path); /* path is on kernel stack */
|
||||
CHECK_ALT_EXIST(p, NULL, path); /* path is on kernel stack */
|
||||
NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, path, p);
|
||||
/* first get the vnode */
|
||||
if ((error = namei(&nd)) != 0) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ibcs2_fcntl.c,v 1.9 2000/03/30 11:27:16 augustss Exp $ */
|
||||
/* $NetBSD: ibcs2_fcntl.c,v 1.10 2000/12/01 12:28:32 jdolecek Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Scott Bartram
|
||||
|
@ -176,9 +176,9 @@ ibcs2_sys_open(p, v, retval)
|
|||
|
||||
SCARG(uap, flags) = cvt_o_flags(SCARG(uap, flags));
|
||||
if (SCARG(uap, flags) & O_CREAT)
|
||||
IBCS2_CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
|
||||
else
|
||||
IBCS2_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
ret = sys_open(p, uap, retval);
|
||||
|
||||
if (!ret && !noctty && SESS_LEADER(p) && !(p->p_flag & P_CONTROLT)) {
|
||||
|
@ -205,7 +205,7 @@ ibcs2_sys_creat(p, v, retval)
|
|||
struct sys_open_args cup;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
IBCS2_CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
|
||||
SCARG(&cup, path) = SCARG(uap, path);
|
||||
SCARG(&cup, mode) = SCARG(uap, mode);
|
||||
SCARG(&cup, flags) = O_WRONLY | O_CREAT | O_TRUNC;
|
||||
|
@ -225,7 +225,7 @@ ibcs2_sys_access(p, v, retval)
|
|||
struct sys_access_args cup;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
IBCS2_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
SCARG(&cup, path) = SCARG(uap, path);
|
||||
SCARG(&cup, flags) = SCARG(uap, flags);
|
||||
return sys_access(p, &cup, retval);
|
||||
|
@ -247,7 +247,7 @@ ibcs2_sys_eaccess(p, v, retval)
|
|||
struct nameidata nd;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
IBCS2_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF, UIO_USERSPACE,
|
||||
SCARG(uap, path), p);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ibcs2_misc.c,v 1.53 2000/11/21 00:37:53 jdolecek Exp $ */
|
||||
/* $NetBSD: ibcs2_misc.c,v 1.54 2000/12/01 12:28:32 jdolecek Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995, 1998 Scott Bartram
|
||||
|
@ -216,7 +216,7 @@ ibcs2_sys_execv(p, v, retval)
|
|||
caddr_t sg;
|
||||
|
||||
sg = stackgap_init(p->p_emul);
|
||||
IBCS2_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
SCARG(&ap, path) = SCARG(uap, path);
|
||||
SCARG(&ap, argp) = SCARG(uap, argp);
|
||||
|
@ -240,7 +240,7 @@ ibcs2_sys_execve(p, v, retval)
|
|||
caddr_t sg;
|
||||
|
||||
sg = stackgap_init(p->p_emul);
|
||||
IBCS2_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
SCARG(&ap, path) = SCARG(uap, path);
|
||||
SCARG(&ap, argp) = SCARG(uap, argp);
|
||||
|
@ -612,7 +612,7 @@ ibcs2_sys_mknod(p, v, retval)
|
|||
} */ *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
IBCS2_CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
|
||||
if (S_ISFIFO(SCARG(uap, mode))) {
|
||||
struct sys_mkfifo_args ap;
|
||||
SCARG(&ap, path) = SCARG(uap, path);
|
||||
|
@ -1047,7 +1047,7 @@ ibcs2_sys_utime(p, v, retval)
|
|||
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
tp = stackgap_alloc(&sg, 2 * sizeof(struct timeval *));
|
||||
IBCS2_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
SCARG(&sa, path) = SCARG(uap, path);
|
||||
if (SCARG(uap, buf)) {
|
||||
struct ibcs2_utimbuf ubuf;
|
||||
|
@ -1328,7 +1328,7 @@ ibcs2_sys_unlink(p, v, retval)
|
|||
} */ *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
IBCS2_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
return sys_unlink(p, uap, retval);
|
||||
}
|
||||
|
||||
|
@ -1343,7 +1343,7 @@ ibcs2_sys_chdir(p, v, retval)
|
|||
} */ *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
IBCS2_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
return sys_chdir(p, uap, retval);
|
||||
}
|
||||
|
||||
|
@ -1359,7 +1359,7 @@ ibcs2_sys_chmod(p, v, retval)
|
|||
} */ *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
IBCS2_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
return sys_chmod(p, uap, retval);
|
||||
}
|
||||
|
||||
|
@ -1376,7 +1376,7 @@ ibcs2_sys_chown(p, v, retval)
|
|||
} */ *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
IBCS2_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
return sys___posix_chown(p, uap, retval);
|
||||
}
|
||||
|
||||
|
@ -1391,7 +1391,7 @@ ibcs2_sys_rmdir(p, v, retval)
|
|||
} */ *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
IBCS2_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
return sys_rmdir(p, uap, retval);
|
||||
}
|
||||
|
||||
|
@ -1407,7 +1407,7 @@ ibcs2_sys_mkdir(p, v, retval)
|
|||
} */ *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
IBCS2_CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
|
||||
return sys_mkdir(p, uap, retval);
|
||||
}
|
||||
|
||||
|
@ -1423,8 +1423,8 @@ ibcs2_sys_symlink(p, v, retval)
|
|||
} */ *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
IBCS2_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
IBCS2_CHECK_ALT_CREAT(p, &sg, SCARG(uap, link));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_CREAT(p, &sg, SCARG(uap, link));
|
||||
return sys_symlink(p, uap, retval);
|
||||
}
|
||||
|
||||
|
@ -1440,8 +1440,8 @@ ibcs2_sys_rename(p, v, retval)
|
|||
} */ *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
IBCS2_CHECK_ALT_EXIST(p, &sg, SCARG(uap, from));
|
||||
IBCS2_CHECK_ALT_CREAT(p, &sg, SCARG(uap, to));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, from));
|
||||
CHECK_ALT_CREAT(p, &sg, SCARG(uap, to));
|
||||
return sys___posix_rename(p, uap, retval);
|
||||
}
|
||||
|
||||
|
@ -1458,7 +1458,7 @@ ibcs2_sys_readlink(p, v, retval)
|
|||
} */ *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
IBCS2_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
return sys_readlink(p, uap, retval);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ibcs2_stat.c,v 1.16 2000/08/29 14:33:27 sommerfeld Exp $ */
|
||||
/* $NetBSD: ibcs2_stat.c,v 1.17 2000/12/01 12:28:32 jdolecek Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1995, 1998 Scott Bartram
|
||||
* All rights reserved.
|
||||
|
@ -139,7 +139,7 @@ ibcs2_sys_statfs(p, v, retval)
|
|||
struct nameidata nd;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
IBCS2_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
NDINIT(&nd, LOOKUP, FOLLOW, UIO_USERSPACE, SCARG(uap, path), p);
|
||||
if ((error = namei(&nd)) != 0)
|
||||
return (error);
|
||||
|
@ -199,7 +199,7 @@ ibcs2_sys_statvfs(p, v, retval)
|
|||
struct nameidata nd;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
IBCS2_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
NDINIT(&nd, LOOKUP, FOLLOW, UIO_USERSPACE, SCARG(uap, path), p);
|
||||
if ((error = namei(&nd)) != 0)
|
||||
return (error);
|
||||
|
@ -259,7 +259,7 @@ ibcs2_sys_stat(p, v, retval)
|
|||
int error;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
SCARG(&cup, ub) = stackgap_alloc(&sg, sizeof(st));
|
||||
IBCS2_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
SCARG(&cup, path) = SCARG(uap, path);
|
||||
|
||||
if ((error = sys___stat13(p, &cup, retval)) != 0)
|
||||
|
@ -288,7 +288,7 @@ ibcs2_sys_lstat(p, v, retval)
|
|||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
SCARG(&cup, ub) = stackgap_alloc(&sg, sizeof(st));
|
||||
IBCS2_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
SCARG(&cup, path) = SCARG(uap, path);
|
||||
|
||||
if ((error = sys___lstat13(p, &cup, retval)) != 0)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ibcs2_util.h,v 1.6 2000/06/16 01:56:37 matt Exp $ */
|
||||
/* $NetBSD: ibcs2_util.h,v 1.7 2000/12/01 12:28:32 jdolecek Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1994 The NetBSD Foundation, Inc.
|
||||
|
@ -71,16 +71,14 @@
|
|||
#include <compat/common/compat_util.h>
|
||||
|
||||
#ifdef _KERNEL
|
||||
|
||||
#ifdef DEBUG_IBCS2
|
||||
extern int ibcs2_debug;
|
||||
#define DPRINTF(a) do { if (ibcs2_debug) printf a; } while (0)
|
||||
#endif
|
||||
#else /* !DEBUG_IBCS2 */
|
||||
#define DPRINTF(a)
|
||||
#endif /* DEBUG_IBCS2 */
|
||||
|
||||
extern const char ibcs2_emul_path[];
|
||||
|
||||
#define IBCS2_CHECK_ALT_EXIST(p, sgp, path) \
|
||||
CHECK_ALT_EXIST(p, sgp, ibcs2_emul_path, path)
|
||||
|
||||
#define IBCS2_CHECK_ALT_CREAT(p, sgp, path) \
|
||||
CHECK_ALT_CREAT(p, sgp, ibcs2_emul_path, path)
|
||||
#endif /* _KERNEL */
|
||||
|
||||
#endif /* !_IBCS2_UTIL_H_ */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_exec.c,v 1.39 2000/11/21 12:23:29 jdolecek Exp $ */
|
||||
/* $NetBSD: linux_exec.c,v 1.40 2000/12/01 12:28:32 jdolecek Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1994, 1995, 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -66,8 +66,6 @@
|
|||
#include <compat/linux/common/linux_errno.h>
|
||||
#include <compat/linux/common/linux_emuldata.h>
|
||||
|
||||
const char linux_emul_path[] = "/emul/linux";
|
||||
|
||||
extern struct sysent linux_sysent[];
|
||||
extern const char * const linux_syscallnames[];
|
||||
extern char linux_sigcode[], linux_esigcode[];
|
||||
|
@ -95,7 +93,7 @@ linux_sys_execve(p, v, retval)
|
|||
caddr_t sg;
|
||||
|
||||
sg = stackgap_init(p->p_emul);
|
||||
LINUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
SCARG(&ap, path) = SCARG(uap, path);
|
||||
SCARG(&ap, argp) = SCARG(uap, argp);
|
||||
|
@ -109,6 +107,7 @@ linux_sys_execve(p, v, retval)
|
|||
*/
|
||||
const struct emul emul_linux = {
|
||||
"linux",
|
||||
"/emul/linux",
|
||||
native_to_linux_errno,
|
||||
linux_sendsig,
|
||||
LINUX_SYS_syscall,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_exec_aout.c,v 1.42 2000/11/21 00:37:54 jdolecek Exp $ */
|
||||
/* $NetBSD: linux_exec_aout.c,v 1.43 2000/12/01 12:28:33 jdolecek Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -366,7 +366,7 @@ linux_sys_uselib(p, v, retval)
|
|||
size_t rem;
|
||||
|
||||
sg = stackgap_init(p->p_emul);
|
||||
LINUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
NDINIT(&ni, LOOKUP, FOLLOW, UIO_USERSPACE, SCARG(uap, path), p);
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_exec_elf32.c,v 1.48 2000/11/21 00:37:54 jdolecek Exp $ */
|
||||
/* $NetBSD: linux_exec_elf32.c,v 1.49 2000/12/01 12:28:33 jdolecek Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -265,7 +265,8 @@ ELFNAME2(linux,probe)(p, epp, eh, itp, pos)
|
|||
#endif
|
||||
|
||||
if (itp[0]) {
|
||||
if ((error = emul_find(p, NULL, linux_emul_path, itp, &bp, 0)))
|
||||
if ((error = emul_find(p, NULL, epp->ep_esch->es_emul->e_path,
|
||||
itp, &bp, 0)))
|
||||
return error;
|
||||
if ((error = copystr(bp, itp, MAXPATHLEN, &len)))
|
||||
return error;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_file.c,v 1.29 2000/08/29 14:33:27 sommerfeld Exp $ */
|
||||
/* $NetBSD: linux_file.c,v 1.30 2000/12/01 12:28:33 jdolecek Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -147,7 +147,7 @@ linux_sys_creat(p, v, retval)
|
|||
caddr_t sg;
|
||||
|
||||
sg = stackgap_init(p->p_emul);
|
||||
LINUX_CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
|
||||
|
||||
SCARG(&oa, path) = SCARG(uap, path);
|
||||
SCARG(&oa, flags) = O_CREAT | O_TRUNC | O_WRONLY;
|
||||
|
@ -182,9 +182,9 @@ linux_sys_open(p, v, retval)
|
|||
fl = linux_to_bsd_ioflags(SCARG(uap, flags));
|
||||
|
||||
if (fl & O_CREAT)
|
||||
LINUX_CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
|
||||
else
|
||||
LINUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
SCARG(&boa, path) = SCARG(uap, path);
|
||||
SCARG(&boa, flags) = fl;
|
||||
|
@ -495,7 +495,7 @@ linux_stat1(p, v, retval, dolstat)
|
|||
|
||||
sg = stackgap_init(p->p_emul);
|
||||
st = stackgap_alloc(&sg, sizeof (struct stat));
|
||||
LINUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
SCARG(&sa, ub) = st;
|
||||
SCARG(&sa, path) = SCARG(uap, path);
|
||||
|
@ -560,7 +560,7 @@ linux_sys_access(p, v, retval)
|
|||
} */ *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
LINUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return sys_access(p, uap, retval);
|
||||
}
|
||||
|
@ -577,7 +577,7 @@ linux_sys_unlink(p, v, retval)
|
|||
} */ *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
LINUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return sys_unlink(p, uap, retval);
|
||||
}
|
||||
|
@ -593,7 +593,7 @@ linux_sys_chdir(p, v, retval)
|
|||
} */ *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
LINUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return sys_chdir(p, uap, retval);
|
||||
}
|
||||
|
@ -612,7 +612,7 @@ linux_sys_mknod(p, v, retval)
|
|||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
struct sys_mkfifo_args bma;
|
||||
|
||||
LINUX_CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
|
||||
|
||||
/*
|
||||
* BSD handles FIFOs seperately
|
||||
|
@ -637,7 +637,7 @@ linux_sys_chmod(p, v, retval)
|
|||
} */ *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
LINUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return sys_chmod(p, uap, retval);
|
||||
}
|
||||
|
@ -656,7 +656,7 @@ linux_sys_chown(p, v, retval)
|
|||
struct sys___posix_chown_args bca;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
LINUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
SCARG(&bca, path) = SCARG(uap, path);
|
||||
SCARG(&bca, uid) = ((linux_uid_t)SCARG(uap, uid) == (linux_uid_t)-1) ?
|
||||
|
@ -723,8 +723,8 @@ linux_sys_rename(p, v, retval)
|
|||
} */ *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
LINUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, from));
|
||||
LINUX_CHECK_ALT_CREAT(p, &sg, SCARG(uap, to));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, from));
|
||||
CHECK_ALT_CREAT(p, &sg, SCARG(uap, to));
|
||||
|
||||
return sys___posix_rename(p, uap, retval);
|
||||
}
|
||||
|
@ -741,7 +741,7 @@ linux_sys_mkdir(p, v, retval)
|
|||
} */ *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
LINUX_CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
|
||||
|
||||
return sys_mkdir(p, uap, retval);
|
||||
}
|
||||
|
@ -757,7 +757,7 @@ linux_sys_rmdir(p, v, retval)
|
|||
} */ *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
LINUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return sys_rmdir(p, uap, retval);
|
||||
}
|
||||
|
@ -774,8 +774,8 @@ linux_sys_symlink(p, v, retval)
|
|||
} */ *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
LINUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
LINUX_CHECK_ALT_CREAT(p, &sg, SCARG(uap, to));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_CREAT(p, &sg, SCARG(uap, to));
|
||||
|
||||
return sys_symlink(p, uap, retval);
|
||||
}
|
||||
|
@ -793,7 +793,7 @@ linux_sys_readlink(p, v, retval)
|
|||
} */ *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
LINUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, name));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, name));
|
||||
|
||||
return sys_readlink(p, uap, retval);
|
||||
}
|
||||
|
@ -810,7 +810,7 @@ linux_sys_truncate(p, v, retval)
|
|||
} */ *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
LINUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return compat_43_sys_truncate(p, uap, retval);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_misc.c,v 1.73 2000/11/01 20:56:30 jdolecek Exp $ */
|
||||
/* $NetBSD: linux_misc.c,v 1.74 2000/12/01 12:28:33 jdolecek Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1995, 1998, 1999 The NetBSD Foundation, Inc.
|
||||
|
@ -291,7 +291,7 @@ linux_sys_statfs(p, v, retval)
|
|||
sg = stackgap_init(p->p_emul);
|
||||
bsp = (struct statfs *) stackgap_alloc(&sg, sizeof (struct statfs));
|
||||
|
||||
LINUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
SCARG(&bsa, path) = SCARG(uap, path);
|
||||
SCARG(&bsa, buf) = bsp;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_misc_notalpha.c,v 1.58 2000/08/29 14:33:27 sommerfeld Exp $ */
|
||||
/* $NetBSD: linux_misc_notalpha.c,v 1.59 2000/12/01 12:28:33 jdolecek Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -229,7 +229,7 @@ linux_sys_utime(p, v, retval)
|
|||
|
||||
sg = stackgap_init(p->p_emul);
|
||||
tvp = (struct timeval *) stackgap_alloc(&sg, sizeof(tv));
|
||||
LINUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
SCARG(&ua, path) = SCARG(uap, path);
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_util.h,v 1.9 1998/10/04 00:02:45 fvdl Exp $ */
|
||||
/* $NetBSD: linux_util.h,v 1.10 2000/12/01 12:28:33 jdolecek Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1994, 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -44,12 +44,4 @@
|
|||
#define cvtto_linux_mask(flags,bmask,lmask) (((flags) & bmask) ? lmask : 0)
|
||||
#define cvtto_bsd_mask(flags,lmask,bmask) (((flags) & lmask) ? bmask : 0)
|
||||
|
||||
extern const char linux_emul_path[];
|
||||
|
||||
#define LINUX_CHECK_ALT_EXIST(p, sgp, path) \
|
||||
CHECK_ALT_EXIST(p, sgp, linux_emul_path, path)
|
||||
|
||||
#define LINUX_CHECK_ALT_CREAT(p, sgp, path) \
|
||||
CHECK_ALT_CREAT(p, sgp, linux_emul_path, path)
|
||||
|
||||
#endif /* !_LINUX_UTIL_H */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: netbsd32.h,v 1.13 2000/11/18 02:00:50 mrg Exp $ */
|
||||
/* $NetBSD: netbsd32.h,v 1.14 2000/12/01 12:28:33 jdolecek Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998 Matthew R. Green
|
||||
|
@ -526,10 +526,4 @@ typedef struct firm_event32 {
|
|||
*/
|
||||
#include <compat/common/compat_util.h>
|
||||
|
||||
extern const char netbsd32_emul_path[];
|
||||
|
||||
#define NETBSD32_CHECK_ALT_EXIST(p, sgp, path) \
|
||||
emul_find(p, sgp, netbsd32_emul_path, (const char *)path, \
|
||||
(const char **)&path, 0)
|
||||
|
||||
#endif /* _COMPAT_NETBSD32_NETBSD32_H_ */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: netbsd32_compat_12.c,v 1.6 1999/10/11 01:36:22 eeh Exp $ */
|
||||
/* $NetBSD: netbsd32_compat_12.c,v 1.7 2000/12/01 12:28:33 jdolecek Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998 Matthew R. Green
|
||||
|
@ -141,7 +141,7 @@ compat_12_netbsd32_stat12(p, v, retval)
|
|||
NETBSD32TOP_UAP(path, const char);
|
||||
SCARG(&ua, ub) = &sb12;
|
||||
sg = stackgap_init(p->p_emul);
|
||||
NETBSD32_CHECK_ALT_EXIST(p, &sg, SCARG(&ua, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(&ua, path));
|
||||
|
||||
rv = compat_12_sys_stat(p, &ua, retval);
|
||||
|
||||
|
@ -197,7 +197,7 @@ compat_12_netbsd32_lstat12(p, v, retval)
|
|||
NETBSD32TOP_UAP(path, const char);
|
||||
SCARG(&ua, ub) = &sb12;
|
||||
sg = stackgap_init(p->p_emul);
|
||||
NETBSD32_CHECK_ALT_EXIST(p, &sg, SCARG(&ua, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(&ua, path));
|
||||
|
||||
rv = compat_12_sys_lstat(p, &ua, retval);
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: netbsd32_compat_43.c,v 1.11 2000/09/24 13:09:31 martin Exp $ */
|
||||
/* $NetBSD: netbsd32_compat_43.c,v 1.12 2000/12/01 12:28:33 jdolecek Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998 Matthew R. Green
|
||||
|
@ -95,7 +95,7 @@ compat_43_netbsd32_ocreat(p, v, retval)
|
|||
NETBSD32TO64_UAP(mode);
|
||||
SCARG(&ua, flags) = O_WRONLY | O_CREAT | O_TRUNC;
|
||||
sg = stackgap_init(p->p_emul);
|
||||
NETBSD32_CHECK_ALT_EXIST(p, &sg, SCARG(&ua, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(&ua, path));
|
||||
|
||||
return (sys_open(p, &ua, retval));
|
||||
}
|
||||
|
@ -144,7 +144,7 @@ compat_43_netbsd32_stat43(p, v, retval)
|
|||
NETBSD32TOP_UAP(path, const char);
|
||||
SCARG(&ua, ub) = &sb43;
|
||||
sg = stackgap_init(p->p_emul);
|
||||
NETBSD32_CHECK_ALT_EXIST(p, &sg, SCARG(&ua, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(&ua, path));
|
||||
|
||||
rv = compat_43_sys_stat(p, &ua, retval);
|
||||
|
||||
|
@ -174,7 +174,7 @@ compat_43_netbsd32_lstat43(p, v, retval)
|
|||
NETBSD32TOP_UAP(path, const char);
|
||||
SCARG(&ua, ub) = &sb43;
|
||||
sg = stackgap_init(p->p_emul);
|
||||
NETBSD32_CHECK_ALT_EXIST(p, &sg, SCARG(&ua, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(&ua, path));
|
||||
|
||||
rv = compat_43_sys_stat(p, &ua, retval);
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: netbsd32_exec.c,v 1.25 2000/12/01 08:59:02 mrg Exp $ */
|
||||
/* $NetBSD: netbsd32_exec.c,v 1.26 2000/12/01 12:28:33 jdolecek Exp $ */
|
||||
/* from: NetBSD: exec_aout.c,v 1.15 1996/09/26 23:34:46 cgd Exp */
|
||||
|
||||
/*
|
||||
|
@ -55,7 +55,6 @@
|
|||
#include <machine/frame.h>
|
||||
#include <machine/netbsd32_machdep.h>
|
||||
|
||||
const char netbsd32_emul_path[] = "/emul/netbsd32";
|
||||
extern char netbsd32_sigcode[], netbsd32_esigcode[];
|
||||
extern struct sysent netbsd32_sysent[];
|
||||
#ifdef SYSCALL_DEBUG
|
||||
|
@ -73,6 +72,7 @@ static int netbsd32_exec_aout_prep_omagic __P((struct proc *,
|
|||
|
||||
const struct emul emul_netbsd32 = {
|
||||
"netbsd32",
|
||||
"/emul/netbsd32",
|
||||
NULL,
|
||||
netbsd32_sendsig,
|
||||
netbsd32_SYS_syscall,
|
||||
|
@ -107,7 +107,7 @@ ELFNAME2(netbsd32,probe)(p, epp, eh, itp, pos)
|
|||
return error;
|
||||
|
||||
if (itp[0]) {
|
||||
if ((error = emul_find(p, NULL, netbsd32_emul_path,
|
||||
if ((error = emul_find(p, NULL, epp->ep_esch->es_emul->e_path,
|
||||
itp, &bp, 0)) &&
|
||||
(error = emul_find(p, NULL, "", itp, &bp, 0)))
|
||||
return error;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: netbsd32_netbsd.c,v 1.40 2000/11/30 12:54:38 jdolecek Exp $ */
|
||||
/* $NetBSD: netbsd32_netbsd.c,v 1.41 2000/12/01 12:28:34 jdolecek Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998 Matthew R. Green
|
||||
|
@ -654,7 +654,7 @@ netbsd32_open(p, v, retval)
|
|||
NETBSD32TO64_UAP(flags);
|
||||
NETBSD32TO64_UAP(mode);
|
||||
sg = stackgap_init(p->p_emul);
|
||||
NETBSD32_CHECK_ALT_EXIST(p, &sg, SCARG(&ua, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(&ua, path));
|
||||
|
||||
return (sys_open(p, &ua, retval));
|
||||
}
|
||||
|
@ -1468,7 +1468,7 @@ netbsd32_access(p, v, retval)
|
|||
NETBSD32TOP_UAP(path, const char);
|
||||
NETBSD32TO64_UAP(flags);
|
||||
sg = stackgap_init(p->p_emul);
|
||||
NETBSD32_CHECK_ALT_EXIST(p, &sg, SCARG(&ua, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(&ua, path));
|
||||
|
||||
return (sys_access(p, &ua, retval));
|
||||
}
|
||||
|
@ -1688,7 +1688,7 @@ netbsd32_revoke(p, v, retval)
|
|||
|
||||
NETBSD32TOP_UAP(path, const char);
|
||||
sg = stackgap_init(p->p_emul);
|
||||
NETBSD32_CHECK_ALT_EXIST(p, &sg, SCARG(&ua, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(&ua, path));
|
||||
|
||||
return (sys_revoke(p, &ua, retval));
|
||||
}
|
||||
|
@ -1729,7 +1729,7 @@ netbsd32_readlink(p, v, retval)
|
|||
NETBSD32TOP_UAP(buf, char);
|
||||
NETBSD32TOX_UAP(count, size_t);
|
||||
sg = stackgap_init(p->p_emul);
|
||||
NETBSD32_CHECK_ALT_EXIST(p, &sg, SCARG(&ua, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(&ua, path));
|
||||
|
||||
return (sys_readlink(p, &ua, retval));
|
||||
}
|
||||
|
@ -1774,7 +1774,7 @@ netbsd32_execve(p, v, retval)
|
|||
NETBSD32TOP_UAP(argp, char *);
|
||||
NETBSD32TOP_UAP(envp, char *);
|
||||
sg = stackgap_init(p->p_emul);
|
||||
NETBSD32_CHECK_ALT_EXIST(p, &sg, SCARG(&ua, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(&ua, path));
|
||||
|
||||
/*
|
||||
* figure out the maximum size of an exec header, if necessary.
|
||||
|
@ -5202,7 +5202,7 @@ netbsd32___stat13(p, v, retval)
|
|||
|
||||
path = (char *)(u_long)SCARG(uap, path);
|
||||
sg = stackgap_init(p->p_emul);
|
||||
NETBSD32_CHECK_ALT_EXIST(p, &sg, path);
|
||||
CHECK_ALT_EXIST(p, &sg, path);
|
||||
|
||||
NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF, UIO_USERSPACE, path, p);
|
||||
if ((error = namei(&nd)) != 0)
|
||||
|
@ -5276,7 +5276,7 @@ netbsd32___lstat13(p, v, retval)
|
|||
|
||||
path = (char *)(u_long)SCARG(uap, path);
|
||||
sg = stackgap_init(p->p_emul);
|
||||
NETBSD32_CHECK_ALT_EXIST(p, &sg, path);
|
||||
CHECK_ALT_EXIST(p, &sg, path);
|
||||
|
||||
NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF, UIO_USERSPACE, path, p);
|
||||
if ((error = namei(&nd)) != 0)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: osf1_cvt.c,v 1.9 2000/07/29 20:06:30 jdolecek Exp $ */
|
||||
/* $NetBSD: osf1_cvt.c,v 1.10 2000/12/01 12:28:34 jdolecek Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1999 Christopher G. Demetriou. All rights reserved.
|
||||
|
@ -86,7 +86,7 @@
|
|||
#include <nfs/nfsmount.h>
|
||||
|
||||
#include <compat/osf1/osf1.h>
|
||||
#include <compat/osf1/osf1_util.h>
|
||||
#include <compat/common/compat_util.h>
|
||||
#include <compat/osf1/osf1_cvt.h>
|
||||
|
||||
const struct emul_flags_xtab osf1_access_flags_xtab[] = {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: osf1_exec.c,v 1.14 2000/11/22 03:56:52 itojun Exp $ */
|
||||
/* $NetBSD: osf1_exec.c,v 1.15 2000/12/01 12:28:34 jdolecek Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1999 Christopher G. Demetriou. All rights reserved.
|
||||
|
@ -46,7 +46,7 @@
|
|||
|
||||
#include <compat/osf1/osf1.h>
|
||||
#include <compat/osf1/osf1_syscall.h>
|
||||
#include <compat/osf1/osf1_util.h>
|
||||
#include <compat/common/compat_util.h>
|
||||
#include <compat/osf1/osf1_cvt.h>
|
||||
#include <compat/osf1/osf1_exec.h>
|
||||
|
||||
|
@ -66,6 +66,7 @@ extern char osf1_sigcode[], osf1_esigcode[];
|
|||
|
||||
const struct emul emul_osf1 = {
|
||||
"osf1",
|
||||
"/emul/osf1",
|
||||
(int *)osf1_errno_rxlist,
|
||||
sendsig,
|
||||
OSF1_SYS_syscall,
|
||||
|
@ -220,7 +221,7 @@ osf1_exec_ecoff_dynamic(struct proc *p, struct exec_package *epp)
|
|||
/*
|
||||
* locate the loader
|
||||
*/
|
||||
error = emul_find(p, NULL, osf1_emul_path,
|
||||
error = emul_find(p, NULL, epp->ep_esch->es_emul->e_path,
|
||||
OSF1_LDR_EXEC_DEFAULT_LOADER, &pathbuf, 0);
|
||||
/* includes /emul/osf1 if appropriate */
|
||||
strncpy(emul_arg->loader_name, pathbuf, MAXPATHLEN + 1);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: osf1_file.c,v 1.7 2000/06/28 15:39:33 mrg Exp $ */
|
||||
/* $NetBSD: osf1_file.c,v 1.8 2000/12/01 12:28:34 jdolecek Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1999 Christopher G. Demetriou. All rights reserved.
|
||||
|
@ -83,7 +83,7 @@
|
|||
|
||||
#include <compat/osf1/osf1.h>
|
||||
#include <compat/osf1/osf1_syscallargs.h>
|
||||
#include <compat/osf1/osf1_util.h>
|
||||
#include <compat/common/compat_util.h>
|
||||
#include <compat/osf1/osf1_cvt.h>
|
||||
|
||||
int
|
||||
|
@ -98,7 +98,7 @@ osf1_sys_access(p, v, retval)
|
|||
caddr_t sg;
|
||||
|
||||
sg = stackgap_init(p->p_emul);
|
||||
OSF1_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
SCARG(&a, path) = SCARG(uap, path);
|
||||
|
||||
|
@ -122,7 +122,7 @@ osf1_sys_execve(p, v, retval)
|
|||
caddr_t sg;
|
||||
|
||||
sg = stackgap_init(p->p_emul);
|
||||
OSF1_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
SCARG(&ap, path) = SCARG(uap, path);
|
||||
SCARG(&ap, argp) = SCARG(uap, argp);
|
||||
|
@ -149,7 +149,7 @@ osf1_sys_lstat(p, v, retval)
|
|||
caddr_t sg;
|
||||
|
||||
sg = stackgap_init(p->p_emul);
|
||||
OSF1_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
NDINIT(&nd, LOOKUP, NOFOLLOW | LOCKLEAF, UIO_USERSPACE,
|
||||
SCARG(uap, path), p);
|
||||
|
@ -175,7 +175,7 @@ osf1_sys_mknod(p, v, retval)
|
|||
caddr_t sg;
|
||||
|
||||
sg = stackgap_init(p->p_emul);
|
||||
OSF1_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
SCARG(&a, path) = SCARG(uap, path);
|
||||
SCARG(&a, mode) = SCARG(uap, mode);
|
||||
|
@ -217,9 +217,9 @@ osf1_sys_open(p, v, retval)
|
|||
/* pick appropriate path */
|
||||
path = SCARG(uap, path);
|
||||
if (SCARG(&a, flags) & O_CREAT)
|
||||
OSF1_CHECK_ALT_CREAT(p, &sg, path);
|
||||
CHECK_ALT_CREAT(p, &sg, path);
|
||||
else
|
||||
OSF1_CHECK_ALT_EXIST(p, &sg, path);
|
||||
CHECK_ALT_EXIST(p, &sg, path);
|
||||
SCARG(&a, path) = path;
|
||||
|
||||
return sys_open(p, &a, retval);
|
||||
|
@ -238,7 +238,7 @@ osf1_sys_pathconf(p, v, retval)
|
|||
|
||||
sg = stackgap_init(p->p_emul);
|
||||
|
||||
OSF1_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
SCARG(&a, path) = SCARG(uap, path);
|
||||
|
||||
error = osf1_cvt_pathconf_name_to_native(SCARG(uap, name),
|
||||
|
@ -268,7 +268,7 @@ osf1_sys_stat(p, v, retval)
|
|||
caddr_t sg;
|
||||
|
||||
sg = stackgap_init(p->p_emul);
|
||||
OSF1_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF, UIO_USERSPACE,
|
||||
SCARG(uap, path), p);
|
||||
|
@ -294,7 +294,7 @@ osf1_sys_truncate(p, v, retval)
|
|||
caddr_t sg;
|
||||
|
||||
sg = stackgap_init(p->p_emul);
|
||||
OSF1_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
SCARG(&a, path) = SCARG(uap, path);
|
||||
SCARG(&a, pad) = 0;
|
||||
|
@ -318,7 +318,7 @@ osf1_sys_utimes(p, v, retval)
|
|||
|
||||
sg = stackgap_init(p->p_emul);
|
||||
|
||||
OSF1_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
SCARG(&a, path) = SCARG(uap, path);
|
||||
|
||||
error = 0;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: osf1_misc.c,v 1.60 2000/11/22 08:40:47 thorpej Exp $ */
|
||||
/* $NetBSD: osf1_misc.c,v 1.61 2000/12/01 12:28:34 jdolecek Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1999 Christopher G. Demetriou. All rights reserved.
|
||||
|
@ -88,15 +88,13 @@
|
|||
|
||||
#include <compat/osf1/osf1.h>
|
||||
#include <compat/osf1/osf1_syscallargs.h>
|
||||
#include <compat/osf1/osf1_util.h>
|
||||
#include <compat/common/compat_util.h>
|
||||
#include <compat/osf1/osf1_cvt.h>
|
||||
|
||||
#ifdef SYSCALL_DEBUG
|
||||
extern int scdebug;
|
||||
#endif
|
||||
|
||||
const char osf1_emul_path[] = "/emul/osf1";
|
||||
|
||||
int
|
||||
osf1_sys_classcntl(p, v, retval)
|
||||
struct proc *p;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: osf1_mount.c,v 1.15 1999/05/05 20:01:04 thorpej Exp $ */
|
||||
/* $NetBSD: osf1_mount.c,v 1.16 2000/12/01 12:28:34 jdolecek Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1999 Christopher G. Demetriou. All rights reserved.
|
||||
|
@ -72,7 +72,7 @@
|
|||
|
||||
#include <compat/osf1/osf1.h>
|
||||
#include <compat/osf1/osf1_syscallargs.h>
|
||||
#include <compat/osf1/osf1_util.h>
|
||||
#include <compat/common/compat_util.h>
|
||||
#include <compat/osf1/osf1_cvt.h>
|
||||
|
||||
#include <net/if.h>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: osf1_signal.c,v 1.17 2000/08/21 02:33:04 thorpej Exp $ */
|
||||
/* $NetBSD: osf1_signal.c,v 1.18 2000/12/01 12:28:34 jdolecek Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1999 Christopher G. Demetriou. All rights reserved.
|
||||
|
@ -47,7 +47,7 @@
|
|||
#include <compat/osf1/osf1.h>
|
||||
#include <compat/osf1/osf1_signal.h>
|
||||
#include <compat/osf1/osf1_syscallargs.h>
|
||||
#include <compat/osf1/osf1_util.h>
|
||||
#include <compat/common/compat_util.h>
|
||||
#include <compat/osf1/osf1_cvt.h>
|
||||
|
||||
#if 0
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: osf1_socket.c,v 1.5 1999/05/10 05:58:44 cgd Exp $ */
|
||||
/* $NetBSD: osf1_socket.c,v 1.6 2000/12/01 12:28:34 jdolecek Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1999 Christopher G. Demetriou. All rights reserved.
|
||||
|
@ -69,7 +69,7 @@
|
|||
|
||||
#include <compat/osf1/osf1.h>
|
||||
#include <compat/osf1/osf1_syscallargs.h>
|
||||
#include <compat/osf1/osf1_util.h>
|
||||
#include <compat/common/compat_util.h>
|
||||
#include <compat/osf1/osf1_cvt.h>
|
||||
|
||||
int
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
/* $NetBSD: osf1_util.h,v 1.5 1999/04/23 18:01:05 cgd Exp $ */
|
||||
|
||||
#ifndef _COMPAT_OSF1_OSF1_UTIL_H_
|
||||
#define _COMPAT_OSF1_OSF1_UTIL_H_
|
||||
|
||||
#include <compat/common/compat_util.h>
|
||||
|
||||
extern const char osf1_emul_path[];
|
||||
|
||||
#define OSF1_CHECK_ALT_EXIST(p, sgp, path) \
|
||||
CHECK_ALT_EXIST(p, sgp, osf1_emul_path, path)
|
||||
|
||||
#define OSF1_CHECK_ALT_CREAT(p, sgp, path) \
|
||||
CHECK_ALT_CREAT(p, sgp, osf1_emul_path, path)
|
||||
|
||||
#endif /* _COMPAT_OSF1_OSF1_UTIL_H_ */
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pecoff_exec.c,v 1.4 2000/11/21 00:37:55 jdolecek Exp $ */
|
||||
/* $NetBSD: pecoff_exec.c,v 1.5 2000/12/01 12:28:35 jdolecek Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2000 Masaru OKI
|
||||
|
@ -81,16 +81,12 @@ int pecoff_read_from __P((struct proc *p, struct vnode *vp, int pos,
|
|||
caddr_t buf, int siz));
|
||||
|
||||
|
||||
const char pecoff_emul_path[] = "/emul/pecoff";
|
||||
extern char sigcode[], esigcode[];
|
||||
|
||||
#if 0
|
||||
/*
|
||||
* For now, we use just emul_netbsd for pecoff binaries. This may change
|
||||
* later.
|
||||
*/
|
||||
#if notyet
|
||||
const struct emul emul_pecoff = {
|
||||
"pecoff",
|
||||
"/emul/pecoff",
|
||||
0,
|
||||
sendsig,
|
||||
SYS_syscall,
|
||||
|
@ -104,8 +100,7 @@ const struct emul emul_pecoff = {
|
|||
sigcode,
|
||||
esigcode,
|
||||
};
|
||||
#endif /* 0 */
|
||||
|
||||
#endif
|
||||
|
||||
void *
|
||||
pecoff_copyargs(pack, arginfo, stack, argp)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pecoff_util.h,v 1.1 2000/06/09 22:38:56 oki Exp $ */
|
||||
/* $NetBSD: pecoff_util.h,v 1.2 2000/12/01 12:28:35 jdolecek Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1994 The NetBSD Foundation, Inc.
|
||||
|
@ -76,12 +76,4 @@
|
|||
#define DPRINTF(a)
|
||||
#endif
|
||||
|
||||
extern const char pecoff_emul_path[];
|
||||
|
||||
#define PECOFF_CHECK_ALT_EXIST(p, sgp, path) \
|
||||
CHECK_ALT_EXIST(p, sgp, pecoff_emul_path, path)
|
||||
|
||||
#define PECOFF_CHECK_ALT_CREAT(p, sgp, path) \
|
||||
CHECK_ALT_CREAT(p, sgp, pecoff_emul_path, path)
|
||||
|
||||
#endif /* !_PECOFF_UTIL_H_ */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: sunos_exec.c,v 1.23 2000/11/24 10:21:30 scw Exp $ */
|
||||
/* $NetBSD: sunos_exec.c,v 1.24 2000/12/01 12:28:35 jdolecek Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1993 Theo de Raadt
|
||||
|
@ -69,10 +69,10 @@ extern struct sysent sunos_sysent[];
|
|||
extern const char * const sunos_syscallnames[];
|
||||
#endif
|
||||
extern char sunos_sigcode[], sunos_esigcode[];
|
||||
const char sunos_emul_path[] = "/emul/sunos";
|
||||
|
||||
struct emul emul_sunos = {
|
||||
"sunos",
|
||||
"/emul/path",
|
||||
NULL,
|
||||
sunos_sendsig,
|
||||
SUNOS_SYS_syscall,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: sunos_ioctl.c,v 1.32 2000/07/27 14:00:56 mrg Exp $ */
|
||||
/* $NetBSD: sunos_ioctl.c,v 1.33 2000/12/01 12:28:35 jdolecek Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1993 Markus Wild.
|
||||
|
@ -49,7 +49,7 @@
|
|||
|
||||
#include <compat/sunos/sunos.h>
|
||||
#include <compat/sunos/sunos_syscallargs.h>
|
||||
#include <compat/sunos/sunos_util.h>
|
||||
#include <compat/common/compat_util.h>
|
||||
|
||||
/*
|
||||
* SunOS ioctl calls.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: sunos_misc.c,v 1.105 2000/06/28 15:39:35 mrg Exp $ */
|
||||
/* $NetBSD: sunos_misc.c,v 1.106 2000/12/01 12:28:35 jdolecek Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -93,7 +93,7 @@
|
|||
|
||||
#include <compat/sunos/sunos.h>
|
||||
#include <compat/sunos/sunos_syscallargs.h>
|
||||
#include <compat/sunos/sunos_util.h>
|
||||
#include <compat/common/compat_util.h>
|
||||
#include <compat/sunos/sunos_dirent.h>
|
||||
|
||||
#include <netinet/in.h>
|
||||
|
@ -156,7 +156,7 @@ sunos_sys_creat(p, v, retval)
|
|||
struct sys_open_args ouap;
|
||||
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
SUNOS_CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
|
||||
|
||||
SCARG(&ouap, path) = SCARG(uap, path);
|
||||
SCARG(&ouap, flags) = O_WRONLY | O_CREAT | O_TRUNC;
|
||||
|
@ -173,7 +173,7 @@ sunos_sys_access(p, v, retval)
|
|||
{
|
||||
struct sunos_sys_access_args *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
SUNOS_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return (sys_access(p, uap, retval));
|
||||
}
|
||||
|
@ -186,7 +186,7 @@ sunos_sys_stat(p, v, retval)
|
|||
{
|
||||
struct sunos_sys_stat_args *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
SUNOS_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return (compat_43_sys_stat(p, uap, retval));
|
||||
}
|
||||
|
@ -199,7 +199,7 @@ sunos_sys_lstat(p, v, retval)
|
|||
{
|
||||
struct sunos_sys_lstat_args *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
SUNOS_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return (compat_43_sys_lstat(p, uap, retval));
|
||||
}
|
||||
|
@ -218,7 +218,7 @@ sunos_sys_execv(p, v, retval)
|
|||
caddr_t sg;
|
||||
|
||||
sg = stackgap_init(p->p_emul);
|
||||
SUNOS_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
SCARG(&ap, path) = SCARG(uap, path);
|
||||
SCARG(&ap, argp) = SCARG(uap, argp);
|
||||
|
@ -242,7 +242,7 @@ sunos_sys_execve(p, v, retval)
|
|||
caddr_t sg;
|
||||
|
||||
sg = stackgap_init(p->p_emul);
|
||||
SUNOS_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
SCARG(&ap, path) = SCARG(uap, path);
|
||||
SCARG(&ap, argp) = SCARG(uap, argp);
|
||||
|
@ -808,9 +808,9 @@ sunos_sys_open(p, v, retval)
|
|||
r |= ((l & 0x2000) ? O_FSYNC : 0);
|
||||
|
||||
if (r & O_CREAT)
|
||||
SUNOS_CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
|
||||
else
|
||||
SUNOS_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
SCARG(uap, flags) = r;
|
||||
ret = sys_open(p, (struct sys_open_args *)uap, retval);
|
||||
|
@ -949,7 +949,7 @@ sunos_sys_statfs(p, v, retval)
|
|||
struct nameidata nd;
|
||||
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
SUNOS_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
NDINIT(&nd, LOOKUP, FOLLOW, UIO_USERSPACE, SCARG(uap, path), p);
|
||||
if ((error = namei(&nd)) != 0)
|
||||
|
@ -1011,7 +1011,7 @@ sunos_sys_mknod(p, v, retval)
|
|||
struct sunos_sys_mknod_args *uap = v;
|
||||
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
SUNOS_CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
|
||||
|
||||
if (S_ISFIFO(SCARG(uap, mode)))
|
||||
return sys_mkfifo(p, uap, retval);
|
||||
|
|
|
@ -1,79 +0,0 @@
|
|||
/* $NetBSD: sunos_util.h,v 1.6 1999/02/09 20:29:24 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1994 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Matthew R. Green
|
||||
* All rights reserved.
|
||||
*
|
||||
* 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. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 _SUNOS_UTIL_H_
|
||||
#define _SUNOS_UTIL_H_
|
||||
|
||||
#include <compat/common/compat_util.h>
|
||||
|
||||
extern const char sunos_emul_path[];
|
||||
|
||||
#define SUNOS_CHECK_ALT_EXIST(p, sgp, path) \
|
||||
CHECK_ALT_EXIST(p, sgp, sunos_emul_path, path)
|
||||
|
||||
#define SUNOS_CHECK_ALT_CREAT(p, sgp, path) \
|
||||
CHECK_ALT_CREAT(p, sgp, sunos_emul_path, path)
|
||||
|
||||
#endif /* !_SUNOS_UTIL_H_ */
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: svr4_exec.c,v 1.34 2000/11/21 00:37:55 jdolecek Exp $ */
|
||||
/* $NetBSD: svr4_exec.c,v 1.35 2000/12/01 12:28:35 jdolecek Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1994 The NetBSD Foundation, Inc.
|
||||
|
@ -60,13 +60,13 @@
|
|||
#include <compat/svr4/svr4_errno.h>
|
||||
#include <compat/svr4/svr4_signal.h>
|
||||
|
||||
const char svr4_emul_path[] = "/emul/svr4";
|
||||
extern char svr4_sigcode[], svr4_esigcode[];
|
||||
extern struct sysent svr4_sysent[];
|
||||
extern const char * const svr4_syscallnames[];
|
||||
|
||||
const struct emul emul_svr4 = {
|
||||
"svr4",
|
||||
"/emul/svr4",
|
||||
native_to_svr4_errno,
|
||||
svr4_sendsig,
|
||||
SVR4_SYS_syscall,
|
||||
|
@ -123,7 +123,8 @@ svr4_elf32_probe(p, epp, eh, itp, pos)
|
|||
size_t len;
|
||||
|
||||
if (itp[0]) {
|
||||
if ((error = emul_find(p, NULL, svr4_emul_path, itp, &bp, 0)))
|
||||
if ((error = emul_find(p, NULL, epp->ep_esch->es_emul->e_path,
|
||||
itp, &bp, 0)))
|
||||
return error;
|
||||
if ((error = copystr(bp, itp, MAXPATHLEN, &len)))
|
||||
return error;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: svr4_fcntl.c,v 1.35 2000/07/27 14:00:56 mrg Exp $ */
|
||||
/* $NetBSD: svr4_fcntl.c,v 1.36 2000/12/01 12:28:36 jdolecek Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1994, 1997 The NetBSD Foundation, Inc.
|
||||
|
@ -374,9 +374,9 @@ svr4_sys_open(p, v, retval)
|
|||
SCARG(&cup, flags) = svr4_to_bsd_flags(SCARG(uap, flags));
|
||||
|
||||
if (SCARG(&cup, flags) & O_CREAT)
|
||||
SVR4_CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
|
||||
else
|
||||
SVR4_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
SCARG(&cup, path) = SCARG(uap, path);
|
||||
SCARG(&cup, mode) = SCARG(uap, mode);
|
||||
|
@ -418,7 +418,7 @@ svr4_sys_creat(p, v, retval)
|
|||
struct sys_open_args cup;
|
||||
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
SVR4_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
SCARG(&cup, path) = SCARG(uap, path);
|
||||
SCARG(&cup, mode) = SCARG(uap, mode);
|
||||
|
@ -471,7 +471,7 @@ svr4_sys_access(p, v, retval)
|
|||
struct sys_access_args cup;
|
||||
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
SVR4_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
SCARG(&cup, path) = SCARG(uap, path);
|
||||
SCARG(&cup, flags) = SCARG(uap, flags);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: svr4_misc.c,v 1.88 2000/09/21 21:24:33 jdolecek Exp $ */
|
||||
/* $NetBSD: svr4_misc.c,v 1.89 2000/12/01 12:28:36 jdolecek Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1994 The NetBSD Foundation, Inc.
|
||||
|
@ -182,7 +182,7 @@ svr4_sys_execv(p, v, retval)
|
|||
caddr_t sg;
|
||||
|
||||
sg = stackgap_init(p->p_emul);
|
||||
SVR4_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
SCARG(&ap, path) = SCARG(uap, path);
|
||||
SCARG(&ap, argp) = SCARG(uap, argp);
|
||||
|
@ -207,7 +207,7 @@ svr4_sys_execve(p, v, retval)
|
|||
caddr_t sg;
|
||||
|
||||
sg = stackgap_init(p->p_emul);
|
||||
SVR4_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
SCARG(&ap, path) = SCARG(uap, path);
|
||||
SCARG(&ap, argp) = SCARG(uap, argp);
|
||||
|
@ -566,7 +566,7 @@ svr4_mknod(p, retval, path, mode, dev)
|
|||
{
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
SVR4_CHECK_ALT_CREAT(p, &sg, path);
|
||||
CHECK_ALT_CREAT(p, &sg, path);
|
||||
|
||||
if (S_ISFIFO(mode)) {
|
||||
struct sys_mkfifo_args ap;
|
||||
|
@ -1358,7 +1358,7 @@ svr4_sys_statvfs(p, v, retval)
|
|||
struct svr4_statvfs sfs;
|
||||
int error;
|
||||
|
||||
SVR4_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
SCARG(&fs_args, path) = SCARG(uap, path);
|
||||
SCARG(&fs_args, buf) = fs;
|
||||
|
||||
|
@ -1417,7 +1417,7 @@ svr4_sys_statvfs64(p, v, retval)
|
|||
struct svr4_statvfs64 sfs;
|
||||
int error;
|
||||
|
||||
SVR4_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
SCARG(&fs_args, path) = SCARG(uap, path);
|
||||
SCARG(&fs_args, buf) = fs;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: svr4_stat.c,v 1.40 2000/08/29 14:33:28 sommerfeld Exp $ */
|
||||
/* $NetBSD: svr4_stat.c,v 1.41 2000/12/01 12:28:36 jdolecek Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1994 The NetBSD Foundation, Inc.
|
||||
|
@ -182,7 +182,7 @@ svr4_sys_stat(p, v, retval)
|
|||
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
SCARG(&cup, ub) = stackgap_alloc(&sg, sizeof(struct stat));
|
||||
SVR4_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
SCARG(&cup, path) = SCARG(uap, path);
|
||||
|
||||
if ((error = sys___stat13(p, &cup, retval)) != 0)
|
||||
|
@ -226,7 +226,7 @@ svr4_sys_lstat(p, v, retval)
|
|||
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
SCARG(&cup, ub) = stackgap_alloc(&sg, sizeof(struct stat));
|
||||
SVR4_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
SCARG(&cup, path) = SCARG(uap, path);
|
||||
|
||||
if ((error = sys___lstat13(p, &cup, retval)) != 0)
|
||||
|
@ -304,7 +304,7 @@ svr4_sys_xstat(p, v, retval)
|
|||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
SCARG(&cup, ub) = stackgap_alloc(&sg, sizeof(struct stat));
|
||||
SVR4_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
SCARG(&cup, path) = SCARG(uap, path);
|
||||
|
||||
if ((error = sys___stat13(p, &cup, retval)) != 0)
|
||||
|
@ -340,7 +340,7 @@ svr4_sys_lxstat(p, v, retval)
|
|||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
SCARG(&cup, ub) = stackgap_alloc(&sg, sizeof(struct stat));
|
||||
SVR4_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
SCARG(&cup, path) = SCARG(uap, path);
|
||||
|
||||
if ((error = sys___lstat13(p, &cup, retval)) != 0)
|
||||
|
@ -408,7 +408,7 @@ svr4_sys_stat64(p, v, retval)
|
|||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
SCARG(&cup, ub) = stackgap_alloc(&sg, sizeof(struct stat));
|
||||
SVR4_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
SCARG(&cup, path) = SCARG(uap, path);
|
||||
|
||||
if ((error = sys___stat13(p, &cup, retval)) != 0)
|
||||
|
@ -444,7 +444,7 @@ svr4_sys_lstat64(p, v, retval)
|
|||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
SCARG(&cup, ub) = stackgap_alloc(&sg, sizeof(struct stat));
|
||||
SVR4_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
SCARG(&cup, path) = SCARG(uap, path);
|
||||
|
||||
if ((error = sys___lstat13(p, &cup, retval)) != 0)
|
||||
|
@ -723,7 +723,7 @@ svr4_sys_utime(p, v, retval)
|
|||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
ttp = stackgap_alloc(&sg, sizeof(tbuf));
|
||||
SVR4_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
SCARG(&ap, path) = SCARG(uap, path);
|
||||
if (SCARG(uap, ubuf) != NULL) {
|
||||
if ((error = copyin(SCARG(uap, ubuf), &ub, sizeof(ub))) != 0)
|
||||
|
@ -751,7 +751,7 @@ svr4_sys_utimes(p, v, retval)
|
|||
{
|
||||
struct svr4_sys_utimes_args *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
SVR4_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
return sys_utimes(p, uap, retval);
|
||||
}
|
||||
|
||||
|
@ -815,7 +815,7 @@ svr4_sys_pathconf(p, v, retval)
|
|||
struct svr4_sys_pathconf_args *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
|
||||
SVR4_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
SCARG(uap, name) = svr4_to_bsd_pathconf(SCARG(uap, name));
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: svr4_util.h,v 1.10 1999/02/09 20:46:41 christos Exp $ */
|
||||
/* $NetBSD: svr4_util.h,v 1.11 2000/12/01 12:28:36 jdolecek Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1994 The NetBSD Foundation, Inc.
|
||||
|
@ -47,12 +47,4 @@
|
|||
#define DPRINTF(a)
|
||||
#endif
|
||||
|
||||
extern const char svr4_emul_path[];
|
||||
|
||||
#define SVR4_CHECK_ALT_EXIST(p, sgp, path) \
|
||||
CHECK_ALT_EXIST(p, sgp, svr4_emul_path, path)
|
||||
|
||||
#define SVR4_CHECK_ALT_CREAT(p, sgp, path) \
|
||||
CHECK_ALT_CREAT(p, sgp, svr4_emul_path, path)
|
||||
|
||||
#endif /* !_SVR4_UTIL_H_ */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ultrix_misc.c,v 1.61 2000/11/21 00:37:55 jdolecek Exp $ */
|
||||
/* $NetBSD: ultrix_misc.c,v 1.62 2000/12/01 12:28:36 jdolecek Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995, 1997 Jonathan Stone (hereinafter referred to as the author)
|
||||
|
@ -169,6 +169,7 @@ extern char ultrix_sigcode[], ultrix_esigcode[];
|
|||
|
||||
const struct emul emul_ultrix = {
|
||||
"ultrix",
|
||||
"/emul/ultrix",
|
||||
NULL,
|
||||
sendsig,
|
||||
ULTRIX_SYS_syscall,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ultrix_pathname.c,v 1.10 2000/03/30 11:27:21 augustss Exp $ */
|
||||
/* $NetBSD: ultrix_pathname.c,v 1.11 2000/12/01 12:28:36 jdolecek Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -75,9 +75,8 @@
|
|||
#include <sys/proc.h>
|
||||
|
||||
#include <compat/ultrix/ultrix_syscallargs.h>
|
||||
#include <compat/ultrix/ultrix_util.h>
|
||||
#include <compat/common/compat_util.h>
|
||||
|
||||
const char ultrix_emul_path[] = "/emul/ultrix";
|
||||
static int ultrixstatfs __P((struct statfs *sp, caddr_t buf));
|
||||
|
||||
int
|
||||
|
@ -90,7 +89,7 @@ ultrix_sys_creat(p, v, retval)
|
|||
struct sys_open_args ap;
|
||||
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
ULTRIX_CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
|
||||
|
||||
SCARG(&ap, path) = SCARG(uap, path);
|
||||
SCARG(&ap, flags) = O_WRONLY | O_CREAT | O_TRUNC;
|
||||
|
@ -108,7 +107,7 @@ ultrix_sys_access(p, v, retval)
|
|||
{
|
||||
struct ultrix_sys_access_args *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
ULTRIX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return (sys_access(p, uap, retval));
|
||||
}
|
||||
|
@ -121,7 +120,7 @@ ultrix_sys_stat(p, v, retval)
|
|||
{
|
||||
struct ultrix_sys_stat_args *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
ULTRIX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return (compat_43_sys_stat(p, uap, retval));
|
||||
}
|
||||
|
@ -134,7 +133,7 @@ ultrix_sys_lstat(p, v, retval)
|
|||
{
|
||||
struct ultrix_sys_lstat_args *uap = v;
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
ULTRIX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
return (compat_43_sys_lstat(p, uap, retval));
|
||||
}
|
||||
|
@ -153,7 +152,7 @@ ultrix_sys_execv(p, v, retval)
|
|||
caddr_t sg;
|
||||
|
||||
sg = stackgap_init(p->p_emul);
|
||||
ULTRIX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
SCARG(&ap, path) = SCARG(uap, path);
|
||||
SCARG(&ap, argp) = SCARG(uap, argp);
|
||||
|
@ -177,7 +176,7 @@ ultrix_sys_execve(p, v, retval)
|
|||
caddr_t sg;
|
||||
|
||||
sg = stackgap_init(p->p_emul);
|
||||
ULTRIX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
SCARG(&ap, path) = SCARG(uap, path);
|
||||
SCARG(&ap, argp) = SCARG(uap, argp);
|
||||
|
@ -209,9 +208,9 @@ ultrix_sys_open(p, v, retval)
|
|||
r |= ((l & 0x2000) ? O_FSYNC : 0);
|
||||
|
||||
if (r & O_CREAT)
|
||||
ULTRIX_CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
|
||||
else
|
||||
ULTRIX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
SCARG(uap, flags) = r;
|
||||
ret = sys_open(p, (struct sys_open_args *)uap, retval);
|
||||
|
||||
|
@ -278,7 +277,7 @@ ultrix_sys_statfs(p, v, retval)
|
|||
struct nameidata nd;
|
||||
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
ULTRIX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
NDINIT(&nd, LOOKUP, FOLLOW, UIO_USERSPACE, SCARG(uap, path), p);
|
||||
if ((error = namei(&nd)) != 0)
|
||||
|
@ -333,7 +332,7 @@ ultrix_sys_mknod(p, v, retval)
|
|||
struct ultrix_sys_mknod_args *uap = v;
|
||||
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
ULTRIX_CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
|
||||
|
||||
if (S_ISFIFO(SCARG(uap, mode)))
|
||||
return sys_mkfifo(p, uap, retval);
|
||||
|
|
|
@ -1,79 +0,0 @@
|
|||
/* $NetBSD: ultrix_util.h,v 1.5 1999/02/09 20:30:38 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1994 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Matthew R. Green
|
||||
* All rights reserved.
|
||||
*
|
||||
* 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. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 _ULTRIX_UTIL_H_
|
||||
#define _ULTRIX_UTIL_H_
|
||||
|
||||
#include <compat/common/compat_util.h>
|
||||
|
||||
extern const char ultrix_emul_path[];
|
||||
|
||||
#define ULTRIX_CHECK_ALT_EXIST(p, sgp, path) \
|
||||
CHECK_ALT_EXIST(p, sgp, ultrix_emul_path, path)
|
||||
|
||||
#define ULTRIX_CHECK_ALT_CREAT(p, sgp, path) \
|
||||
CHECK_ALT_CREAT(p, sgp, ultrix_emul_path, path)
|
||||
|
||||
#endif /* !_ULTRIX_UTIL_H_ */
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: kern_exec.c,v 1.126 2000/11/28 12:24:34 mrg Exp $ */
|
||||
/* $NetBSD: kern_exec.c,v 1.127 2000/12/01 12:28:31 jdolecek Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (C) 1993, 1994, 1996 Christopher G. Demetriou
|
||||
|
@ -69,6 +69,7 @@ extern const char * const syscallnames[];
|
|||
|
||||
const struct emul emul_netbsd = {
|
||||
"netbsd",
|
||||
NULL, /* emulation path */
|
||||
NULL,
|
||||
sendsig,
|
||||
SYS_syscall,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: proc.h,v 1.111 2000/11/21 00:37:56 jdolecek Exp $ */
|
||||
/* $NetBSD: proc.h,v 1.112 2000/12/01 12:28:30 jdolecek Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1986, 1989, 1991, 1993
|
||||
|
@ -83,9 +83,11 @@ struct pgrp {
|
|||
*/
|
||||
struct exec_package;
|
||||
struct ps_strings;
|
||||
struct trapframe;
|
||||
|
||||
struct emul {
|
||||
char e_name[8]; /* Symbolic name */
|
||||
const char *e_path; /* Extra emulation path (NULL if none)*/
|
||||
int *e_errno; /* Errno array */
|
||||
/* Signal sending function */
|
||||
void (*e_sendsig) __P((sig_t, int, sigset_t *, u_long));
|
||||
|
@ -96,10 +98,15 @@ struct emul {
|
|||
char *e_sigcode; /* Start of sigcode */
|
||||
char *e_esigcode; /* End of sigcode */
|
||||
|
||||
/* Per-process hooks */
|
||||
/* Per-process hooks */
|
||||
void (*e_proc_exec) __P((struct proc *, struct exec_package *));
|
||||
void (*e_proc_fork) __P((struct proc *p, struct proc *parent));
|
||||
void (*e_proc_exit) __P((struct proc *));
|
||||
|
||||
int e_flags; /* Miscellaneous flags */
|
||||
/* Syscall handling function */
|
||||
void (*e_syscall) __P((struct trapframe *));
|
||||
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue