Use FreeBSD emulation to get pathname lookups in /emul/darwin. These FreeBSD

emulated system call just check in /emul and call the native system call.
This commit is contained in:
manu 2002-11-14 21:47:15 +00:00
parent 09495207e1
commit 897d942130
7 changed files with 402 additions and 578 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: darwin_syscall.h,v 1.2 2002/11/12 23:40:22 manu Exp $ */
/* $NetBSD: darwin_syscall.h,v 1.3 2002/11/14 21:47:15 manu Exp $ */
/*
* System call numbers.
@ -31,7 +31,8 @@
/* syscall: "wait4" ret: "int" args: "int" "int *" "int" "struct rusage *" */
#define DARWIN_SYS_wait4 7
#define DARWIN_SYS_compat_43_ocreat 8
/* syscall: "ocreat" ret: "int" args: "const char *" "mode_t" */
#define DARWIN_SYS_ocreat 8
/* syscall: "link" ret: "int" args: "const char *" "const char *" */
#define DARWIN_SYS_link 9
@ -60,7 +61,8 @@
/* syscall: "getfsstat" ret: "int" args: "struct statfs *" "long" "int" */
#define DARWIN_SYS_getfsstat 18
#define DARWIN_SYS_compat_43_olseek 19
/* syscall: "olseek" ret: "long" args: "int" "long" "int" */
#define DARWIN_SYS_olseek 19
/* syscall: "getpid" ret: "pid_t" args: */
#define DARWIN_SYS_getpid 20
@ -116,12 +118,14 @@
/* syscall: "kill" ret: "int" args: "int" "int" */
#define DARWIN_SYS_kill 37
#define DARWIN_SYS_compat_43_stat43 38
/* syscall: "stat43" ret: "int" args: "const char *" "struct stat43 *" */
#define DARWIN_SYS_stat43 38
/* syscall: "getppid" ret: "pid_t" args: */
#define DARWIN_SYS_getppid 39
#define DARWIN_SYS_compat_43_lstat43 40
/* syscall: "lstat43" ret: "int" args: "const char *" "struct stat43 *" */
#define DARWIN_SYS_lstat43 40
/* syscall: "dup" ret: "int" args: "int" */
#define DARWIN_SYS_dup 41
@ -139,12 +143,14 @@
#define DARWIN_SYS_ktrace 45
/* 45 is excluded ktrace */
#define DARWIN_SYS_compat_13_sigaction13 46
/* syscall: "sigaction13" ret: "int" args: "int" "const struct sigaction13 *" "struct sigaction13 *" */
#define DARWIN_SYS_sigaction13 46
/* syscall: "getgid" ret: "gid_t" args: */
#define DARWIN_SYS_getgid 47
#define DARWIN_SYS_compat_13_sigprocmask13 48
/* syscall: "sigprocmask13" ret: "int" args: "int" "int" */
#define DARWIN_SYS_sigprocmask13 48
/* syscall: "__getlogin" ret: "int" args: "char *" "size_t" */
#define DARWIN_SYS___getlogin 49
@ -155,14 +161,17 @@
/* syscall: "acct" ret: "int" args: "const char *" */
#define DARWIN_SYS_acct 51
#define DARWIN_SYS_compat_13_sigpending13 52
/* syscall: "sigpending13" ret: "int" args: */
#define DARWIN_SYS_sigpending13 52
#define DARWIN_SYS_compat_13_sigaltstack13 53
/* syscall: "sigaltstack13" ret: "int" args: "const struct sigaltstack13 *" "struct sigaltstack13 *" */
#define DARWIN_SYS_sigaltstack13 53
/* syscall: "ioctl" ret: "int" args: "int" "u_long" "..." */
#define DARWIN_SYS_ioctl 54
#define DARWIN_SYS_compat_12_oreboot 55
/* syscall: "oreboot" ret: "int" args: "int" */
#define DARWIN_SYS_oreboot 55
/* syscall: "revoke" ret: "int" args: "const char *" */
#define DARWIN_SYS_revoke 56
@ -182,11 +191,14 @@
/* syscall: "chroot" ret: "int" args: "const char *" */
#define DARWIN_SYS_chroot 61
#define DARWIN_SYS_compat_43_fstat43 62
/* syscall: "fstat43" ret: "int" args: "int" "struct stat43 *" */
#define DARWIN_SYS_fstat43 62
#define DARWIN_SYS_compat_43_ogetpagesize 64
/* syscall: "ogetpagesize" ret: "int" args: */
#define DARWIN_SYS_ogetpagesize 64
#define DARWIN_SYS_compat_12_msync 65
/* syscall: "msync" ret: "int" args: "caddr_t" "size_t" */
#define DARWIN_SYS_msync 65
/* syscall: "vfork" ret: "int" args: */
#define DARWIN_SYS_vfork 66
@ -199,7 +211,8 @@
/* syscall: "sstk" ret: "int" args: "int" */
#define DARWIN_SYS_sstk 70
#define DARWIN_SYS_compat_43_ommap 71
/* syscall: "ommap" ret: "int" args: "caddr_t" "size_t" "int" "int" "int" "long" */
#define DARWIN_SYS_ommap 71
/* syscall: "vadvise" ret: "int" args: "int" */
#define DARWIN_SYS_vadvise 72
@ -231,18 +244,23 @@
/* syscall: "setitimer" ret: "int" args: "int" "const struct itimerval *" "struct itimerval *" */
#define DARWIN_SYS_setitimer 83
#define DARWIN_SYS_compat_43_owait 84
/* syscall: "owait" ret: "int" args: */
#define DARWIN_SYS_owait 84
#define DARWIN_SYS_compat_12_oswapon 85
/* syscall: "oswapon" ret: "int" args: "const char *" */
#define DARWIN_SYS_oswapon 85
/* syscall: "getitimer" ret: "int" args: "int" "struct itimerval *" */
#define DARWIN_SYS_getitimer 86
#define DARWIN_SYS_compat_43_ogethostname 87
/* syscall: "ogethostname" ret: "int" args: "char *" "u_int" */
#define DARWIN_SYS_ogethostname 87
#define DARWIN_SYS_compat_43_osethostname 88
/* syscall: "osethostname" ret: "int" args: "char *" "u_int" */
#define DARWIN_SYS_osethostname 88
#define DARWIN_SYS_compat_43_ogetdtablesize 89
/* syscall: "ogetdtablesize" ret: "int" args: */
#define DARWIN_SYS_ogetdtablesize 89
/* syscall: "dup2" ret: "int" args: "int" "int" */
#define DARWIN_SYS_dup2 90
@ -265,16 +283,20 @@
/* syscall: "connect" ret: "int" args: "int" "const struct sockaddr *" "unsigned int" */
#define DARWIN_SYS_connect 98
#define DARWIN_SYS_compat_43_oaccept 99
/* syscall: "oaccept" ret: "int" args: "int" "caddr_t" "int *" */
#define DARWIN_SYS_oaccept 99
/* syscall: "getpriority" ret: "int" args: "int" "int" */
#define DARWIN_SYS_getpriority 100
#define DARWIN_SYS_compat_43_osend 101
/* syscall: "osend" ret: "int" args: "int" "caddr_t" "int" "int" */
#define DARWIN_SYS_osend 101
#define DARWIN_SYS_compat_43_orecv 102
/* syscall: "orecv" ret: "int" args: "int" "caddr_t" "int" "int" */
#define DARWIN_SYS_orecv 102
#define DARWIN_SYS_compat_13_sigreturn13 103
/* syscall: "sigreturn13" ret: "int" args: "struct sigcontext13 *" */
#define DARWIN_SYS_sigreturn13 103
/* syscall: "bind" ret: "int" args: "int" "const struct sockaddr *" "unsigned int" */
#define DARWIN_SYS_bind 104
@ -285,19 +307,26 @@
/* syscall: "listen" ret: "int" args: "int" "int" */
#define DARWIN_SYS_listen 106
#define DARWIN_SYS_compat_43_osigvec 108
/* syscall: "osigvec" ret: "int" args: "int" "struct sigvec *" "struct sigvec *" */
#define DARWIN_SYS_osigvec 108
#define DARWIN_SYS_compat_43_osigblock 109
/* syscall: "osigblock" ret: "int" args: "int" */
#define DARWIN_SYS_osigblock 109
#define DARWIN_SYS_compat_43_osigsetmask 110
/* syscall: "osigsetmask" ret: "int" args: "int" */
#define DARWIN_SYS_osigsetmask 110
#define DARWIN_SYS_compat_13_sigsuspend13 111
/* syscall: "sigsuspend13" ret: "int" args: "int" */
#define DARWIN_SYS_sigsuspend13 111
#define DARWIN_SYS_compat_43_osigstack 112
/* syscall: "osigstack" ret: "int" args: "struct sigstack *" "struct sigstack *" */
#define DARWIN_SYS_osigstack 112
#define DARWIN_SYS_compat_43_orecvmsg 113
/* syscall: "orecvmsg" ret: "int" args: "int" "struct omsghdr *" "int" */
#define DARWIN_SYS_orecvmsg 113
#define DARWIN_SYS_compat_43_osendmsg 114
/* syscall: "osendmsg" ret: "int" args: "int" "caddr_t" "int" */
#define DARWIN_SYS_osendmsg 114
/* syscall: "gettimeofday" ret: "int" args: "struct timeval *" "struct timezone *" */
#define DARWIN_SYS_gettimeofday 116
@ -323,7 +352,8 @@
/* syscall: "fchmod" ret: "int" args: "int" "mode_t" */
#define DARWIN_SYS_fchmod 124
#define DARWIN_SYS_compat_43_orecvfrom 125
/* syscall: "orecvfrom" ret: "int" args: "int" "caddr_t" "size_t" "int" "caddr_t" "int *" */
#define DARWIN_SYS_orecvfrom 125
/* syscall: "setreuid" ret: "int" args: "uid_t" "uid_t" */
#define DARWIN_SYS_setreuid 126
@ -334,9 +364,11 @@
/* syscall: "rename" ret: "int" args: "const char *" "const char *" */
#define DARWIN_SYS_rename 128
#define DARWIN_SYS_compat_43_otruncate 129
/* syscall: "otruncate" ret: "int" args: "const char *" "long" */
#define DARWIN_SYS_otruncate 129
#define DARWIN_SYS_compat_43_oftruncate 130
/* syscall: "oftruncate" ret: "int" args: "int" "long" */
#define DARWIN_SYS_oftruncate 130
/* syscall: "flock" ret: "int" args: "int" "int" */
#define DARWIN_SYS_flock 131
@ -365,26 +397,33 @@
/* syscall: "adjtime" ret: "int" args: "const struct timeval *" "struct timeval *" */
#define DARWIN_SYS_adjtime 140
#define DARWIN_SYS_compat_43_ogetpeername 141
/* syscall: "ogetpeername" ret: "int" args: "int" "caddr_t" "int *" */
#define DARWIN_SYS_ogetpeername 141
#define DARWIN_SYS_compat_43_ogethostid 142
/* syscall: "ogethostid" ret: "int32_t" args: */
#define DARWIN_SYS_ogethostid 142
#define DARWIN_SYS_compat_43_ogetrlimit 144
/* syscall: "ogetrlimit" ret: "int" args: "int" "struct orlimit *" */
#define DARWIN_SYS_ogetrlimit 144
#define DARWIN_SYS_compat_43_osetrlimit 145
/* syscall: "osetrlimit" ret: "int" args: "int" "const struct orlimit *" */
#define DARWIN_SYS_osetrlimit 145
#define DARWIN_SYS_compat_43_okillpg 146
/* syscall: "okillpg" ret: "int" args: "int" "int" */
#define DARWIN_SYS_okillpg 146
/* syscall: "setsid" ret: "int" args: */
#define DARWIN_SYS_setsid 147
#define DARWIN_SYS_compat_43_ogetsockname 150
/* syscall: "ogetsockname" ret: "int" args: "int" "caddr_t" "int *" */
#define DARWIN_SYS_ogetsockname 150
/* syscall: "nfssvc" ret: "int" args: "int" "void *" */
#define DARWIN_SYS_nfssvc 155
/* 155 is excluded nfssvc */
#define DARWIN_SYS_compat_43_ogetdirentries 156
/* syscall: "ogetdirentries" ret: "int" args: "int" "char *" "u_int" "long *" */
#define DARWIN_SYS_ogetdirentries 156
/* syscall: "statfs" ret: "int" args: "const char *" "struct statfs *" */
#define DARWIN_SYS_statfs 157
@ -395,9 +434,12 @@
/* syscall: "getfh" ret: "int" args: "const char *" "fhandle_t *" */
#define DARWIN_SYS_getfh 161
#define DARWIN_SYS_compat_09_ogetdomainname 162
/* 161 is excluded getfh */
/* syscall: "ogetdomainname" ret: "int" args: "char *" "int" */
#define DARWIN_SYS_ogetdomainname 162
#define DARWIN_SYS_compat_09_osetdomainname 163
/* syscall: "osetdomainname" ret: "int" args: "char *" "int" */
#define DARWIN_SYS_osetdomainname 163
/* syscall: "setgid" ret: "int" args: "gid_t" */
#define DARWIN_SYS_setgid 181
@ -408,11 +450,14 @@
/* syscall: "seteuid" ret: "int" args: "uid_t" */
#define DARWIN_SYS_seteuid 183
#define DARWIN_SYS_compat_12_stat12 188
/* syscall: "stat12" ret: "int" args: "const char *" "struct stat12 *" */
#define DARWIN_SYS_stat12 188
#define DARWIN_SYS_compat_12_fstat12 189
/* syscall: "fstat12" ret: "int" args: "int" "struct stat12 *" */
#define DARWIN_SYS_fstat12 189
#define DARWIN_SYS_compat_12_lstat12 190
/* syscall: "lstat12" ret: "int" args: "const char *" "struct stat12 *" */
#define DARWIN_SYS_lstat12 190
/* syscall: "pathconf" ret: "long" args: "const char *" "int" */
#define DARWIN_SYS_pathconf 191
@ -426,7 +471,8 @@
/* syscall: "setrlimit" ret: "int" args: "int" "const struct rlimit *" */
#define DARWIN_SYS_setrlimit 195
#define DARWIN_SYS_compat_12_getdirentries 196
/* syscall: "getdirentries" ret: "int" args: "int" "char *" "u_int" "long *" */
#define DARWIN_SYS_getdirentries 196
/* syscall: "mmap" ret: "void *" args: "void *" "size_t" "int" "int" "int" "long" "off_t" */
#define DARWIN_SYS_mmap 197

View File

@ -1,4 +1,4 @@
/* $NetBSD: darwin_syscallargs.h,v 1.2 2002/11/12 23:40:23 manu Exp $ */
/* $NetBSD: darwin_syscallargs.h,v 1.3 2002/11/14 21:47:15 manu Exp $ */
/*
* System call argument lists.
@ -27,224 +27,6 @@
} be; \
}
struct compat_43_sys_creat_args {
syscallarg(const char *) path;
syscallarg(mode_t) mode;
};
struct compat_43_sys_lseek_args {
syscallarg(int) fd;
syscallarg(long) offset;
syscallarg(int) whence;
};
struct compat_43_sys_stat_args {
syscallarg(const char *) path;
syscallarg(struct stat43 *) ub;
};
struct compat_43_sys_lstat_args {
syscallarg(const char *) path;
syscallarg(struct stat43 *) ub;
};
struct compat_13_sys_sigaction_args {
syscallarg(int) signum;
syscallarg(const struct sigaction13 *) nsa;
syscallarg(struct sigaction13 *) osa;
};
struct compat_13_sys_sigprocmask_args {
syscallarg(int) how;
syscallarg(int) mask;
};
struct compat_13_sys_sigaltstack_args {
syscallarg(const struct sigaltstack13 *) nss;
syscallarg(struct sigaltstack13 *) oss;
};
struct compat_12_sys_reboot_args {
syscallarg(int) opt;
};
struct compat_43_sys_fstat_args {
syscallarg(int) fd;
syscallarg(struct stat43 *) sb;
};
struct compat_12_sys_msync_args {
syscallarg(caddr_t) addr;
syscallarg(size_t) len;
};
struct compat_43_sys_mmap_args {
syscallarg(caddr_t) addr;
syscallarg(size_t) len;
syscallarg(int) prot;
syscallarg(int) flags;
syscallarg(int) fd;
syscallarg(long) pos;
};
struct compat_12_sys_swapon_args {
syscallarg(const char *) name;
};
struct compat_43_sys_gethostname_args {
syscallarg(char *) hostname;
syscallarg(u_int) len;
};
struct compat_43_sys_sethostname_args {
syscallarg(char *) hostname;
syscallarg(u_int) len;
};
struct compat_43_sys_accept_args {
syscallarg(int) s;
syscallarg(caddr_t) name;
syscallarg(int *) anamelen;
};
struct compat_43_sys_send_args {
syscallarg(int) s;
syscallarg(caddr_t) buf;
syscallarg(int) len;
syscallarg(int) flags;
};
struct compat_43_sys_recv_args {
syscallarg(int) s;
syscallarg(caddr_t) buf;
syscallarg(int) len;
syscallarg(int) flags;
};
struct compat_13_sys_sigreturn_args {
syscallarg(struct sigcontext13 *) sigcntxp;
};
struct compat_43_sys_sigvec_args {
syscallarg(int) signum;
syscallarg(struct sigvec *) nsv;
syscallarg(struct sigvec *) osv;
};
struct compat_43_sys_sigblock_args {
syscallarg(int) mask;
};
struct compat_43_sys_sigsetmask_args {
syscallarg(int) mask;
};
struct compat_13_sys_sigsuspend_args {
syscallarg(int) mask;
};
struct compat_43_sys_sigstack_args {
syscallarg(struct sigstack *) nss;
syscallarg(struct sigstack *) oss;
};
struct compat_43_sys_recvmsg_args {
syscallarg(int) s;
syscallarg(struct omsghdr *) msg;
syscallarg(int) flags;
};
struct compat_43_sys_sendmsg_args {
syscallarg(int) s;
syscallarg(caddr_t) msg;
syscallarg(int) flags;
};
struct compat_43_sys_recvfrom_args {
syscallarg(int) s;
syscallarg(caddr_t) buf;
syscallarg(size_t) len;
syscallarg(int) flags;
syscallarg(caddr_t) from;
syscallarg(int *) fromlenaddr;
};
struct compat_43_sys_truncate_args {
syscallarg(const char *) path;
syscallarg(long) length;
};
struct compat_43_sys_ftruncate_args {
syscallarg(int) fd;
syscallarg(long) length;
};
struct compat_43_sys_getpeername_args {
syscallarg(int) fdes;
syscallarg(caddr_t) asa;
syscallarg(int *) alen;
};
struct compat_43_sys_getrlimit_args {
syscallarg(int) which;
syscallarg(struct orlimit *) rlp;
};
struct compat_43_sys_setrlimit_args {
syscallarg(int) which;
syscallarg(const struct orlimit *) rlp;
};
struct compat_43_sys_killpg_args {
syscallarg(int) pgid;
syscallarg(int) signum;
};
struct compat_43_sys_getsockname_args {
syscallarg(int) fdec;
syscallarg(caddr_t) asa;
syscallarg(int *) alen;
};
struct compat_43_sys_getdirentries_args {
syscallarg(int) fd;
syscallarg(char *) buf;
syscallarg(u_int) count;
syscallarg(long *) basep;
};
struct compat_09_sys_getdomainname_args {
syscallarg(char *) domainname;
syscallarg(int) len;
};
struct compat_09_sys_setdomainname_args {
syscallarg(char *) domainname;
syscallarg(int) len;
};
struct compat_12_sys_stat_args {
syscallarg(const char *) path;
syscallarg(struct stat12 *) ub;
};
struct compat_12_sys_fstat_args {
syscallarg(int) fd;
syscallarg(struct stat12 *) sb;
};
struct compat_12_sys_lstat_args {
syscallarg(const char *) path;
syscallarg(struct stat12 *) ub;
};
struct compat_12_sys_getdirentries_args {
syscallarg(int) fd;
syscallarg(char *) buf;
syscallarg(u_int) count;
syscallarg(long *) basep;
};
/*
* System call prototypes.
*/
@ -253,20 +35,20 @@ int sys_exit(struct proc *, void *, register_t *);
int sys_fork(struct proc *, void *, register_t *);
int sys_read(struct proc *, void *, register_t *);
int sys_write(struct proc *, void *, register_t *);
int sys_open(struct proc *, void *, register_t *);
int freebsd_sys_open(struct proc *, void *, register_t *);
int sys_close(struct proc *, void *, register_t *);
int sys_wait4(struct proc *, void *, register_t *);
int compat_43_sys_creat(struct proc *, void *, register_t *);
int sys_link(struct proc *, void *, register_t *);
int sys_unlink(struct proc *, void *, register_t *);
int sys_chdir(struct proc *, void *, register_t *);
int compat_43_freebsd_sys_creat(struct proc *, void *, register_t *);
int freebsd_sys_link(struct proc *, void *, register_t *);
int freebsd_sys_unlink(struct proc *, void *, register_t *);
int freebsd_sys_chdir(struct proc *, void *, register_t *);
int sys_fchdir(struct proc *, void *, register_t *);
int sys_mknod(struct proc *, void *, register_t *);
int sys_chmod(struct proc *, void *, register_t *);
int sys_chown(struct proc *, void *, register_t *);
int freebsd_sys_mknod(struct proc *, void *, register_t *);
int freebsd_sys_chmod(struct proc *, void *, register_t *);
int freebsd_sys_chown(struct proc *, void *, register_t *);
int sys_obreak(struct proc *, void *, register_t *);
int sys_getfsstat(struct proc *, void *, register_t *);
int compat_43_sys_lseek(struct proc *, void *, register_t *);
int sys_lseek(struct proc *, void *, register_t *);
#ifdef COMPAT_43
int sys_getpid_with_ppid(struct proc *, void *, register_t *);
#else
@ -288,14 +70,14 @@ int sys_recvfrom(struct proc *, void *, register_t *);
int sys_accept(struct proc *, void *, register_t *);
int sys_getpeername(struct proc *, void *, register_t *);
int sys_getsockname(struct proc *, void *, register_t *);
int sys_access(struct proc *, void *, register_t *);
int sys_chflags(struct proc *, void *, register_t *);
int freebsd_sys_access(struct proc *, void *, register_t *);
int freebsd_sys_chflags(struct proc *, void *, register_t *);
int sys_fchflags(struct proc *, void *, register_t *);
int sys_sync(struct proc *, void *, register_t *);
int sys_kill(struct proc *, void *, register_t *);
int compat_43_sys_stat(struct proc *, void *, register_t *);
int compat_43_freebsd_sys_stat(struct proc *, void *, register_t *);
int sys_getppid(struct proc *, void *, register_t *);
int compat_43_sys_lstat(struct proc *, void *, register_t *);
int compat_43_freebsd_sys_lstat(struct proc *, void *, register_t *);
int sys_dup(struct proc *, void *, register_t *);
int sys_pipe(struct proc *, void *, register_t *);
int sys_getegid(struct proc *, void *, register_t *);
@ -317,20 +99,20 @@ int sys_acct(struct proc *, void *, register_t *);
int compat_13_sys_sigpending(struct proc *, void *, register_t *);
int compat_13_sys_sigaltstack(struct proc *, void *, register_t *);
int sys_ioctl(struct proc *, void *, register_t *);
int compat_12_sys_reboot(struct proc *, void *, register_t *);
int sys_revoke(struct proc *, void *, register_t *);
int sys_symlink(struct proc *, void *, register_t *);
int sys_readlink(struct proc *, void *, register_t *);
int sys_execve(struct proc *, void *, register_t *);
int sys_reboot(struct proc *, void *, register_t *);
int freebsd_sys_revoke(struct proc *, void *, register_t *);
int freebsd_sys_symlink(struct proc *, void *, register_t *);
int freebsd_sys_readlink(struct proc *, void *, register_t *);
int freebsd_sys_execve(struct proc *, void *, register_t *);
int sys_umask(struct proc *, void *, register_t *);
int sys_chroot(struct proc *, void *, register_t *);
int freebsd_sys_chroot(struct proc *, void *, register_t *);
int compat_43_sys_fstat(struct proc *, void *, register_t *);
int compat_43_sys_getpagesize(struct proc *, void *, register_t *);
int compat_12_sys_msync(struct proc *, void *, register_t *);
int sys_vfork(struct proc *, void *, register_t *);
int sys_sbrk(struct proc *, void *, register_t *);
int sys_sstk(struct proc *, void *, register_t *);
int compat_43_sys_mmap(struct proc *, void *, register_t *);
int sys_mmap(struct proc *, void *, register_t *);
int sys_ovadvise(struct proc *, void *, register_t *);
int sys_munmap(struct proc *, void *, register_t *);
int sys_mprotect(struct proc *, void *, register_t *);
@ -380,16 +162,16 @@ int sys_fchmod(struct proc *, void *, register_t *);
int compat_43_sys_recvfrom(struct proc *, void *, register_t *);
int sys_setreuid(struct proc *, void *, register_t *);
int sys_setregid(struct proc *, void *, register_t *);
int sys_rename(struct proc *, void *, register_t *);
int compat_43_sys_truncate(struct proc *, void *, register_t *);
int freebsd_sys_rename(struct proc *, void *, register_t *);
int compat_43_freebsd_sys_truncate(struct proc *, void *, register_t *);
int compat_43_sys_ftruncate(struct proc *, void *, register_t *);
int sys_flock(struct proc *, void *, register_t *);
int sys_mkfifo(struct proc *, void *, register_t *);
int freebsd_sys_mkfifo(struct proc *, void *, register_t *);
int sys_sendto(struct proc *, void *, register_t *);
int sys_shutdown(struct proc *, void *, register_t *);
int sys_socketpair(struct proc *, void *, register_t *);
int sys_mkdir(struct proc *, void *, register_t *);
int sys_rmdir(struct proc *, void *, register_t *);
int freebsd_sys_mkdir(struct proc *, void *, register_t *);
int freebsd_sys_rmdir(struct proc *, void *, register_t *);
int sys_utimes(struct proc *, void *, register_t *);
int sys_adjtime(struct proc *, void *, register_t *);
int compat_43_sys_getpeername(struct proc *, void *, register_t *);
@ -404,25 +186,28 @@ int sys_nfssvc(struct proc *, void *, register_t *);
#else
#endif
int compat_43_sys_getdirentries(struct proc *, void *, register_t *);
int sys_statfs(struct proc *, void *, register_t *);
int freebsd_sys_statfs(struct proc *, void *, register_t *);
int sys_fstatfs(struct proc *, void *, register_t *);
int sys_getfh(struct proc *, void *, register_t *);
#if defined(NFS) || defined(NFSSERVER) || !defined(_KERNEL)
int freebsd_sys_getfh(struct proc *, void *, register_t *);
#else
#endif
int compat_09_sys_getdomainname(struct proc *, void *, register_t *);
int compat_09_sys_setdomainname(struct proc *, void *, register_t *);
int sys_setgid(struct proc *, void *, register_t *);
int sys_setegid(struct proc *, void *, register_t *);
int sys_seteuid(struct proc *, void *, register_t *);
int compat_12_sys_stat(struct proc *, void *, register_t *);
int freebsd_sys_stat(struct proc *, void *, register_t *);
int compat_12_sys_fstat(struct proc *, void *, register_t *);
int compat_12_sys_lstat(struct proc *, void *, register_t *);
int sys_pathconf(struct proc *, void *, register_t *);
int freebsd_sys_lstat(struct proc *, void *, register_t *);
int freebsd_sys_pathconf(struct proc *, void *, register_t *);
int sys_fpathconf(struct proc *, void *, register_t *);
int sys_getrlimit(struct proc *, void *, register_t *);
int sys_setrlimit(struct proc *, void *, register_t *);
int compat_12_sys_getdirentries(struct proc *, void *, register_t *);
int sys_mmap(struct proc *, void *, register_t *);
int sys_lseek(struct proc *, void *, register_t *);
int sys_truncate(struct proc *, void *, register_t *);
int compat_43_sys_lseek(struct proc *, void *, register_t *);
int freebsd_sys_truncate(struct proc *, void *, register_t *);
int sys_ftruncate(struct proc *, void *, register_t *);
int sys___sysctl(struct proc *, void *, register_t *);
int sys_mlock(struct proc *, void *, register_t *);

View File

@ -1,4 +1,4 @@
/* $NetBSD: darwin_syscalls.c,v 1.2 2002/11/12 23:40:23 manu Exp $ */
/* $NetBSD: darwin_syscalls.c,v 1.3 2002/11/14 21:47:15 manu Exp $ */
/*
* System call names.
@ -8,7 +8,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: darwin_syscalls.c,v 1.2 2002/11/12 23:40:23 manu Exp $");
__KERNEL_RCSID(0, "$NetBSD: darwin_syscalls.c,v 1.3 2002/11/14 21:47:15 manu Exp $");
#if defined(_KERNEL_OPT)
#include "opt_ktrace.h"
@ -24,6 +24,7 @@ __KERNEL_RCSID(0, "$NetBSD: darwin_syscalls.c,v 1.2 2002/11/12 23:40:23 manu Exp
#include <sys/signal.h>
#include <sys/mount.h>
#include <sys/syscallargs.h>
#include <compat/freebsd/freebsd_syscallargs.h>
#endif /* _KERNEL_OPT */
const char *const darwin_syscallnames[] = {
@ -35,7 +36,7 @@ const char *const darwin_syscallnames[] = {
"open", /* 5 = open */
"close", /* 6 = close */
"wait4", /* 7 = wait4 */
"compat_43_ocreat", /* 8 = compat_43 ocreat */
"ocreat", /* 8 = ocreat */
"link", /* 9 = link */
"unlink", /* 10 = unlink */
"#11 (unimplemented execv)", /* 11 = unimplemented execv */
@ -46,7 +47,7 @@ const char *const darwin_syscallnames[] = {
"chown", /* 16 = chown */
"break", /* 17 = break */
"getfsstat", /* 18 = getfsstat */
"compat_43_olseek", /* 19 = compat_43 olseek */
"olseek", /* 19 = olseek */
#ifdef COMPAT_43
"getpid", /* 20 = getpid */
#else
@ -73,9 +74,9 @@ const char *const darwin_syscallnames[] = {
"fchflags", /* 35 = fchflags */
"sync", /* 36 = sync */
"kill", /* 37 = kill */
"compat_43_stat43", /* 38 = compat_43 stat43 */
"stat43", /* 38 = stat43 */
"getppid", /* 39 = getppid */
"compat_43_lstat43", /* 40 = compat_43 lstat43 */
"lstat43", /* 40 = lstat43 */
"dup", /* 41 = dup */
"pipe", /* 42 = pipe */
"getegid", /* 43 = getegid */
@ -85,36 +86,36 @@ const char *const darwin_syscallnames[] = {
#else
"#45 (excluded ktrace)", /* 45 = excluded ktrace */
#endif
"compat_13_sigaction13", /* 46 = compat_13 sigaction13 */
"sigaction13", /* 46 = sigaction13 */
#ifdef COMPAT_43
"getgid", /* 47 = getgid */
#else
"getgid", /* 47 = getgid */
#endif
"compat_13_sigprocmask13", /* 48 = compat_13 sigprocmask13 */
"sigprocmask13", /* 48 = sigprocmask13 */
"__getlogin", /* 49 = __getlogin */
"setlogin", /* 50 = setlogin */
"acct", /* 51 = acct */
"compat_13_sigpending13", /* 52 = compat_13 sigpending13 */
"compat_13_sigaltstack13", /* 53 = compat_13 sigaltstack13 */
"sigpending13", /* 52 = sigpending13 */
"sigaltstack13", /* 53 = sigaltstack13 */
"ioctl", /* 54 = ioctl */
"compat_12_oreboot", /* 55 = compat_12 oreboot */
"oreboot", /* 55 = oreboot */
"revoke", /* 56 = revoke */
"symlink", /* 57 = symlink */
"readlink", /* 58 = readlink */
"execve", /* 59 = execve */
"umask", /* 60 = umask */
"chroot", /* 61 = chroot */
"compat_43_fstat43", /* 62 = compat_43 fstat43 */
"fstat43", /* 62 = fstat43 */
"#63 (unimplemented)", /* 63 = unimplemented */
"compat_43_ogetpagesize", /* 64 = compat_43 ogetpagesize */
"compat_12_msync", /* 65 = compat_12 msync */
"ogetpagesize", /* 64 = ogetpagesize */
"msync", /* 65 = msync */
"vfork", /* 66 = vfork */
"#67 (obsolete vread)", /* 67 = obsolete vread */
"#68 (obsolete vwrite)", /* 68 = obsolete vwrite */
"sbrk", /* 69 = sbrk */
"sstk", /* 70 = sstk */
"compat_43_ommap", /* 71 = compat_43 ommap */
"ommap", /* 71 = ommap */
"vadvise", /* 72 = vadvise */
"munmap", /* 73 = munmap */
"mprotect", /* 74 = mprotect */
@ -127,12 +128,12 @@ const char *const darwin_syscallnames[] = {
"getpgrp", /* 81 = getpgrp */
"setpgid", /* 82 = setpgid */
"setitimer", /* 83 = setitimer */
"compat_43_owait", /* 84 = compat_43 owait */
"compat_12_oswapon", /* 85 = compat_12 oswapon */
"owait", /* 84 = owait */
"oswapon", /* 85 = oswapon */
"getitimer", /* 86 = getitimer */
"compat_43_ogethostname", /* 87 = compat_43 ogethostname */
"compat_43_osethostname", /* 88 = compat_43 osethostname */
"compat_43_ogetdtablesize", /* 89 = compat_43 ogetdtablesize */
"ogethostname", /* 87 = ogethostname */
"osethostname", /* 88 = osethostname */
"ogetdtablesize", /* 89 = ogetdtablesize */
"dup2", /* 90 = dup2 */
"#91 (unimplemented)", /* 91 = unimplemented */
"fcntl", /* 92 = fcntl */
@ -142,22 +143,22 @@ const char *const darwin_syscallnames[] = {
"setpriority", /* 96 = setpriority */
"socket", /* 97 = socket */
"connect", /* 98 = connect */
"compat_43_oaccept", /* 99 = compat_43 oaccept */
"oaccept", /* 99 = oaccept */
"getpriority", /* 100 = getpriority */
"compat_43_osend", /* 101 = compat_43 osend */
"compat_43_orecv", /* 102 = compat_43 orecv */
"compat_13_sigreturn13", /* 103 = compat_13 sigreturn13 */
"osend", /* 101 = osend */
"orecv", /* 102 = orecv */
"sigreturn13", /* 103 = sigreturn13 */
"bind", /* 104 = bind */
"setsockopt", /* 105 = setsockopt */
"listen", /* 106 = listen */
"#107 (unimplemented)", /* 107 = unimplemented */
"compat_43_osigvec", /* 108 = compat_43 osigvec */
"compat_43_osigblock", /* 109 = compat_43 osigblock */
"compat_43_osigsetmask", /* 110 = compat_43 osigsetmask */
"compat_13_sigsuspend13", /* 111 = compat_13 sigsuspend13 */
"compat_43_osigstack", /* 112 = compat_43 osigstack */
"compat_43_orecvmsg", /* 113 = compat_43 orecvmsg */
"compat_43_osendmsg", /* 114 = compat_43 osendmsg */
"osigvec", /* 108 = osigvec */
"osigblock", /* 109 = osigblock */
"osigsetmask", /* 110 = osigsetmask */
"sigsuspend13", /* 111 = sigsuspend13 */
"osigstack", /* 112 = osigstack */
"orecvmsg", /* 113 = orecvmsg */
"osendmsg", /* 114 = osendmsg */
"#115 (unimplemented)", /* 115 = unimplemented */
"gettimeofday", /* 116 = gettimeofday */
"getrusage", /* 117 = getrusage */
@ -168,12 +169,12 @@ const char *const darwin_syscallnames[] = {
"settimeofday", /* 122 = settimeofday */
"fchown", /* 123 = fchown */
"fchmod", /* 124 = fchmod */
"compat_43_orecvfrom", /* 125 = compat_43 orecvfrom */
"orecvfrom", /* 125 = orecvfrom */
"setreuid", /* 126 = setreuid */
"setregid", /* 127 = setregid */
"rename", /* 128 = rename */
"compat_43_otruncate", /* 129 = compat_43 otruncate */
"compat_43_oftruncate", /* 130 = compat_43 oftruncate */
"otruncate", /* 129 = otruncate */
"oftruncate", /* 130 = oftruncate */
"flock", /* 131 = flock */
"mkfifo", /* 132 = mkfifo */
"sendto", /* 133 = sendto */
@ -184,16 +185,16 @@ const char *const darwin_syscallnames[] = {
"utimes", /* 138 = utimes */
"#139 (unimplemented futimes)", /* 139 = unimplemented futimes */
"adjtime", /* 140 = adjtime */
"compat_43_ogetpeername", /* 141 = compat_43 ogetpeername */
"compat_43_ogethostid", /* 142 = compat_43 ogethostid */
"ogetpeername", /* 141 = ogetpeername */
"ogethostid", /* 142 = ogethostid */
"#143 (unimplemented)", /* 143 = unimplemented */
"compat_43_ogetrlimit", /* 144 = compat_43 ogetrlimit */
"compat_43_osetrlimit", /* 145 = compat_43 osetrlimit */
"compat_43_okillpg", /* 146 = compat_43 okillpg */
"ogetrlimit", /* 144 = ogetrlimit */
"osetrlimit", /* 145 = osetrlimit */
"okillpg", /* 146 = okillpg */
"setsid", /* 147 = setsid */
"#148 (unimplemented)", /* 148 = unimplemented */
"#149 (unimplemented)", /* 149 = unimplemented */
"compat_43_ogetsockname", /* 150 = compat_43 ogetsockname */
"ogetsockname", /* 150 = ogetsockname */
"#151 (unimplemented getpgid)", /* 151 = unimplemented getpgid */
"#152 (unimplemented setprivexec)", /* 152 = unimplemented setprivexec */
"#153 (unimplemented pread)", /* 153 = unimplemented pread */
@ -203,14 +204,18 @@ const char *const darwin_syscallnames[] = {
#else
"#155 (excluded nfssvc)", /* 155 = excluded nfssvc */
#endif
"compat_43_ogetdirentries", /* 156 = compat_43 ogetdirentries */
"ogetdirentries", /* 156 = ogetdirentries */
"statfs", /* 157 = statfs */
"fstatfs", /* 158 = fstatfs */
"#159 (unimplemented unmount)", /* 159 = unimplemented unmount */
"#160 (unimplemented)", /* 160 = unimplemented */
#if defined(NFS) || defined(NFSSERVER) || !defined(_KERNEL)
"getfh", /* 161 = getfh */
"compat_09_ogetdomainname", /* 162 = compat_09 ogetdomainname */
"compat_09_osetdomainname", /* 163 = compat_09 osetdomainname */
#else
"#161 (excluded getfh)", /* 161 = excluded getfh */
#endif
"ogetdomainname", /* 162 = ogetdomainname */
"osetdomainname", /* 163 = osetdomainname */
"#164 (unimplemented)", /* 164 = unimplemented */
"#165 (unimplemented quotactl)", /* 165 = unimplemented quotactl */
"#166 (unimplemented)", /* 166 = unimplemented */
@ -235,15 +240,15 @@ const char *const darwin_syscallnames[] = {
"#185 (unimplemented)", /* 185 = unimplemented */
"#186 (unimplemented)", /* 186 = unimplemented */
"#187 (unimplemented)", /* 187 = unimplemented */
"compat_12_stat12", /* 188 = compat_12 stat12 */
"compat_12_fstat12", /* 189 = compat_12 fstat12 */
"compat_12_lstat12", /* 190 = compat_12 lstat12 */
"stat12", /* 188 = stat12 */
"fstat12", /* 189 = fstat12 */
"lstat12", /* 190 = lstat12 */
"pathconf", /* 191 = pathconf */
"fpathconf", /* 192 = fpathconf */
"#193 (unimplemented getfsstat)", /* 193 = unimplemented getfsstat */
"getrlimit", /* 194 = getrlimit */
"setrlimit", /* 195 = setrlimit */
"compat_12_getdirentries", /* 196 = compat_12 getdirentries */
"getdirentries", /* 196 = getdirentries */
"mmap", /* 197 = mmap */
"#198 (unimplemented)", /* 198 = unimplemented */
"lseek", /* 199 = lseek */

View File

@ -1,4 +1,4 @@
/* $NetBSD: darwin_sysent.c,v 1.2 2002/11/12 23:40:23 manu Exp $ */
/* $NetBSD: darwin_sysent.c,v 1.3 2002/11/14 21:47:15 manu Exp $ */
/*
* System call switch table.
@ -8,7 +8,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: darwin_sysent.c,v 1.2 2002/11/12 23:40:23 manu Exp $");
__KERNEL_RCSID(0, "$NetBSD: darwin_sysent.c,v 1.3 2002/11/14 21:47:15 manu Exp $");
#include "opt_ktrace.h"
#include "opt_nfsserver.h"
@ -23,48 +23,7 @@ __KERNEL_RCSID(0, "$NetBSD: darwin_sysent.c,v 1.2 2002/11/12 23:40:23 manu Exp $
#include <sys/signal.h>
#include <sys/mount.h>
#include <sys/syscallargs.h>
#ifdef COMPAT_43
#define compat_43(func) __CONCAT(compat_43_,func)
#else
#define compat_43(func) sys_nosys
#endif
#ifdef COMPAT_09
#define compat_09(func) __CONCAT(compat_09_,func)
#else
#define compat_09(func) sys_nosys
#endif
#ifdef COMPAT_10
#define compat_10(func) __CONCAT(compat_10_,func)
#else
#define compat_10(func) sys_nosys
#endif
#ifdef COMPAT_11
#define compat_11(func) __CONCAT(compat_11_,func)
#else
#define compat_11(func) sys_nosys
#endif
#ifdef COMPAT_12
#define compat_12(func) __CONCAT(compat_12_,func)
#else
#define compat_12(func) sys_nosys
#endif
#ifdef COMPAT_13
#define compat_13(func) __CONCAT(compat_13_,func)
#else
#define compat_13(func) sys_nosys
#endif
#ifdef COMPAT_14
#define compat_14(func) __CONCAT(compat_14_,func)
#else
#define compat_14(func) sys_nosys
#endif
#include <compat/freebsd/freebsd_syscallargs.h>
#define s(type) sizeof(type)
@ -79,36 +38,36 @@ struct sysent darwin_sysent[] = {
sys_read }, /* 3 = read */
{ 3, s(struct sys_write_args), 0,
sys_write }, /* 4 = write */
{ 3, s(struct sys_open_args), 0,
sys_open }, /* 5 = open */
{ 3, s(struct freebsd_sys_open_args), 0,
freebsd_sys_open }, /* 5 = open */
{ 1, s(struct sys_close_args), 0,
sys_close }, /* 6 = close */
{ 4, s(struct sys_wait4_args), 0,
sys_wait4 }, /* 7 = wait4 */
{ 2, s(struct compat_43_sys_creat_args), 0,
compat_43(sys_creat) }, /* 8 = compat_43 ocreat */
{ 2, s(struct sys_link_args), 0,
sys_link }, /* 9 = link */
{ 1, s(struct sys_unlink_args), 0,
sys_unlink }, /* 10 = unlink */
{ 2, s(struct compat_43_freebsd_sys_creat_args), 0,
compat_43_freebsd_sys_creat }, /* 8 = ocreat */
{ 2, s(struct freebsd_sys_link_args), 0,
freebsd_sys_link }, /* 9 = link */
{ 1, s(struct freebsd_sys_unlink_args), 0,
freebsd_sys_unlink }, /* 10 = unlink */
{ 0, 0, 0,
sys_nosys }, /* 11 = unimplemented execv */
{ 1, s(struct sys_chdir_args), 0,
sys_chdir }, /* 12 = chdir */
{ 1, s(struct freebsd_sys_chdir_args), 0,
freebsd_sys_chdir }, /* 12 = chdir */
{ 1, s(struct sys_fchdir_args), 0,
sys_fchdir }, /* 13 = fchdir */
{ 3, s(struct sys_mknod_args), 0,
sys_mknod }, /* 14 = mknod */
{ 2, s(struct sys_chmod_args), 0,
sys_chmod }, /* 15 = chmod */
{ 3, s(struct sys_chown_args), 0,
sys_chown }, /* 16 = chown */
{ 3, s(struct freebsd_sys_mknod_args), 0,
freebsd_sys_mknod }, /* 14 = mknod */
{ 2, s(struct freebsd_sys_chmod_args), 0,
freebsd_sys_chmod }, /* 15 = chmod */
{ 3, s(struct freebsd_sys_chown_args), 0,
freebsd_sys_chown }, /* 16 = chown */
{ 1, s(struct sys_obreak_args), 0,
sys_obreak }, /* 17 = break */
{ 3, s(struct sys_getfsstat_args), 0,
sys_getfsstat }, /* 18 = getfsstat */
{ 3, s(struct compat_43_sys_lseek_args), 0,
compat_43(sys_lseek) }, /* 19 = compat_43 olseek */
{ 3, s(struct sys_lseek_args), 0,
sys_lseek }, /* 19 = olseek */
#ifdef COMPAT_43
{ 0, 0, 0,
sys_getpid_with_ppid }, /* 20 = getpid */
@ -145,22 +104,22 @@ struct sysent darwin_sysent[] = {
sys_getpeername }, /* 31 = getpeername */
{ 3, s(struct sys_getsockname_args), 0,
sys_getsockname }, /* 32 = getsockname */
{ 2, s(struct sys_access_args), 0,
sys_access }, /* 33 = access */
{ 2, s(struct sys_chflags_args), 0,
sys_chflags }, /* 34 = chflags */
{ 2, s(struct freebsd_sys_access_args), 0,
freebsd_sys_access }, /* 33 = access */
{ 2, s(struct freebsd_sys_chflags_args), 0,
freebsd_sys_chflags }, /* 34 = chflags */
{ 2, s(struct sys_fchflags_args), 0,
sys_fchflags }, /* 35 = fchflags */
{ 0, 0, 0,
sys_sync }, /* 36 = sync */
{ 2, s(struct sys_kill_args), 0,
sys_kill }, /* 37 = kill */
{ 2, s(struct compat_43_sys_stat_args), 0,
compat_43(sys_stat) }, /* 38 = compat_43 stat43 */
{ 2, s(struct compat_43_freebsd_sys_stat_args), 0,
compat_43_freebsd_sys_stat }, /* 38 = stat43 */
{ 0, 0, 0,
sys_getppid }, /* 39 = getppid */
{ 2, s(struct compat_43_sys_lstat_args), 0,
compat_43(sys_lstat) }, /* 40 = compat_43 lstat43 */
{ 2, s(struct compat_43_freebsd_sys_lstat_args), 0,
compat_43_freebsd_sys_lstat }, /* 40 = lstat43 */
{ 1, s(struct sys_dup_args), 0,
sys_dup }, /* 41 = dup */
{ 0, 0, 0,
@ -177,7 +136,7 @@ struct sysent darwin_sysent[] = {
sys_nosys }, /* 45 = excluded ktrace */
#endif
{ 3, s(struct compat_13_sys_sigaction_args), 0,
compat_13(sys_sigaction) }, /* 46 = compat_13 sigaction13 */
compat_13_sys_sigaction }, /* 46 = sigaction13 */
#ifdef COMPAT_43
{ 0, 0, 0,
sys_getgid_with_egid }, /* 47 = getgid */
@ -186,7 +145,7 @@ struct sysent darwin_sysent[] = {
sys_getgid }, /* 47 = getgid */
#endif
{ 2, s(struct compat_13_sys_sigprocmask_args), 0,
compat_13(sys_sigprocmask) }, /* 48 = compat_13 sigprocmask13 */
compat_13_sys_sigprocmask }, /* 48 = sigprocmask13 */
{ 2, s(struct sys___getlogin_args), 0,
sys___getlogin }, /* 49 = __getlogin */
{ 1, s(struct sys_setlogin_args), 0,
@ -194,33 +153,33 @@ struct sysent darwin_sysent[] = {
{ 1, s(struct sys_acct_args), 0,
sys_acct }, /* 51 = acct */
{ 0, 0, 0,
compat_13(sys_sigpending) }, /* 52 = compat_13 sigpending13 */
compat_13_sys_sigpending }, /* 52 = sigpending13 */
{ 2, s(struct compat_13_sys_sigaltstack_args), 0,
compat_13(sys_sigaltstack) }, /* 53 = compat_13 sigaltstack13 */
compat_13_sys_sigaltstack }, /* 53 = sigaltstack13 */
{ 3, s(struct sys_ioctl_args), 0,
sys_ioctl }, /* 54 = ioctl */
{ 1, s(struct compat_12_sys_reboot_args), 0,
compat_12(sys_reboot) }, /* 55 = compat_12 oreboot */
{ 1, s(struct sys_revoke_args), 0,
sys_revoke }, /* 56 = revoke */
{ 2, s(struct sys_symlink_args), 0,
sys_symlink }, /* 57 = symlink */
{ 3, s(struct sys_readlink_args), 0,
sys_readlink }, /* 58 = readlink */
{ 3, s(struct sys_execve_args), 0,
sys_execve }, /* 59 = execve */
{ 1, s(struct sys_reboot_args), 0,
sys_reboot }, /* 55 = oreboot */
{ 1, s(struct freebsd_sys_revoke_args), 0,
freebsd_sys_revoke }, /* 56 = revoke */
{ 2, s(struct freebsd_sys_symlink_args), 0,
freebsd_sys_symlink }, /* 57 = symlink */
{ 3, s(struct freebsd_sys_readlink_args), 0,
freebsd_sys_readlink }, /* 58 = readlink */
{ 3, s(struct freebsd_sys_execve_args), 0,
freebsd_sys_execve }, /* 59 = execve */
{ 1, s(struct sys_umask_args), 0,
sys_umask }, /* 60 = umask */
{ 1, s(struct sys_chroot_args), 0,
sys_chroot }, /* 61 = chroot */
{ 1, s(struct freebsd_sys_chroot_args), 0,
freebsd_sys_chroot }, /* 61 = chroot */
{ 2, s(struct compat_43_sys_fstat_args), 0,
compat_43(sys_fstat) }, /* 62 = compat_43 fstat43 */
compat_43_sys_fstat }, /* 62 = fstat43 */
{ 0, 0, 0,
sys_nosys }, /* 63 = unimplemented */
{ 0, 0, 0,
compat_43(sys_getpagesize) }, /* 64 = compat_43 ogetpagesize */
compat_43_sys_getpagesize }, /* 64 = ogetpagesize */
{ 2, s(struct compat_12_sys_msync_args), 0,
compat_12(sys_msync) }, /* 65 = compat_12 msync */
compat_12_sys_msync }, /* 65 = msync */
{ 0, 0, 0,
sys_vfork }, /* 66 = vfork */
{ 0, 0, 0,
@ -231,8 +190,8 @@ struct sysent darwin_sysent[] = {
sys_sbrk }, /* 69 = sbrk */
{ 1, s(struct sys_sstk_args), 0,
sys_sstk }, /* 70 = sstk */
{ 6, s(struct compat_43_sys_mmap_args), 0,
compat_43(sys_mmap) }, /* 71 = compat_43 ommap */
{ 6, s(struct sys_mmap_args), 0,
sys_mmap }, /* 71 = ommap */
{ 1, s(struct sys_ovadvise_args), 0,
sys_ovadvise }, /* 72 = vadvise */
{ 2, s(struct sys_munmap_args), 0,
@ -258,17 +217,17 @@ struct sysent darwin_sysent[] = {
{ 3, s(struct sys_setitimer_args), 0,
sys_setitimer }, /* 83 = setitimer */
{ 0, 0, 0,
compat_43(sys_wait) }, /* 84 = compat_43 owait */
compat_43_sys_wait }, /* 84 = owait */
{ 1, s(struct compat_12_sys_swapon_args), 0,
compat_12(sys_swapon) }, /* 85 = compat_12 oswapon */
compat_12_sys_swapon }, /* 85 = oswapon */
{ 2, s(struct sys_getitimer_args), 0,
sys_getitimer }, /* 86 = getitimer */
{ 2, s(struct compat_43_sys_gethostname_args), 0,
compat_43(sys_gethostname) }, /* 87 = compat_43 ogethostname */
compat_43_sys_gethostname }, /* 87 = ogethostname */
{ 2, s(struct compat_43_sys_sethostname_args), 0,
compat_43(sys_sethostname) }, /* 88 = compat_43 osethostname */
compat_43_sys_sethostname }, /* 88 = osethostname */
{ 0, 0, 0,
compat_43(sys_getdtablesize) }, /* 89 = compat_43 ogetdtablesize */
compat_43_sys_getdtablesize }, /* 89 = ogetdtablesize */
{ 2, s(struct sys_dup2_args), 0,
sys_dup2 }, /* 90 = dup2 */
{ 0, 0, 0,
@ -288,15 +247,15 @@ struct sysent darwin_sysent[] = {
{ 3, s(struct sys_connect_args), 0,
sys_connect }, /* 98 = connect */
{ 3, s(struct compat_43_sys_accept_args), 0,
compat_43(sys_accept) }, /* 99 = compat_43 oaccept */
compat_43_sys_accept }, /* 99 = oaccept */
{ 2, s(struct sys_getpriority_args), 0,
sys_getpriority }, /* 100 = getpriority */
{ 4, s(struct compat_43_sys_send_args), 0,
compat_43(sys_send) }, /* 101 = compat_43 osend */
compat_43_sys_send }, /* 101 = osend */
{ 4, s(struct compat_43_sys_recv_args), 0,
compat_43(sys_recv) }, /* 102 = compat_43 orecv */
compat_43_sys_recv }, /* 102 = orecv */
{ 1, s(struct compat_13_sys_sigreturn_args), 0,
compat_13(sys_sigreturn) }, /* 103 = compat_13 sigreturn13 */
compat_13_sys_sigreturn }, /* 103 = sigreturn13 */
{ 3, s(struct sys_bind_args), 0,
sys_bind }, /* 104 = bind */
{ 5, s(struct sys_setsockopt_args), 0,
@ -306,19 +265,19 @@ struct sysent darwin_sysent[] = {
{ 0, 0, 0,
sys_nosys }, /* 107 = unimplemented */
{ 3, s(struct compat_43_sys_sigvec_args), 0,
compat_43(sys_sigvec) }, /* 108 = compat_43 osigvec */
compat_43_sys_sigvec }, /* 108 = osigvec */
{ 1, s(struct compat_43_sys_sigblock_args), 0,
compat_43(sys_sigblock) }, /* 109 = compat_43 osigblock */
compat_43_sys_sigblock }, /* 109 = osigblock */
{ 1, s(struct compat_43_sys_sigsetmask_args), 0,
compat_43(sys_sigsetmask) }, /* 110 = compat_43 osigsetmask */
compat_43_sys_sigsetmask }, /* 110 = osigsetmask */
{ 1, s(struct compat_13_sys_sigsuspend_args), 0,
compat_13(sys_sigsuspend) }, /* 111 = compat_13 sigsuspend13 */
compat_13_sys_sigsuspend }, /* 111 = sigsuspend13 */
{ 2, s(struct compat_43_sys_sigstack_args), 0,
compat_43(sys_sigstack) }, /* 112 = compat_43 osigstack */
compat_43_sys_sigstack }, /* 112 = osigstack */
{ 3, s(struct compat_43_sys_recvmsg_args), 0,
compat_43(sys_recvmsg) }, /* 113 = compat_43 orecvmsg */
compat_43_sys_recvmsg }, /* 113 = orecvmsg */
{ 3, s(struct compat_43_sys_sendmsg_args), 0,
compat_43(sys_sendmsg) }, /* 114 = compat_43 osendmsg */
compat_43_sys_sendmsg }, /* 114 = osendmsg */
{ 0, 0, 0,
sys_nosys }, /* 115 = unimplemented */
{ 2, s(struct sys_gettimeofday_args), 0,
@ -340,31 +299,31 @@ struct sysent darwin_sysent[] = {
{ 2, s(struct sys_fchmod_args), 0,
sys_fchmod }, /* 124 = fchmod */
{ 6, s(struct compat_43_sys_recvfrom_args), 0,
compat_43(sys_recvfrom) }, /* 125 = compat_43 orecvfrom */
compat_43_sys_recvfrom }, /* 125 = orecvfrom */
{ 2, s(struct sys_setreuid_args), 0,
sys_setreuid }, /* 126 = setreuid */
{ 2, s(struct sys_setregid_args), 0,
sys_setregid }, /* 127 = setregid */
{ 2, s(struct sys_rename_args), 0,
sys_rename }, /* 128 = rename */
{ 2, s(struct compat_43_sys_truncate_args), 0,
compat_43(sys_truncate) }, /* 129 = compat_43 otruncate */
{ 2, s(struct freebsd_sys_rename_args), 0,
freebsd_sys_rename }, /* 128 = rename */
{ 2, s(struct compat_43_freebsd_sys_truncate_args), 0,
compat_43_freebsd_sys_truncate }, /* 129 = otruncate */
{ 2, s(struct compat_43_sys_ftruncate_args), 0,
compat_43(sys_ftruncate) }, /* 130 = compat_43 oftruncate */
compat_43_sys_ftruncate }, /* 130 = oftruncate */
{ 2, s(struct sys_flock_args), 0,
sys_flock }, /* 131 = flock */
{ 2, s(struct sys_mkfifo_args), 0,
sys_mkfifo }, /* 132 = mkfifo */
{ 2, s(struct freebsd_sys_mkfifo_args), 0,
freebsd_sys_mkfifo }, /* 132 = mkfifo */
{ 6, s(struct sys_sendto_args), 0,
sys_sendto }, /* 133 = sendto */
{ 2, s(struct sys_shutdown_args), 0,
sys_shutdown }, /* 134 = shutdown */
{ 4, s(struct sys_socketpair_args), 0,
sys_socketpair }, /* 135 = socketpair */
{ 2, s(struct sys_mkdir_args), 0,
sys_mkdir }, /* 136 = mkdir */
{ 1, s(struct sys_rmdir_args), 0,
sys_rmdir }, /* 137 = rmdir */
{ 2, s(struct freebsd_sys_mkdir_args), 0,
freebsd_sys_mkdir }, /* 136 = mkdir */
{ 1, s(struct freebsd_sys_rmdir_args), 0,
freebsd_sys_rmdir }, /* 137 = rmdir */
{ 2, s(struct sys_utimes_args), 0,
sys_utimes }, /* 138 = utimes */
{ 0, 0, 0,
@ -372,17 +331,17 @@ struct sysent darwin_sysent[] = {
{ 2, s(struct sys_adjtime_args), 0,
sys_adjtime }, /* 140 = adjtime */
{ 3, s(struct compat_43_sys_getpeername_args), 0,
compat_43(sys_getpeername) }, /* 141 = compat_43 ogetpeername */
compat_43_sys_getpeername }, /* 141 = ogetpeername */
{ 0, 0, 0,
compat_43(sys_gethostid) }, /* 142 = compat_43 ogethostid */
compat_43_sys_gethostid }, /* 142 = ogethostid */
{ 0, 0, 0,
sys_nosys }, /* 143 = unimplemented */
{ 2, s(struct compat_43_sys_getrlimit_args), 0,
compat_43(sys_getrlimit) }, /* 144 = compat_43 ogetrlimit */
compat_43_sys_getrlimit }, /* 144 = ogetrlimit */
{ 2, s(struct compat_43_sys_setrlimit_args), 0,
compat_43(sys_setrlimit) }, /* 145 = compat_43 osetrlimit */
compat_43_sys_setrlimit }, /* 145 = osetrlimit */
{ 2, s(struct compat_43_sys_killpg_args), 0,
compat_43(sys_killpg) }, /* 146 = compat_43 okillpg */
compat_43_sys_killpg }, /* 146 = okillpg */
{ 0, 0, 0,
sys_setsid }, /* 147 = setsid */
{ 0, 0, 0,
@ -390,7 +349,7 @@ struct sysent darwin_sysent[] = {
{ 0, 0, 0,
sys_nosys }, /* 149 = unimplemented */
{ 3, s(struct compat_43_sys_getsockname_args), 0,
compat_43(sys_getsockname) }, /* 150 = compat_43 ogetsockname */
compat_43_sys_getsockname }, /* 150 = ogetsockname */
{ 0, 0, 0,
sys_nosys }, /* 151 = unimplemented getpgid */
{ 0, 0, 0,
@ -407,21 +366,26 @@ struct sysent darwin_sysent[] = {
sys_nosys }, /* 155 = excluded nfssvc */
#endif
{ 4, s(struct compat_43_sys_getdirentries_args), 0,
compat_43(sys_getdirentries) }, /* 156 = compat_43 ogetdirentries */
{ 2, s(struct sys_statfs_args), 0,
sys_statfs }, /* 157 = statfs */
compat_43_sys_getdirentries }, /* 156 = ogetdirentries */
{ 2, s(struct freebsd_sys_statfs_args), 0,
freebsd_sys_statfs }, /* 157 = statfs */
{ 2, s(struct sys_fstatfs_args), 0,
sys_fstatfs }, /* 158 = fstatfs */
{ 0, 0, 0,
sys_nosys }, /* 159 = unimplemented unmount */
{ 0, 0, 0,
sys_nosys }, /* 160 = unimplemented */
{ 2, s(struct sys_getfh_args), 0,
sys_getfh }, /* 161 = getfh */
#if defined(NFS) || defined(NFSSERVER) || !defined(_KERNEL)
{ 2, s(struct freebsd_sys_getfh_args), 0,
freebsd_sys_getfh }, /* 161 = getfh */
#else
{ 0, 0, 0,
sys_nosys }, /* 161 = excluded getfh */
#endif
{ 2, s(struct compat_09_sys_getdomainname_args), 0,
compat_09(sys_getdomainname) }, /* 162 = compat_09 ogetdomainname */
compat_09_sys_getdomainname }, /* 162 = ogetdomainname */
{ 2, s(struct compat_09_sys_setdomainname_args), 0,
compat_09(sys_setdomainname) }, /* 163 = compat_09 osetdomainname */
compat_09_sys_setdomainname }, /* 163 = osetdomainname */
{ 0, 0, 0,
sys_nosys }, /* 164 = unimplemented */
{ 0, 0, 0,
@ -470,14 +434,14 @@ struct sysent darwin_sysent[] = {
sys_nosys }, /* 186 = unimplemented */
{ 0, 0, 0,
sys_nosys }, /* 187 = unimplemented */
{ 2, s(struct compat_12_sys_stat_args), 0,
compat_12(sys_stat) }, /* 188 = compat_12 stat12 */
{ 2, s(struct freebsd_sys_stat_args), 0,
freebsd_sys_stat }, /* 188 = stat12 */
{ 2, s(struct compat_12_sys_fstat_args), 0,
compat_12(sys_fstat) }, /* 189 = compat_12 fstat12 */
{ 2, s(struct compat_12_sys_lstat_args), 0,
compat_12(sys_lstat) }, /* 190 = compat_12 lstat12 */
{ 2, s(struct sys_pathconf_args), 0,
sys_pathconf }, /* 191 = pathconf */
compat_12_sys_fstat }, /* 189 = fstat12 */
{ 2, s(struct freebsd_sys_lstat_args), 0,
freebsd_sys_lstat }, /* 190 = lstat12 */
{ 2, s(struct freebsd_sys_pathconf_args), 0,
freebsd_sys_pathconf }, /* 191 = pathconf */
{ 2, s(struct sys_fpathconf_args), 0,
sys_fpathconf }, /* 192 = fpathconf */
{ 0, 0, 0,
@ -487,15 +451,15 @@ struct sysent darwin_sysent[] = {
{ 2, s(struct sys_setrlimit_args), 0,
sys_setrlimit }, /* 195 = setrlimit */
{ 4, s(struct compat_12_sys_getdirentries_args), 0,
compat_12(sys_getdirentries) }, /* 196 = compat_12 getdirentries */
compat_12_sys_getdirentries }, /* 196 = getdirentries */
{ 7, s(struct sys_mmap_args), 0,
sys_mmap }, /* 197 = mmap */
{ 0, 0, 0,
sys_nosys }, /* 198 = unimplemented */
{ 4, s(struct sys_lseek_args), 0,
sys_lseek }, /* 199 = lseek */
{ 3, s(struct sys_truncate_args), 0,
sys_truncate }, /* 200 = truncate */
{ 4, s(struct compat_43_sys_lseek_args), 0,
compat_43_sys_lseek }, /* 199 = lseek */
{ 3, s(struct freebsd_sys_truncate_args), 0,
freebsd_sys_truncate }, /* 200 = truncate */
{ 3, s(struct sys_ftruncate_args), 0,
sys_ftruncate }, /* 201 = ftruncate */
{ 6, s(struct sys___sysctl_args), 0,

View File

@ -1,4 +1,4 @@
# $NetBSD: files.darwin,v 1.1 2002/11/12 23:40:23 manu Exp $
# $NetBSD: files.darwin,v 1.2 2002/11/14 21:47:15 manu Exp $
#
# Config file description for machine-independent Darwin compat code.
# Included by ports that need it.
@ -8,3 +8,4 @@
file compat/darwin/darwin_exec.c compat_darwin
file compat/darwin/darwin_sysent.c compat_darwin
file compat/freebsd/freebsd_file.c compat_darwin

View File

@ -1,10 +1,10 @@
# $NetBSD: syscalls.conf,v 1.2 2002/11/12 23:40:23 manu Exp $
# $NetBSD: syscalls.conf,v 1.3 2002/11/14 21:47:15 manu Exp $
sysnames="darwin_syscalls.c"
sysnumhdr="darwin_syscall.h"
syssw="darwin_sysent.c"
sysarghdr="darwin_syscallargs.h"
compatopts="compat_43 compat_09 compat_10 compat_11 compat_12 compat_13 compat_14"
compatopts=""
libcompatopts=""
switchname="darwin_sysent"

View File

@ -1,4 +1,4 @@
$NetBSD: syscalls.master,v 1.1 2002/11/12 22:04:09 manu Exp $
$NetBSD: syscalls.master,v 1.2 2002/11/14 21:47:15 manu Exp $
; @(#)syscalls.master 8.2 (Berkeley) 1/13/94
@ -33,6 +33,9 @@
;
; #ifdef's, etc. may be included, and are copied to the output files.
; #include's are copied to the syscall names and switch definition files only.
;
; NB: A lot of system calls are used from FreeBSD emulation, because theses
; system calls are just native NetBSD plus a check in /emul/<e_name>.
#include "opt_ktrace.h"
#include "opt_nfsserver.h"
@ -50,6 +53,7 @@
#include <sys/mount.h>
#include <sys/syscallargs.h>
#include <compat/freebsd/freebsd_syscallargs.h>
%%
0 INDIR { int sys_syscall(int number, ...); }
@ -58,26 +62,28 @@
3 NOARGS { ssize_t sys_read(int fd, void *buf, size_t nbyte); }
4 NOARGS { ssize_t sys_write(int fd, const void *buf, \
size_t nbyte); }
5 NOARGS { int sys_open(const char *path, \
5 NOARGS { int freebsd_sys_open(const char *path, \
int flags, ... mode_t mode); }
6 NOARGS { int sys_close(int fd); }
7 NOARGS { int sys_wait4(int pid, int *status, int options, \
struct rusage *rusage); }
8 COMPAT_43 { int sys_creat(const char *path, mode_t mode); } ocreat
9 NOARGS { int sys_link(const char *path, const char *link); }
10 NOARGS { int sys_unlink(const char *path); }
8 NOARGS { int compat_43_freebsd_sys_creat(const char *path, \
mode_t mode); } ocreat
9 NOARGS { int freebsd_sys_link(const char *path, \
const char *link); }
10 NOARGS { int freebsd_sys_unlink(const char *path); }
11 UNIMPL execv
12 NOARGS { int sys_chdir(const char *path); }
12 NOARGS { int freebsd_sys_chdir(const char *path); }
13 NOARGS { int sys_fchdir(int fd); }
14 NOARGS { int sys_mknod(const char *path, mode_t mode, \
dev_t dev); }
15 NOARGS { int sys_chmod(const char *path, mode_t mode); }
16 NOARGS { int sys_chown(const char *path, uid_t uid, \
14 NOARGS { int freebsd_sys_mknod(const char *path, \
mode_t mode, dev_t dev); }
15 NOARGS { int freebsd_sys_chmod(const char *path, mode_t mode); }
16 NOARGS { int freebsd_sys_chown(const char *path, uid_t uid, \
gid_t gid); }
17 NOARGS { int sys_obreak(char *nsize); } break
18 NOARGS { int sys_getfsstat(struct statfs *buf, long bufsize, \
int flags); }
19 COMPAT_43 { long sys_lseek(int fd, long offset, int whence); } \
19 NOARGS { long sys_lseek(int fd, long offset, int whence); } \
olseek
#ifdef COMPAT_43
20 NOARGS { pid_t sys_getpid_with_ppid(void); } getpid
@ -109,15 +115,17 @@
unsigned int *alen); }
32 NOARGS { int sys_getsockname(int fdes, struct sockaddr *asa, \
unsigned int *alen); }
33 NOARGS { int sys_access(const char *path, int flags); }
34 NOARGS { int sys_chflags(const char *path, u_long flags); }
33 NOARGS { int freebsd_sys_access(const char *path, \
int flags); }
34 NOARGS { int freebsd_sys_chflags(const char *path, \
u_long flags); }
35 NOARGS { int sys_fchflags(int fd, u_long flags); }
36 NOARGS { void sys_sync(void); }
37 NOARGS { int sys_kill(int pid, int signum); }
38 COMPAT_43 { int sys_stat(const char *path, struct stat43 *ub); } \
stat43
38 NOARGS { int compat_43_freebsd_sys_stat(const char *path, \
struct stat43 *ub); } stat43
39 NOARGS { pid_t sys_getppid(void); }
40 COMPAT_43 { int sys_lstat(const char *path, \
40 NOARGS { int compat_43_freebsd_sys_lstat(const char *path, \
struct stat43 *ub); } lstat43
41 NOARGS { int sys_dup(int fd); }
42 NOARGS { int sys_pipe(void); }
@ -130,7 +138,7 @@
#else
45 EXCL ktrace
#endif
46 COMPAT_13 { int sys_sigaction(int signum, \
46 NOARGS { int compat_13_sys_sigaction(int signum, \
const struct sigaction13 *nsa, \
struct sigaction13 *osa); } sigaction13
#ifdef COMPAT_43
@ -138,37 +146,38 @@
#else
47 NOARGS { gid_t sys_getgid(void); }
#endif
48 COMPAT_13 { int sys_sigprocmask(int how, \
48 NOARGS { int compat_13_sys_sigprocmask(int how, \
int mask); } sigprocmask13
49 NOARGS { int sys___getlogin(char *namebuf, size_t namelen); }
50 NOARGS { int sys_setlogin(const char *namebuf); }
51 NOARGS { int sys_acct(const char *path); }
52 COMPAT_13 { int sys_sigpending(void); } sigpending13
53 COMPAT_13 { int sys_sigaltstack( \
52 NOARGS { int compat_13_sys_sigpending(void); } sigpending13
53 NOARGS { int compat_13_sys_sigaltstack( \
const struct sigaltstack13 *nss, \
struct sigaltstack13 *oss); } sigaltstack13
54 NOARGS { int sys_ioctl(int fd, \
u_long com, ... void *data); }
55 COMPAT_12 { int sys_reboot(int opt); } oreboot
56 NOARGS { int sys_revoke(const char *path); }
57 NOARGS { int sys_symlink(const char *path, \
55 NOARGS { int sys_reboot(int opt); } oreboot
56 NOARGS { int freebsd_sys_revoke(const char *path); }
57 NOARGS { int freebsd_sys_symlink(const char *path, \
const char *link); }
58 NOARGS { int sys_readlink(const char *path, char *buf, \
size_t count); }
59 NOARGS { int sys_execve(const char *path, \
58 NOARGS { int freebsd_sys_readlink(const char *path, \
char *buf, size_t count); }
59 NOARGS { int freebsd_sys_execve(const char *path, \
char * const *argp, char * const *envp); }
60 NOARGS { mode_t sys_umask(mode_t newmask); }
61 NOARGS { int sys_chroot(const char *path); }
62 COMPAT_43 { int sys_fstat(int fd, struct stat43 *sb); } fstat43
61 NOARGS { int freebsd_sys_chroot(const char *path); }
62 NOARGS { int compat_43_sys_fstat(int fd, \
struct stat43 *sb); } fstat43
63 UNIMPL
64 COMPAT_43 { int sys_getpagesize(void); } ogetpagesize
65 COMPAT_12 { int sys_msync(caddr_t addr, size_t len); }
64 NOARGS { int compat_43_sys_getpagesize(void); } ogetpagesize
65 NOARGS { int compat_12_sys_msync(caddr_t addr, size_t len); }
66 NOARGS { int sys_vfork(void); }
67 OBSOL vread
68 OBSOL vwrite
69 NOARGS { int sys_sbrk(intptr_t incr); }
70 NOARGS { int sys_sstk(int incr); }
71 COMPAT_43 { int sys_mmap(caddr_t addr, size_t len, int prot, \
71 NOARGS { int sys_mmap(caddr_t addr, size_t len, int prot, \
int flags, int fd, long pos); } ommap
72 NOARGS { int sys_ovadvise(int anom); } vadvise
73 NOARGS { int sys_munmap(void *addr, size_t len); }
@ -189,15 +198,16 @@
83 NOARGS { int sys_setitimer(int which, \
const struct itimerval *itv, \
struct itimerval *oitv); }
84 COMPAT_43 { int sys_wait(void); } owait
85 COMPAT_12 { int sys_swapon(const char *name); } oswapon
84 NOARGS { int compat_43_sys_wait(void); } owait
85 NOARGS { int compat_12_sys_swapon(const char *name); } oswapon
86 NOARGS { int sys_getitimer(int which, \
struct itimerval *itv); }
87 COMPAT_43 { int sys_gethostname(char *hostname, u_int len); } \
ogethostname
88 COMPAT_43 { int sys_sethostname(char *hostname, u_int len); } \
osethostname
89 COMPAT_43 { int sys_getdtablesize(void); } ogetdtablesize
87 NOARGS { int compat_43_sys_gethostname(char *hostname, \
u_int len); } ogethostname
88 NOARGS { int compat_43_sys_sethostname(char *hostname, \
u_int len); } osethostname
89 NOARGS { int compat_43_sys_getdtablesize(void); } \
ogetdtablesize
90 NOARGS { int sys_dup2(int from, int to); }
91 UNIMPL
92 NOARGS { int sys_fcntl(int fd, int cmd, ... void *arg); }
@ -209,32 +219,33 @@
97 NOARGS { int sys_socket(int domain, int type, int protocol); }
98 NOARGS { int sys_connect(int s, const struct sockaddr *name, \
unsigned int namelen); }
99 COMPAT_43 { int sys_accept(int s, caddr_t name, \
99 NOARGS { int compat_43_sys_accept(int s, caddr_t name, \
int *anamelen); } oaccept
100 NOARGS { int sys_getpriority(int which, int who); }
101 COMPAT_43 { int sys_send(int s, caddr_t buf, int len, \
101 NOARGS { int compat_43_sys_send(int s, caddr_t buf, int len, \
int flags); } osend
102 COMPAT_43 { int sys_recv(int s, caddr_t buf, int len, \
102 NOARGS { int compat_43_sys_recv(int s, caddr_t buf, int len, \
int flags); } orecv
103 COMPAT_13 { int sys_sigreturn(struct sigcontext13 *sigcntxp); } \
sigreturn13
103 NOARGS { int compat_13_sys_sigreturn(struct \
sigcontext13 *sigcntxp); } sigreturn13
104 NOARGS { int sys_bind(int s, const struct sockaddr *name, \
unsigned int namelen); }
105 NOARGS { int sys_setsockopt(int s, int level, int name, \
const void *val, unsigned int valsize); }
106 NOARGS { int sys_listen(int s, int backlog); }
107 UNIMPL
108 COMPAT_43 { int sys_sigvec(int signum, struct sigvec *nsv, \
struct sigvec *osv); } osigvec
109 COMPAT_43 { int sys_sigblock(int mask); } osigblock
110 COMPAT_43 { int sys_sigsetmask(int mask); } osigsetmask
111 COMPAT_13 { int sys_sigsuspend(int mask); } sigsuspend13
112 COMPAT_43 { int sys_sigstack(struct sigstack *nss, \
108 NOARGS { int compat_43_sys_sigvec(int signum, \
struct sigvec *nsv, struct sigvec *osv); } osigvec
109 NOARGS { int compat_43_sys_sigblock(int mask); } osigblock
110 NOARGS { int compat_43_sys_sigsetmask(int mask); } osigsetmask
111 NOARGS { int compat_13_sys_sigsuspend(int mask); } \
sigsuspend13
112 NOARGS { int compat_43_sys_sigstack(struct sigstack *nss, \
struct sigstack *oss); } osigstack
113 COMPAT_43 { int sys_recvmsg(int s, struct omsghdr *msg, \
int flags); } orecvmsg
114 COMPAT_43 { int sys_sendmsg(int s, caddr_t msg, int flags); } \
osendmsg
113 NOARGS { int compat_43_sys_recvmsg(int s, \
struct omsghdr *msg, int flags); } orecvmsg
114 NOARGS { int compat_43_sys_sendmsg(int s, caddr_t msg, \
int flags); } osendmsg
115 UNIMPL
116 NOARGS { int sys_gettimeofday(struct timeval *tp, \
struct timezone *tzp); }
@ -250,44 +261,49 @@
const struct timezone *tzp); }
123 NOARGS { int sys_fchown(int fd, uid_t uid, gid_t gid); }
124 NOARGS { int sys_fchmod(int fd, mode_t mode); }
125 COMPAT_43 { int sys_recvfrom(int s, caddr_t buf, size_t len, \
int flags, caddr_t from, int *fromlenaddr); } \
orecvfrom
125 NOARGS { int compat_43_sys_recvfrom(int s, caddr_t buf, \
size_t len, int flags, caddr_t from, \
int *fromlenaddr); } orecvfrom
126 NOARGS { int sys_setreuid(uid_t ruid, uid_t euid); }
127 NOARGS { int sys_setregid(gid_t rgid, gid_t egid); }
128 NOARGS { int sys_rename(const char *from, const char *to); }
129 COMPAT_43 { int sys_truncate(const char *path, long length); } \
128 NOARGS { int freebsd_sys_rename(const char *from, \
const char *to); }
129 NOARGS { int compat_43_freebsd_sys_truncate(const \
char *path, long length); } \
otruncate
130 COMPAT_43 { int sys_ftruncate(int fd, long length); } oftruncate
130 NOARGS { int compat_43_sys_ftruncate(int fd, \
long length); } oftruncate
131 NOARGS { int sys_flock(int fd, int how); }
132 NOARGS { int sys_mkfifo(const char *path, mode_t mode); }
132 NOARGS { int freebsd_sys_mkfifo(const char *path, \
mode_t mode); }
133 NOARGS { ssize_t sys_sendto(int s, const void *buf, \
size_t len, int flags, const struct sockaddr *to, \
unsigned int tolen); }
134 NOARGS { int sys_shutdown(int s, int how); }
135 NOARGS { int sys_socketpair(int domain, int type, \
int protocol, int *rsv); }
136 NOARGS { int sys_mkdir(const char *path, mode_t mode); }
137 NOARGS { int sys_rmdir(const char *path); }
136 NOARGS { int freebsd_sys_mkdir(const char *path, mode_t mode); }
137 NOARGS { int freebsd_sys_rmdir(const char *path); }
138 NOARGS { int sys_utimes(const char *path, \
const struct timeval *tptr); }
139 UNIMPL futimes
140 NOARGS { int sys_adjtime(const struct timeval *delta, \
struct timeval *olddelta); }
141 COMPAT_43 { int sys_getpeername(int fdes, caddr_t asa, \
int *alen); } ogetpeername
142 COMPAT_43 { int32_t sys_gethostid(void); } ogethostid
141 NOARGS { int compat_43_sys_getpeername(int fdes, \
caddr_t asa, int *alen); } ogetpeername
142 NOARGS { int32_t compat_43_sys_gethostid(void); } ogethostid
143 UNIMPL
144 COMPAT_43 { int sys_getrlimit(int which, \
144 NOARGS { int compat_43_sys_getrlimit(int which, \
struct orlimit *rlp); } ogetrlimit
145 COMPAT_43 { int sys_setrlimit(int which, \
145 NOARGS { int compat_43_sys_setrlimit(int which, \
const struct orlimit *rlp); } osetrlimit
146 COMPAT_43 { int sys_killpg(int pgid, int signum); } okillpg
146 NOARGS { int compat_43_sys_killpg(int pgid, int signum); } \
okillpg
147 NOARGS { int sys_setsid(void); }
148 UNIMPL
149 UNIMPL
150 COMPAT_43 { int sys_getsockname(int fdec, caddr_t asa, \
int *alen); } ogetsockname
150 NOARGS { int compat_43_sys_getsockname(int fdec, \
caddr_t asa, int *alen); } ogetsockname
151 UNIMPL getpgid
152 UNIMPL setprivexec
153 UNIMPL pread
@ -297,18 +313,23 @@
#else
155 EXCL nfssvc
#endif
156 COMPAT_43 { int sys_getdirentries(int fd, char *buf, \
156 NOARGS { int compat_43_sys_getdirentries(int fd, char *buf, \
u_int count, long *basep); } ogetdirentries
157 NOARGS { int sys_statfs(const char *path, \
157 NOARGS { int freebsd_sys_statfs(const char *path, \
struct statfs *buf); }
158 NOARGS { int sys_fstatfs(int fd, struct statfs *buf); }
159 UNIMPL unmount
160 UNIMPL
161 NOARGS { int sys_getfh(const char *fname, fhandle_t *fhp); }
162 COMPAT_09 { int sys_getdomainname(char *domainname, int len); } \
ogetdomainname
163 COMPAT_09 { int sys_setdomainname(char *domainname, int len); } \
osetdomainname
#if defined(NFS) || defined(NFSSERVER) || !defined(_KERNEL)
161 NOARGS { int freebsd_sys_getfh(const char *fname, \
fhandle_t *fhp); }
#else
161 EXCL getfh
#endif
162 NOARGS { int compat_09_sys_getdomainname(char *domainname, \
int len); } ogetdomainname
163 NOARGS { int compat_09_sys_setdomainname(char *domainname, \
int len); } osetdomainname
164 UNIMPL
165 UNIMPL quotactl
166 UNIMPL
@ -333,27 +354,29 @@
185 UNIMPL
186 UNIMPL
187 UNIMPL
188 COMPAT_12 { int sys_stat(const char *path, struct stat12 *ub); } \
stat12
189 COMPAT_12 { int sys_fstat(int fd, struct stat12 *sb); } fstat12
190 COMPAT_12 { int sys_lstat(const char *path, \
188 NOARGS { int freebsd_sys_stat(const char *path, \
struct stat12 *ub); } stat12
189 NOARGS { int compat_12_sys_fstat(int fd, \
struct stat12 *sb); } fstat12
190 NOARGS { int freebsd_sys_lstat(const char *path, \
struct stat12 *ub); } lstat12
191 NOARGS { long sys_pathconf(const char *path, int name); }
191 NOARGS { long freebsd_sys_pathconf(const char *path, \
int name); }
192 NOARGS { long sys_fpathconf(int fd, int name); }
193 UNIMPL getfsstat
194 NOARGS { int sys_getrlimit(int which, \
struct rlimit *rlp); }
195 NOARGS { int sys_setrlimit(int which, \
const struct rlimit *rlp); }
196 COMPAT_12 { int sys_getdirentries(int fd, char *buf, \
196 NOARGS { int compat_12_sys_getdirentries(int fd, char *buf, \
u_int count, long *basep); }
197 NOARGS { void *sys_mmap(void *addr, size_t len, int prot, \
int flags, int fd, long pad, off_t pos); }
198 UNIMPL
199 NOARGS { off_t sys_lseek(int fd, int pad, off_t offset, \
int whence); }
200 NOARGS { int sys_truncate(const char *path, int pad, \
off_t length); }
199 NOARGS { off_t compat_43_sys_lseek(int fd, int pad, \
off_t offset, int whence); }
200 NOARGS { int freebsd_sys_truncate(const char *path, \
int pad, off_t length); }
201 NOARGS { int sys_ftruncate(int fd, int pad, off_t length); }
202 NOARGS { int sys___sysctl(int *name, u_int namelen, \
void *old, size_t *oldlenp, void *new, \