Index: emulators/qemu-devel/Makefile =================================================================== --- emulators/qemu-devel/Makefile (revision 372121) +++ emulators/qemu-devel/Makefile (working copy) @@ -3,7 +3,7 @@ PORTNAME= qemu PORTVERSION= 2.0.2 -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES= emulators MASTER_SITES= http://wiki.qemu.org/download/:release \ LOCAL/nox:snapshot @@ -82,6 +82,18 @@ EXTRA_PATCHES+= ${FILESDIR}/extra-patch-max-arg-pa EXTRA_PATCHES+= ${FILESDIR}/extra-patch-ad92220df37d1ab3120316fcc436071c78817561 EXTRA_PATCHES+= ${FILESDIR}/extra-patch-2478a4e4a33d0523cc436eabb4a27b258b4358b8 EXTRA_PATCHES+= ${FILESDIR}/extra-patch-2478a4e4a33d0523cc436eabb4a27b258b4358b8-before11 +EXTRA_PATCHES+= ${FILESDIR}/extra-patch-ac9f83019a2059d4bfe5cedfae35ba4151d5ac88 +EXTRA_PATCHES+= ${FILESDIR}/extra-patch-ac9f83019a2059d4bfe5cedfae35ba4151d5ac88-before10 +EXTRA_PATCHES+= ${FILESDIR}/extra-patch-d9388715135ed1f36e12e6cdbcc1be09d1657916 +EXTRA_PATCHES+= ${FILESDIR}/extra-patch-c9c55ac786f09ce575b5f67b35241ce9452896c9 +EXTRA_PATCHES+= ${FILESDIR}/extra-patch-c9c55ac786f09ce575b5f67b35241ce9452896c9-before11 +EXTRA_PATCHES+= ${FILESDIR}/extra-patch-5f81caf45c0d0eb2b4b852f8580a1938fb3d12c6 +EXTRA_PATCHES+= ${FILESDIR}/extra-patch-f32d585446698e1faa319c95df6b4d00c16f866c +EXTRA_PATCHES+= ${FILESDIR}/extra-patch-a6402a4b7077af85733a1c98d63ab09f02d980ec +EXTRA_PATCHES+= ${FILESDIR}/extra-patch-30c8ccb41e2c9e1ddda7e3f8a8ac1eb5dab8b408 +EXTRA_PATCHES+= ${FILESDIR}/extra-patch-22b23eb877a8a5ec251b4ae0e71e3c7ce5397721 +EXTRA_PATCHES+= ${FILESDIR}/extra-patch-1ebbb5b56e890741f1461662fae9728da0c76e27 +EXTRA_PATCHES+= ${FILESDIR}/extra-patch-TARGET_FREEBSD_NR-before10 .endif CONFIGURE_ARGS+= --extra-ldflags=-L${LOCALBASE}/lib Index: emulators/qemu-devel/files/extra-patch-1ebbb5b56e890741f1461662fae9728da0c76e27 =================================================================== --- emulators/qemu-devel/files/extra-patch-1ebbb5b56e890741f1461662fae9728da0c76e27 (revision 0) +++ emulators/qemu-devel/files/extra-patch-1ebbb5b56e890741f1461662fae9728da0c76e27 (working copy) @@ -0,0 +1,72 @@ +From 1ebbb5b56e890741f1461662fae9728da0c76e27 Mon Sep 17 00:00:00 2001 +From: Stacey Son +Date: Thu, 6 Nov 2014 22:35:01 +0000 +Subject: [PATCH] Add JHB's ioctl decoding to unknown ioctl message. + +--- + bsd-user/bsd-ioctl.c | 31 ++++++++++++++++++++++++++++--- + 1 file changed, 28 insertions(+), 3 deletions(-) + +diff --git a/bsd-user/bsd-ioctl.c b/bsd-user/bsd-ioctl.c +index 95505a4..10e8e54 100644 +--- a/bsd-user/bsd-ioctl.c ++++ b/bsd-user/bsd-ioctl.c +@@ -19,6 +19,7 @@ + + #include + #include ++#include + #include + #if defined(__FreeBSD_version) && __FreeBSD_version > 900000 + #include +@@ -307,6 +308,29 @@ static IOCTLEntry ioctl_entries[] = { + { 0, 0 }, + }; + ++static void log_unsupported_ioctl(unsigned long cmd) ++{ ++ gemu_log("cmd=0x%08lx dir=", cmd); ++ switch (cmd & IOC_DIRMASK) { ++ case IOC_VOID: ++ gemu_log("VOID "); ++ break; ++ case IOC_OUT: ++ gemu_log("OUT "); ++ break; ++ case IOC_IN: ++ gemu_log("IN "); ++ break; ++ case IOC_INOUT: ++ gemu_log("INOUT"); ++ break; ++ default: ++ gemu_log("%01lx ???", (cmd & IOC_DIRMASK) >> 29); ++ break; ++ } ++ gemu_log(" '%c' %3d %lu\n", (char)IOCGROUP(cmd), (int)(cmd & 0xff), IOCPARM_LEN(cmd)); ++} ++ + abi_long do_bsd_ioctl(int fd, abi_long cmd, abi_long arg) + { + const IOCTLEntry *ie; +@@ -319,7 +343,8 @@ abi_long do_bsd_ioctl(int fd, abi_long cmd, abi_long arg) + ie = ioctl_entries; + for (;;) { + if (ie->target_cmd == 0) { +- gemu_log("Unsupported ioctl: cmd=0x%04lx\n", (long)cmd); ++ gemu_log("Qemu unsupported ioctl: "); ++ log_unsupported_ioctl(cmd); + return -TARGET_ENOSYS; + } + if (ie->target_cmd == cmd) { +@@ -398,8 +423,8 @@ abi_long do_bsd_ioctl(int fd, abi_long cmd, abi_long arg) + break; + + default: +- gemu_log("Unsupported ioctl type: cmd=0x%04lx type=%d\n", +- (long)cmd, arg_type[0]); ++ gemu_log("Qemu unknown ioctl: type=%d ", arg_type[0]); ++ log_unsupported_ioctl(cmd); + ret = -TARGET_ENOSYS; + break; + } Property changes on: emulators/qemu-devel/files/extra-patch-1ebbb5b56e890741f1461662fae9728da0c76e27 ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: emulators/qemu-devel/files/extra-patch-22b23eb877a8a5ec251b4ae0e71e3c7ce5397721 =================================================================== --- emulators/qemu-devel/files/extra-patch-22b23eb877a8a5ec251b4ae0e71e3c7ce5397721 (revision 0) +++ emulators/qemu-devel/files/extra-patch-22b23eb877a8a5ec251b4ae0e71e3c7ce5397721 (working copy) @@ -0,0 +1,1051 @@ +From 22b23eb877a8a5ec251b4ae0e71e3c7ce5397721 Mon Sep 17 00:00:00 2001 +From: Stacey Son +Date: Thu, 6 Nov 2014 20:16:28 +0000 +Subject: [PATCH] Add bsd-user/freebsd/make_syscall_nr_h.sh to generate + syscall_nr.h. + +make_syscall_nr.h.sh is added so syscall_nr.h can be generated from +. Maybe this should be configure or one of the +makefiles. Also report "qemu: unsupported syscall: #" via gemu_log +when we try to emulate an unsupported system call. +--- + bsd-user/freebsd/make_syscall_nr_h.sh | 26 + + bsd-user/freebsd/strace.list | 2 - + bsd-user/freebsd/syscall_nr.h | 918 +++++++++++++++++----------------- + bsd-user/syscall.c | 7 + + 4 files changed, 495 insertions(+), 458 deletions(-) + create mode 100644 bsd-user/freebsd/make_syscall_nr_h.sh + +diff --git a/bsd-user/freebsd/make_syscall_nr_h.sh b/bsd-user/freebsd/make_syscall_nr_h.sh +new file mode 100644 +index 0000000..cc180df +--- /dev/null ++++ b/bsd-user/freebsd/make_syscall_nr_h.sh +@@ -0,0 +1,26 @@ ++#! /bin/sh - ++ ++# ++# Usage: 'sh ./make_syscall_nr_h.sh [full path to syscall.h] [syscall_nr.h]' ++# ++ ++#default input file: ++syshdr="/usr/include/sys/syscall.h" ++ ++#default output file: ++sysnr="./syscall_nr.h" ++ ++if [ -n "$1" ]; then ++ syshdr=$1 ++fi ++ ++if [ -n "$2" ]; then ++ sysnr=$2 ++fi ++ ++echo "/*" > $sysnr ++echo " * This file was generated from $syshdr" >> $sysnr ++echo " */" >> $sysnr ++echo "" >> $sysnr ++ ++/usr/bin/sed -e 's:SYS_:TARGET_FREEBSD_NR_:' < $syshdr >> $sysnr +diff --git a/bsd-user/freebsd/strace.list b/bsd-user/freebsd/strace.list +index cba4afe..e09048f 100644 +--- a/bsd-user/freebsd/strace.list ++++ b/bsd-user/freebsd/strace.list +@@ -45,10 +45,8 @@ + { TARGET_FREEBSD_NR_cap_fcntls_get, "cap_fcntls_get", NULL, NULL, NULL }, + { TARGET_FREEBSD_NR_cap_fcntls_limit, "cap_fcntls_limit", NULL, NULL, NULL }, + { TARGET_FREEBSD_NR_cap_getmode, "cap_getmode", NULL, NULL, NULL }, +-{ TARGET_FREEBSD_NR_cap_getrights, "cap_getrights", NULL, NULL, NULL }, + { TARGET_FREEBSD_NR_cap_ioctls_get, "cap_ioctls_get", NULL, NULL, NULL }, + { TARGET_FREEBSD_NR_cap_ioctls_limit, "cap_ioctls_limit", NULL, NULL, NULL }, +-{ TARGET_FREEBSD_NR_cap_new, "cap_new", NULL, NULL, NULL }, + { TARGET_FREEBSD_NR_cap_rights_limit, "cap_rights_limit", NULL, NULL, NULL }, + { TARGET_FREEBSD_NR_chdir, "chdir", "%s(\"%s\")", NULL, NULL }, + { TARGET_FREEBSD_NR_chflags, "chflags", NULL, NULL, NULL }, +diff --git a/bsd-user/freebsd/syscall_nr.h b/bsd-user/freebsd/syscall_nr.h +index 7d6bef8..74c3135 100644 +--- a/bsd-user/freebsd/syscall_nr.h ++++ b/bsd-user/freebsd/syscall_nr.h +@@ -1,463 +1,469 @@ + /* ++ * This file was generated from /usr/include/sys/syscall.h ++ */ ++ ++/* + * System call numbers. + * +- * created from FreeBSD: releng/9.1/sys/kern/syscalls.master 229723 +- * 2012-01-06 19:29:16Z jhb ++ * DO NOT EDIT-- this file is automatically generated. ++ * $FreeBSD: head/sys/sys/syscall.h 272824 2014-10-09 15:19:35Z marcel $ ++ * created from FreeBSD: head/sys/kern/syscalls.master 272823 2014-10-09 15:16:52Z marcel + */ + +-#define TARGET_FREEBSD_NR_syscall 0 +-#define TARGET_FREEBSD_NR_exit 1 +-#define TARGET_FREEBSD_NR_fork 2 +-#define TARGET_FREEBSD_NR_read 3 +-#define TARGET_FREEBSD_NR_write 4 +-#define TARGET_FREEBSD_NR_open 5 +-#define TARGET_FREEBSD_NR_close 6 +-#define TARGET_FREEBSD_NR_wait4 7 +- /* 8 is old creat */ +-#define TARGET_FREEBSD_NR_link 9 +-#define TARGET_FREEBSD_NR_unlink 10 +- /* 11 is obsolete execv */ +-#define TARGET_FREEBSD_NR_chdir 12 +-#define TARGET_FREEBSD_NR_fchdir 13 +-#define TARGET_FREEBSD_NR_mknod 14 +-#define TARGET_FREEBSD_NR_chmod 15 +-#define TARGET_FREEBSD_NR_chown 16 +-#define TARGET_FREEBSD_NR_break 17 +-#define TARGET_FREEBSD_NR_freebsd4_getfsstat 18 +- /* 19 is old lseek */ +-#define TARGET_FREEBSD_NR_getpid 20 +-#define TARGET_FREEBSD_NR_mount 21 +-#define TARGET_FREEBSD_NR_unmount 22 +-#define TARGET_FREEBSD_NR_setuid 23 +-#define TARGET_FREEBSD_NR_getuid 24 +-#define TARGET_FREEBSD_NR_geteuid 25 +-#define TARGET_FREEBSD_NR_ptrace 26 +-#define TARGET_FREEBSD_NR_recvmsg 27 +-#define TARGET_FREEBSD_NR_sendmsg 28 +-#define TARGET_FREEBSD_NR_recvfrom 29 +-#define TARGET_FREEBSD_NR_accept 30 +-#define TARGET_FREEBSD_NR_getpeername 31 +-#define TARGET_FREEBSD_NR_getsockname 32 +-#define TARGET_FREEBSD_NR_access 33 +-#define TARGET_FREEBSD_NR_chflags 34 +-#define TARGET_FREEBSD_NR_fchflags 35 +-#define TARGET_FREEBSD_NR_sync 36 +-#define TARGET_FREEBSD_NR_kill 37 +- /* 38 is old stat */ +-#define TARGET_FREEBSD_NR_getppid 39 +- /* 40 is old lstat */ +-#define TARGET_FREEBSD_NR_dup 41 +-#define TARGET_FREEBSD_NR_pipe 42 +-#define TARGET_FREEBSD_NR_getegid 43 +-#define TARGET_FREEBSD_NR_profil 44 +-#define TARGET_FREEBSD_NR_ktrace 45 +- /* 46 is old sigaction */ +-#define TARGET_FREEBSD_NR_getgid 47 +- /* 48 is old sigprocmask */ +-#define TARGET_FREEBSD_NR_getlogin 49 +-#define TARGET_FREEBSD_NR_setlogin 50 +-#define TARGET_FREEBSD_NR_acct 51 +- /* 52 is old sigpending */ +-#define TARGET_FREEBSD_NR_sigaltstack 53 +-#define TARGET_FREEBSD_NR_ioctl 54 +-#define TARGET_FREEBSD_NR_reboot 55 +-#define TARGET_FREEBSD_NR_revoke 56 +-#define TARGET_FREEBSD_NR_symlink 57 +-#define TARGET_FREEBSD_NR_readlink 58 +-#define TARGET_FREEBSD_NR_execve 59 +-#define TARGET_FREEBSD_NR_umask 60 +-#define TARGET_FREEBSD_NR_chroot 61 +- /* 62 is old fstat */ +- /* 63 is old getkerninfo */ +- /* 64 is old getpagesize */ +-#define TARGET_FREEBSD_NR_msync 65 +-#define TARGET_FREEBSD_NR_vfork 66 +- /* 67 is obsolete vread */ +- /* 68 is obsolete vwrite */ +-#define TARGET_FREEBSD_NR_sbrk 69 +-#define TARGET_FREEBSD_NR_sstk 70 +- /* 71 is old mmap */ +-#define TARGET_FREEBSD_NR_vadvise 72 +-#define TARGET_FREEBSD_NR_munmap 73 +-#define TARGET_FREEBSD_NR_mprotect 74 +-#define TARGET_FREEBSD_NR_madvise 75 +- /* 76 is obsolete vhangup */ +- /* 77 is obsolete vlimit */ +-#define TARGET_FREEBSD_NR_mincore 78 +-#define TARGET_FREEBSD_NR_getgroups 79 +-#define TARGET_FREEBSD_NR_setgroups 80 +-#define TARGET_FREEBSD_NR_getpgrp 81 +-#define TARGET_FREEBSD_NR_setpgid 82 +-#define TARGET_FREEBSD_NR_setitimer 83 +- /* 84 is old wait */ +-#define TARGET_FREEBSD_NR_swapon 85 +-#define TARGET_FREEBSD_NR_getitimer 86 +- /* 87 is old gethostname */ +- /* 88 is old sethostname */ +-#define TARGET_FREEBSD_NR_getdtablesize 89 +-#define TARGET_FREEBSD_NR_dup2 90 +-#define TARGET_FREEBSD_NR_fcntl 92 +-#define TARGET_FREEBSD_NR_select 93 +-#define TARGET_FREEBSD_NR_fsync 95 +-#define TARGET_FREEBSD_NR_setpriority 96 +-#define TARGET_FREEBSD_NR_socket 97 +-#define TARGET_FREEBSD_NR_connect 98 +- /* 99 is old accept */ +-#define TARGET_FREEBSD_NR_getpriority 100 +- /* 101 is old send */ +- /* 102 is old recv */ +- /* 103 is old sigreturn */ +-#define TARGET_FREEBSD_NR_bind 104 +-#define TARGET_FREEBSD_NR_setsockopt 105 +-#define TARGET_FREEBSD_NR_listen 106 +- /* 107 is obsolete vtimes */ +- /* 108 is old sigvec */ +- /* 109 is old sigblock */ +- /* 110 is old sigsetmask */ +- /* 111 is old sigsuspend */ +- /* 112 is old sigstack */ +- /* 113 is old recvmsg */ +- /* 114 is old sendmsg */ +- /* 115 is obsolete vtrace */ +-#define TARGET_FREEBSD_NR_gettimeofday 116 +-#define TARGET_FREEBSD_NR_getrusage 117 +-#define TARGET_FREEBSD_NR_getsockopt 118 +-#define TARGET_FREEBSD_NR_readv 120 +-#define TARGET_FREEBSD_NR_writev 121 +-#define TARGET_FREEBSD_NR_settimeofday 122 +-#define TARGET_FREEBSD_NR_fchown 123 +-#define TARGET_FREEBSD_NR_fchmod 124 +- /* 125 is old recvfrom */ +-#define TARGET_FREEBSD_NR_setreuid 126 +-#define TARGET_FREEBSD_NR_setregid 127 +-#define TARGET_FREEBSD_NR_rename 128 +- /* 129 is old truncate */ +- /* 130 is old ftruncate */ +-#define TARGET_FREEBSD_NR_flock 131 +-#define TARGET_FREEBSD_NR_mkfifo 132 +-#define TARGET_FREEBSD_NR_sendto 133 +-#define TARGET_FREEBSD_NR_shutdown 134 +-#define TARGET_FREEBSD_NR_socketpair 135 +-#define TARGET_FREEBSD_NR_mkdir 136 +-#define TARGET_FREEBSD_NR_rmdir 137 +-#define TARGET_FREEBSD_NR_utimes 138 +- /* 139 is obsolete 4.2 sigreturn */ +-#define TARGET_FREEBSD_NR_adjtime 140 +- /* 141 is old getpeername */ +- /* 142 is old gethostid */ +- /* 143 is old sethostid */ +- /* 144 is old getrlimit */ +- /* 145 is old setrlimit */ +- /* 146 is old killpg */ +-#define TARGET_FREEBSD_NR_killpg 146 /* COMPAT */ +-#define TARGET_FREEBSD_NR_setsid 147 +-#define TARGET_FREEBSD_NR_quotactl 148 +- /* 149 is old quota */ +- /* 150 is old getsockname */ +-#define TARGET_FREEBSD_NR_nlm_syscall 154 +-#define TARGET_FREEBSD_NR_nfssvc 155 +- /* 156 is old getdirentries */ +-#define TARGET_FREEBSD_NR_freebsd4_statfs 157 +-#define TARGET_FREEBSD_NR_freebsd4_fstatfs 158 +-#define TARGET_FREEBSD_NR_lgetfh 160 +-#define TARGET_FREEBSD_NR_getfh 161 +-#define TARGET_FREEBSD_NR_freebsd4_getdomainname 162 +-#define TARGET_FREEBSD_NR_freebsd4_setdomainname 163 +-#define TARGET_FREEBSD_NR_freebsd4_uname 164 +-#define TARGET_FREEBSD_NR_sysarch 165 +-#define TARGET_FREEBSD_NR_rtprio 166 +-#define TARGET_FREEBSD_NR_semsys 169 +-#define TARGET_FREEBSD_NR_msgsys 170 +-#define TARGET_FREEBSD_NR_shmsys 171 +-#define TARGET_FREEBSD_NR_freebsd6_pread 173 +-#define TARGET_FREEBSD_NR_freebsd6_pwrite 174 +-#define TARGET_FREEBSD_NR_setfib 175 +-#define TARGET_FREEBSD_NR_ntp_adjtime 176 +-#define TARGET_FREEBSD_NR_setgid 181 +-#define TARGET_FREEBSD_NR_setegid 182 +-#define TARGET_FREEBSD_NR_seteuid 183 +-#define TARGET_FREEBSD_NR_stat 188 +-#define TARGET_FREEBSD_NR_fstat 189 +-#define TARGET_FREEBSD_NR_lstat 190 +-#define TARGET_FREEBSD_NR_pathconf 191 +-#define TARGET_FREEBSD_NR_fpathconf 192 +-#define TARGET_FREEBSD_NR_getrlimit 194 +-#define TARGET_FREEBSD_NR_setrlimit 195 +-#define TARGET_FREEBSD_NR_getdirentries 196 +-#define TARGET_FREEBSD_NR_freebsd6_mmap 197 +-#define TARGET_FREEBSD_NR___syscall 198 +-#define TARGET_FREEBSD_NR_freebsd6_lseek 199 +-#define TARGET_FREEBSD_NR_freebsd6_truncate 200 +-#define TARGET_FREEBSD_NR_freebsd6_ftruncate 201 +-#define TARGET_FREEBSD_NR___sysctl 202 +-#define TARGET_FREEBSD_NR_mlock 203 +-#define TARGET_FREEBSD_NR_munlock 204 +-#define TARGET_FREEBSD_NR_undelete 205 +-#define TARGET_FREEBSD_NR_futimes 206 +-#define TARGET_FREEBSD_NR_getpgid 207 +-#define TARGET_FREEBSD_NR_poll 209 +-#define TARGET_FREEBSD_NR_freebsd7___semctl 220 +-#define TARGET_FREEBSD_NR_semget 221 +-#define TARGET_FREEBSD_NR_semop 222 +-#define TARGET_FREEBSD_NR_freebsd7_msgctl 224 +-#define TARGET_FREEBSD_NR_msgget 225 +-#define TARGET_FREEBSD_NR_msgsnd 226 +-#define TARGET_FREEBSD_NR_msgrcv 227 +-#define TARGET_FREEBSD_NR_shmat 228 +-#define TARGET_FREEBSD_NR_freebsd7_shmctl 229 +-#define TARGET_FREEBSD_NR_shmdt 230 +-#define TARGET_FREEBSD_NR_shmget 231 +-#define TARGET_FREEBSD_NR_clock_gettime 232 +-#define TARGET_FREEBSD_NR_clock_settime 233 +-#define TARGET_FREEBSD_NR_clock_getres 234 +-#define TARGET_FREEBSD_NR_ktimer_create 235 +-#define TARGET_FREEBSD_NR_ktimer_delete 236 +-#define TARGET_FREEBSD_NR_ktimer_settime 237 +-#define TARGET_FREEBSD_NR_ktimer_gettime 238 +-#define TARGET_FREEBSD_NR_ktimer_getoverrun 239 +-#define TARGET_FREEBSD_NR_nanosleep 240 +-#define TARGET_FREEBSD_NR_ntp_gettime 248 +-#define TARGET_FREEBSD_NR_minherit 250 +-#define TARGET_FREEBSD_NR_rfork 251 +-#define TARGET_FREEBSD_NR_openbsd_poll 252 +-#define TARGET_FREEBSD_NR_issetugid 253 +-#define TARGET_FREEBSD_NR_lchown 254 +-#define TARGET_FREEBSD_NR_aio_read 255 +-#define TARGET_FREEBSD_NR_aio_write 256 +-#define TARGET_FREEBSD_NR_lio_listio 257 +-#define TARGET_FREEBSD_NR_getdents 272 +-#define TARGET_FREEBSD_NR_lchmod 274 +-#define TARGET_FREEBSD_NR_netbsd_lchown 275 +-#define TARGET_FREEBSD_NR_lutimes 276 +-#define TARGET_FREEBSD_NR_netbsd_msync 277 +-#define TARGET_FREEBSD_NR_nstat 278 +-#define TARGET_FREEBSD_NR_nfstat 279 +-#define TARGET_FREEBSD_NR_nlstat 280 +-#define TARGET_FREEBSD_NR_preadv 289 +-#define TARGET_FREEBSD_NR_pwritev 290 +-#define TARGET_FREEBSD_NR_freebsd4_fhstatfs 297 +-#define TARGET_FREEBSD_NR_fhopen 298 +-#define TARGET_FREEBSD_NR_fhstat 299 +-#define TARGET_FREEBSD_NR_modnext 300 +-#define TARGET_FREEBSD_NR_modstat 301 +-#define TARGET_FREEBSD_NR_modfnext 302 +-#define TARGET_FREEBSD_NR_modfind 303 +-#define TARGET_FREEBSD_NR_kldload 304 +-#define TARGET_FREEBSD_NR_kldunload 305 +-#define TARGET_FREEBSD_NR_kldfind 306 +-#define TARGET_FREEBSD_NR_kldnext 307 +-#define TARGET_FREEBSD_NR_kldstat 308 +-#define TARGET_FREEBSD_NR_kldfirstmod 309 +-#define TARGET_FREEBSD_NR_getsid 310 +-#define TARGET_FREEBSD_NR_setresuid 311 +-#define TARGET_FREEBSD_NR_setresgid 312 +- /* 313 is obsolete signanosleep */ +-#define TARGET_FREEBSD_NR_aio_return 314 +-#define TARGET_FREEBSD_NR_aio_suspend 315 +-#define TARGET_FREEBSD_NR_aio_cancel 316 +-#define TARGET_FREEBSD_NR_aio_error 317 +-#define TARGET_FREEBSD_NR_oaio_read 318 +-#define TARGET_FREEBSD_NR_oaio_write 319 +-#define TARGET_FREEBSD_NR_olio_listio 320 +-#define TARGET_FREEBSD_NR_yield 321 +- /* 322 is obsolete thr_sleep */ +- /* 323 is obsolete thr_wakeup */ +-#define TARGET_FREEBSD_NR_mlockall 324 +-#define TARGET_FREEBSD_NR_munlockall 325 +-#define TARGET_FREEBSD_NR___getcwd 326 +-#define TARGET_FREEBSD_NR_sched_setparam 327 +-#define TARGET_FREEBSD_NR_sched_getparam 328 +-#define TARGET_FREEBSD_NR_sched_setscheduler 329 +-#define TARGET_FREEBSD_NR_sched_getscheduler 330 +-#define TARGET_FREEBSD_NR_sched_yield 331 +-#define TARGET_FREEBSD_NR_sched_get_priority_max 332 +-#define TARGET_FREEBSD_NR_sched_get_priority_min 333 +-#define TARGET_FREEBSD_NR_sched_rr_get_interval 334 +-#define TARGET_FREEBSD_NR_utrace 335 +-#define TARGET_FREEBSD_NR_freebsd4_sendfile 336 +-#define TARGET_FREEBSD_NR_kldsym 337 +-#define TARGET_FREEBSD_NR_jail 338 +-#define TARGET_FREEBSD_NR_nnpfs_syscall 339 +-#define TARGET_FREEBSD_NR_sigprocmask 340 +-#define TARGET_FREEBSD_NR_sigsuspend 341 +-#define TARGET_FREEBSD_NR_freebsd4_sigaction 342 +-#define TARGET_FREEBSD_NR_sigpending 343 +-#define TARGET_FREEBSD_NR_freebsd4_sigreturn 344 +-#define TARGET_FREEBSD_NR_sigtimedwait 345 +-#define TARGET_FREEBSD_NR_sigwaitinfo 346 +-#define TARGET_FREEBSD_NR___acl_get_file 347 +-#define TARGET_FREEBSD_NR___acl_set_file 348 +-#define TARGET_FREEBSD_NR___acl_get_fd 349 +-#define TARGET_FREEBSD_NR___acl_set_fd 350 +-#define TARGET_FREEBSD_NR___acl_delete_file 351 +-#define TARGET_FREEBSD_NR___acl_delete_fd 352 +-#define TARGET_FREEBSD_NR___acl_aclcheck_file 353 +-#define TARGET_FREEBSD_NR___acl_aclcheck_fd 354 +-#define TARGET_FREEBSD_NR_extattrctl 355 +-#define TARGET_FREEBSD_NR_extattr_set_file 356 +-#define TARGET_FREEBSD_NR_extattr_get_file 357 +-#define TARGET_FREEBSD_NR_extattr_delete_file 358 +-#define TARGET_FREEBSD_NR_aio_waitcomplete 359 +-#define TARGET_FREEBSD_NR_getresuid 360 +-#define TARGET_FREEBSD_NR_getresgid 361 +-#define TARGET_FREEBSD_NR_kqueue 362 +-#define TARGET_FREEBSD_NR_kevent 363 +-#define TARGET_FREEBSD_NR_extattr_set_fd 371 +-#define TARGET_FREEBSD_NR_extattr_get_fd 372 +-#define TARGET_FREEBSD_NR_extattr_delete_fd 373 +-#define TARGET_FREEBSD_NR___setugid 374 +-#define TARGET_FREEBSD_NR_eaccess 376 +-#define TARGET_FREEBSD_NR_afs3_syscall 377 +-#define TARGET_FREEBSD_NR_nmount 378 +-#define TARGET_FREEBSD_NR___mac_get_proc 384 +-#define TARGET_FREEBSD_NR___mac_set_proc 385 +-#define TARGET_FREEBSD_NR___mac_get_fd 386 +-#define TARGET_FREEBSD_NR___mac_get_file 387 +-#define TARGET_FREEBSD_NR___mac_set_fd 388 +-#define TARGET_FREEBSD_NR___mac_set_file 389 +-#define TARGET_FREEBSD_NR_kenv 390 +-#define TARGET_FREEBSD_NR_lchflags 391 +-#define TARGET_FREEBSD_NR_uuidgen 392 +-#define TARGET_FREEBSD_NR_sendfile 393 +-#define TARGET_FREEBSD_NR_mac_syscall 394 +-#define TARGET_FREEBSD_NR_getfsstat 395 +-#define TARGET_FREEBSD_NR_statfs 396 +-#define TARGET_FREEBSD_NR_fstatfs 397 +-#define TARGET_FREEBSD_NR_fhstatfs 398 +-#define TARGET_FREEBSD_NR_ksem_close 400 +-#define TARGET_FREEBSD_NR_ksem_post 401 +-#define TARGET_FREEBSD_NR_ksem_wait 402 +-#define TARGET_FREEBSD_NR_ksem_trywait 403 +-#define TARGET_FREEBSD_NR_ksem_init 404 +-#define TARGET_FREEBSD_NR_ksem_open 405 +-#define TARGET_FREEBSD_NR_ksem_unlink 406 +-#define TARGET_FREEBSD_NR_ksem_getvalue 407 +-#define TARGET_FREEBSD_NR_ksem_destroy 408 +-#define TARGET_FREEBSD_NR___mac_get_pid 409 +-#define TARGET_FREEBSD_NR___mac_get_link 410 +-#define TARGET_FREEBSD_NR___mac_set_link 411 +-#define TARGET_FREEBSD_NR_extattr_set_link 412 +-#define TARGET_FREEBSD_NR_extattr_get_link 413 +-#define TARGET_FREEBSD_NR_extattr_delete_link 414 +-#define TARGET_FREEBSD_NR___mac_execve 415 +-#define TARGET_FREEBSD_NR_sigaction 416 +-#define TARGET_FREEBSD_NR_sigreturn 417 +-#define TARGET_FREEBSD_NR_getcontext 421 +-#define TARGET_FREEBSD_NR_setcontext 422 +-#define TARGET_FREEBSD_NR_swapcontext 423 +-#define TARGET_FREEBSD_NR_swapoff 424 +-#define TARGET_FREEBSD_NR___acl_get_link 425 +-#define TARGET_FREEBSD_NR___acl_set_link 426 +-#define TARGET_FREEBSD_NR___acl_delete_link 427 +-#define TARGET_FREEBSD_NR___acl_aclcheck_link 428 +-#define TARGET_FREEBSD_NR_sigwait 429 +-#define TARGET_FREEBSD_NR_thr_create 430 +-#define TARGET_FREEBSD_NR_thr_exit 431 +-#define TARGET_FREEBSD_NR_thr_self 432 +-#define TARGET_FREEBSD_NR_thr_kill 433 +-#define TARGET_FREEBSD_NR__umtx_lock 434 +-#define TARGET_FREEBSD_NR__umtx_unlock 435 +-#define TARGET_FREEBSD_NR_jail_attach 436 +-#define TARGET_FREEBSD_NR_extattr_list_fd 437 +-#define TARGET_FREEBSD_NR_extattr_list_file 438 +-#define TARGET_FREEBSD_NR_extattr_list_link 439 +-#define TARGET_FREEBSD_NR_ksem_timedwait 441 +-#define TARGET_FREEBSD_NR_thr_suspend 442 +-#define TARGET_FREEBSD_NR_thr_wake 443 +-#define TARGET_FREEBSD_NR_kldunloadf 444 +-#define TARGET_FREEBSD_NR_audit 445 +-#define TARGET_FREEBSD_NR_auditon 446 +-#define TARGET_FREEBSD_NR_getauid 447 +-#define TARGET_FREEBSD_NR_setauid 448 +-#define TARGET_FREEBSD_NR_getaudit 449 +-#define TARGET_FREEBSD_NR_setaudit 450 +-#define TARGET_FREEBSD_NR_getaudit_addr 451 +-#define TARGET_FREEBSD_NR_setaudit_addr 452 +-#define TARGET_FREEBSD_NR_auditctl 453 +-#define TARGET_FREEBSD_NR__umtx_op 454 +-#define TARGET_FREEBSD_NR_thr_new 455 +-#define TARGET_FREEBSD_NR_sigqueue 456 +-#define TARGET_FREEBSD_NR_kmq_open 457 +-#define TARGET_FREEBSD_NR_kmq_setattr 458 +-#define TARGET_FREEBSD_NR_kmq_timedreceive 459 +-#define TARGET_FREEBSD_NR_kmq_timedsend 460 +-#define TARGET_FREEBSD_NR_kmq_notify 461 +-#define TARGET_FREEBSD_NR_kmq_unlink 462 +-#define TARGET_FREEBSD_NR_abort2 463 +-#define TARGET_FREEBSD_NR_thr_set_name 464 +-#define TARGET_FREEBSD_NR_aio_fsync 465 +-#define TARGET_FREEBSD_NR_rtprio_thread 466 +-#define TARGET_FREEBSD_NR_sctp_peeloff 471 +-#define TARGET_FREEBSD_NR_sctp_generic_sendmsg 472 +-#define TARGET_FREEBSD_NR_sctp_generic_sendmsg_iov 473 +-#define TARGET_FREEBSD_NR_sctp_generic_recvmsg 474 +-#define TARGET_FREEBSD_NR_pread 475 +-#define TARGET_FREEBSD_NR_pwrite 476 +-#define TARGET_FREEBSD_NR_mmap 477 +-#define TARGET_FREEBSD_NR_lseek 478 +-#define TARGET_FREEBSD_NR_truncate 479 +-#define TARGET_FREEBSD_NR_ftruncate 480 +-#define TARGET_FREEBSD_NR_thr_kill2 481 +-#define TARGET_FREEBSD_NR_shm_open 482 +-#define TARGET_FREEBSD_NR_shm_unlink 483 +-#define TARGET_FREEBSD_NR_cpuset 484 +-#define TARGET_FREEBSD_NR_cpuset_setid 485 +-#define TARGET_FREEBSD_NR_cpuset_getid 486 +-#define TARGET_FREEBSD_NR_cpuset_getaffinity 487 +-#define TARGET_FREEBSD_NR_cpuset_setaffinity 488 +-#define TARGET_FREEBSD_NR_faccessat 489 +-#define TARGET_FREEBSD_NR_fchmodat 490 +-#define TARGET_FREEBSD_NR_fchownat 491 +-#define TARGET_FREEBSD_NR_fexecve 492 +-#define TARGET_FREEBSD_NR_fstatat 493 +-#define TARGET_FREEBSD_NR_futimesat 494 +-#define TARGET_FREEBSD_NR_linkat 495 +-#define TARGET_FREEBSD_NR_mkdirat 496 +-#define TARGET_FREEBSD_NR_mkfifoat 497 +-#define TARGET_FREEBSD_NR_mknodat 498 +-#define TARGET_FREEBSD_NR_openat 499 +-#define TARGET_FREEBSD_NR_readlinkat 500 +-#define TARGET_FREEBSD_NR_renameat 501 +-#define TARGET_FREEBSD_NR_symlinkat 502 +-#define TARGET_FREEBSD_NR_unlinkat 503 +-#define TARGET_FREEBSD_NR_posix_openpt 504 +-#define TARGET_FREEBSD_NR_gssd_syscall 505 +-#define TARGET_FREEBSD_NR_jail_get 506 +-#define TARGET_FREEBSD_NR_jail_set 507 +-#define TARGET_FREEBSD_NR_jail_remove 508 +-#define TARGET_FREEBSD_NR_closefrom 509 +-#define TARGET_FREEBSD_NR___semctl 510 +-#define TARGET_FREEBSD_NR_msgctl 511 +-#define TARGET_FREEBSD_NR_shmctl 512 +-#define TARGET_FREEBSD_NR_lpathconf 513 +-#define TARGET_FREEBSD_NR_cap_new 514 +-#define TARGET_FREEBSD_NR_cap_getrights 515 +-#define TARGET_FREEBSD_NR_cap_enter 516 +-#define TARGET_FREEBSD_NR_cap_getmode 517 +-#define TARGET_FREEBSD_NR_pdfork 518 +-#define TARGET_FREEBSD_NR_pdkill 519 +-#define TARGET_FREEBSD_NR_pdgetpid 520 +-#define TARGET_FREEBSD_NR_pselect 522 +-#define TARGET_FREEBSD_NR_getloginclass 523 +-#define TARGET_FREEBSD_NR_setloginclass 524 +-#define TARGET_FREEBSD_NR_rctl_get_racct 525 +-#define TARGET_FREEBSD_NR_rctl_get_rules 526 +-#define TARGET_FREEBSD_NR_rctl_get_limits 527 +-#define TARGET_FREEBSD_NR_rctl_add_rule 528 +-#define TARGET_FREEBSD_NR_rctl_remove_rule 529 +-#define TARGET_FREEBSD_NR_posix_fallocate 530 +-#define TARGET_FREEBSD_NR_posix_fadvise 531 +-#define TARGET_FREEBSD_NR_wait6 532 +-#define TARGET_FREEBSD_NR_cap_rights_limit 533 +-#define TARGET_FREEBSD_NR_cap_ioctls_limit 534 +-#define TARGET_FREEBSD_NR_cap_ioctls_get 535 +-#define TARGET_FREEBSD_NR_cap_fcntls_limit 536 +-#define TARGET_FREEBSD_NR_cap_fcntls_get 537 +-#define TARGET_FREEBSD_NR_bindat 538 +-#define TARGET_FREEBSD_NR_connectat 539 +-#define TARGET_FREEBSD_NR_chflagsat 540 +-#define TARGET_FREEBSD_NR_accept4 541 +-#define TARGET_FREEBSD_NR_pipe2 542 ++#define TARGET_FREEBSD_NR_syscall 0 ++#define TARGET_FREEBSD_NR_exit 1 ++#define TARGET_FREEBSD_NR_fork 2 ++#define TARGET_FREEBSD_NR_read 3 ++#define TARGET_FREEBSD_NR_write 4 ++#define TARGET_FREEBSD_NR_open 5 ++#define TARGET_FREEBSD_NR_close 6 ++#define TARGET_FREEBSD_NR_wait4 7 ++ /* 8 is old creat */ ++#define TARGET_FREEBSD_NR_link 9 ++#define TARGET_FREEBSD_NR_unlink 10 ++ /* 11 is obsolete execv */ ++#define TARGET_FREEBSD_NR_chdir 12 ++#define TARGET_FREEBSD_NR_fchdir 13 ++#define TARGET_FREEBSD_NR_mknod 14 ++#define TARGET_FREEBSD_NR_chmod 15 ++#define TARGET_FREEBSD_NR_chown 16 ++#define TARGET_FREEBSD_NR_break 17 ++#define TARGET_FREEBSD_NR_freebsd4_getfsstat 18 ++ /* 19 is old lseek */ ++#define TARGET_FREEBSD_NR_getpid 20 ++#define TARGET_FREEBSD_NR_mount 21 ++#define TARGET_FREEBSD_NR_unmount 22 ++#define TARGET_FREEBSD_NR_setuid 23 ++#define TARGET_FREEBSD_NR_getuid 24 ++#define TARGET_FREEBSD_NR_geteuid 25 ++#define TARGET_FREEBSD_NR_ptrace 26 ++#define TARGET_FREEBSD_NR_recvmsg 27 ++#define TARGET_FREEBSD_NR_sendmsg 28 ++#define TARGET_FREEBSD_NR_recvfrom 29 ++#define TARGET_FREEBSD_NR_accept 30 ++#define TARGET_FREEBSD_NR_getpeername 31 ++#define TARGET_FREEBSD_NR_getsockname 32 ++#define TARGET_FREEBSD_NR_access 33 ++#define TARGET_FREEBSD_NR_chflags 34 ++#define TARGET_FREEBSD_NR_fchflags 35 ++#define TARGET_FREEBSD_NR_sync 36 ++#define TARGET_FREEBSD_NR_kill 37 ++ /* 38 is old stat */ ++#define TARGET_FREEBSD_NR_getppid 39 ++ /* 40 is old lstat */ ++#define TARGET_FREEBSD_NR_dup 41 ++#define TARGET_FREEBSD_NR_pipe 42 ++#define TARGET_FREEBSD_NR_getegid 43 ++#define TARGET_FREEBSD_NR_profil 44 ++#define TARGET_FREEBSD_NR_ktrace 45 ++ /* 46 is old sigaction */ ++#define TARGET_FREEBSD_NR_getgid 47 ++ /* 48 is old sigprocmask */ ++#define TARGET_FREEBSD_NR_getlogin 49 ++#define TARGET_FREEBSD_NR_setlogin 50 ++#define TARGET_FREEBSD_NR_acct 51 ++ /* 52 is old sigpending */ ++#define TARGET_FREEBSD_NR_sigaltstack 53 ++#define TARGET_FREEBSD_NR_ioctl 54 ++#define TARGET_FREEBSD_NR_reboot 55 ++#define TARGET_FREEBSD_NR_revoke 56 ++#define TARGET_FREEBSD_NR_symlink 57 ++#define TARGET_FREEBSD_NR_readlink 58 ++#define TARGET_FREEBSD_NR_execve 59 ++#define TARGET_FREEBSD_NR_umask 60 ++#define TARGET_FREEBSD_NR_chroot 61 ++ /* 62 is old fstat */ ++ /* 63 is old getkerninfo */ ++ /* 64 is old getpagesize */ ++#define TARGET_FREEBSD_NR_msync 65 ++#define TARGET_FREEBSD_NR_vfork 66 ++ /* 67 is obsolete vread */ ++ /* 68 is obsolete vwrite */ ++#define TARGET_FREEBSD_NR_sbrk 69 ++#define TARGET_FREEBSD_NR_sstk 70 ++ /* 71 is old mmap */ ++#define TARGET_FREEBSD_NR_vadvise 72 ++#define TARGET_FREEBSD_NR_munmap 73 ++#define TARGET_FREEBSD_NR_mprotect 74 ++#define TARGET_FREEBSD_NR_madvise 75 ++ /* 76 is obsolete vhangup */ ++ /* 77 is obsolete vlimit */ ++#define TARGET_FREEBSD_NR_mincore 78 ++#define TARGET_FREEBSD_NR_getgroups 79 ++#define TARGET_FREEBSD_NR_setgroups 80 ++#define TARGET_FREEBSD_NR_getpgrp 81 ++#define TARGET_FREEBSD_NR_setpgid 82 ++#define TARGET_FREEBSD_NR_setitimer 83 ++ /* 84 is old wait */ ++#define TARGET_FREEBSD_NR_swapon 85 ++#define TARGET_FREEBSD_NR_getitimer 86 ++ /* 87 is old gethostname */ ++ /* 88 is old sethostname */ ++#define TARGET_FREEBSD_NR_getdtablesize 89 ++#define TARGET_FREEBSD_NR_dup2 90 ++#define TARGET_FREEBSD_NR_fcntl 92 ++#define TARGET_FREEBSD_NR_select 93 ++#define TARGET_FREEBSD_NR_fsync 95 ++#define TARGET_FREEBSD_NR_setpriority 96 ++#define TARGET_FREEBSD_NR_socket 97 ++#define TARGET_FREEBSD_NR_connect 98 ++ /* 99 is old accept */ ++#define TARGET_FREEBSD_NR_getpriority 100 ++ /* 101 is old send */ ++ /* 102 is old recv */ ++ /* 103 is old sigreturn */ ++#define TARGET_FREEBSD_NR_bind 104 ++#define TARGET_FREEBSD_NR_setsockopt 105 ++#define TARGET_FREEBSD_NR_listen 106 ++ /* 107 is obsolete vtimes */ ++ /* 108 is old sigvec */ ++ /* 109 is old sigblock */ ++ /* 110 is old sigsetmask */ ++ /* 111 is old sigsuspend */ ++ /* 112 is old sigstack */ ++ /* 113 is old recvmsg */ ++ /* 114 is old sendmsg */ ++ /* 115 is obsolete vtrace */ ++#define TARGET_FREEBSD_NR_gettimeofday 116 ++#define TARGET_FREEBSD_NR_getrusage 117 ++#define TARGET_FREEBSD_NR_getsockopt 118 ++#define TARGET_FREEBSD_NR_readv 120 ++#define TARGET_FREEBSD_NR_writev 121 ++#define TARGET_FREEBSD_NR_settimeofday 122 ++#define TARGET_FREEBSD_NR_fchown 123 ++#define TARGET_FREEBSD_NR_fchmod 124 ++ /* 125 is old recvfrom */ ++#define TARGET_FREEBSD_NR_setreuid 126 ++#define TARGET_FREEBSD_NR_setregid 127 ++#define TARGET_FREEBSD_NR_rename 128 ++ /* 129 is old truncate */ ++ /* 130 is old ftruncate */ ++#define TARGET_FREEBSD_NR_flock 131 ++#define TARGET_FREEBSD_NR_mkfifo 132 ++#define TARGET_FREEBSD_NR_sendto 133 ++#define TARGET_FREEBSD_NR_shutdown 134 ++#define TARGET_FREEBSD_NR_socketpair 135 ++#define TARGET_FREEBSD_NR_mkdir 136 ++#define TARGET_FREEBSD_NR_rmdir 137 ++#define TARGET_FREEBSD_NR_utimes 138 ++ /* 139 is obsolete 4.2 sigreturn */ ++#define TARGET_FREEBSD_NR_adjtime 140 ++ /* 141 is old getpeername */ ++ /* 142 is old gethostid */ ++ /* 143 is old sethostid */ ++ /* 144 is old getrlimit */ ++ /* 145 is old setrlimit */ ++ /* 146 is old killpg */ ++#define TARGET_FREEBSD_NR_setsid 147 ++#define TARGET_FREEBSD_NR_quotactl 148 ++ /* 149 is old quota */ ++ /* 150 is old getsockname */ ++#define TARGET_FREEBSD_NR_nlm_syscall 154 ++#define TARGET_FREEBSD_NR_nfssvc 155 ++ /* 156 is old getdirentries */ ++#define TARGET_FREEBSD_NR_freebsd4_statfs 157 ++#define TARGET_FREEBSD_NR_freebsd4_fstatfs 158 ++#define TARGET_FREEBSD_NR_lgetfh 160 ++#define TARGET_FREEBSD_NR_getfh 161 ++#define TARGET_FREEBSD_NR_freebsd4_getdomainname 162 ++#define TARGET_FREEBSD_NR_freebsd4_setdomainname 163 ++#define TARGET_FREEBSD_NR_freebsd4_uname 164 ++#define TARGET_FREEBSD_NR_sysarch 165 ++#define TARGET_FREEBSD_NR_rtprio 166 ++#define TARGET_FREEBSD_NR_semsys 169 ++#define TARGET_FREEBSD_NR_msgsys 170 ++#define TARGET_FREEBSD_NR_shmsys 171 ++#define TARGET_FREEBSD_NR_freebsd6_pread 173 ++#define TARGET_FREEBSD_NR_freebsd6_pwrite 174 ++#define TARGET_FREEBSD_NR_setfib 175 ++#define TARGET_FREEBSD_NR_ntp_adjtime 176 ++#define TARGET_FREEBSD_NR_setgid 181 ++#define TARGET_FREEBSD_NR_setegid 182 ++#define TARGET_FREEBSD_NR_seteuid 183 ++#define TARGET_FREEBSD_NR_stat 188 ++#define TARGET_FREEBSD_NR_fstat 189 ++#define TARGET_FREEBSD_NR_lstat 190 ++#define TARGET_FREEBSD_NR_pathconf 191 ++#define TARGET_FREEBSD_NR_fpathconf 192 ++#define TARGET_FREEBSD_NR_getrlimit 194 ++#define TARGET_FREEBSD_NR_setrlimit 195 ++#define TARGET_FREEBSD_NR_getdirentries 196 ++#define TARGET_FREEBSD_NR_freebsd6_mmap 197 ++#define TARGET_FREEBSD_NR___syscall 198 ++#define TARGET_FREEBSD_NR_freebsd6_lseek 199 ++#define TARGET_FREEBSD_NR_freebsd6_truncate 200 ++#define TARGET_FREEBSD_NR_freebsd6_ftruncate 201 ++#define TARGET_FREEBSD_NR___sysctl 202 ++#define TARGET_FREEBSD_NR_mlock 203 ++#define TARGET_FREEBSD_NR_munlock 204 ++#define TARGET_FREEBSD_NR_undelete 205 ++#define TARGET_FREEBSD_NR_futimes 206 ++#define TARGET_FREEBSD_NR_getpgid 207 ++#define TARGET_FREEBSD_NR_poll 209 ++#define TARGET_FREEBSD_NR_freebsd7___semctl 220 ++#define TARGET_FREEBSD_NR_semget 221 ++#define TARGET_FREEBSD_NR_semop 222 ++#define TARGET_FREEBSD_NR_freebsd7_msgctl 224 ++#define TARGET_FREEBSD_NR_msgget 225 ++#define TARGET_FREEBSD_NR_msgsnd 226 ++#define TARGET_FREEBSD_NR_msgrcv 227 ++#define TARGET_FREEBSD_NR_shmat 228 ++#define TARGET_FREEBSD_NR_freebsd7_shmctl 229 ++#define TARGET_FREEBSD_NR_shmdt 230 ++#define TARGET_FREEBSD_NR_shmget 231 ++#define TARGET_FREEBSD_NR_clock_gettime 232 ++#define TARGET_FREEBSD_NR_clock_settime 233 ++#define TARGET_FREEBSD_NR_clock_getres 234 ++#define TARGET_FREEBSD_NR_ktimer_create 235 ++#define TARGET_FREEBSD_NR_ktimer_delete 236 ++#define TARGET_FREEBSD_NR_ktimer_settime 237 ++#define TARGET_FREEBSD_NR_ktimer_gettime 238 ++#define TARGET_FREEBSD_NR_ktimer_getoverrun 239 ++#define TARGET_FREEBSD_NR_nanosleep 240 ++#define TARGET_FREEBSD_NR_ffclock_getcounter 241 ++#define TARGET_FREEBSD_NR_ffclock_setestimate 242 ++#define TARGET_FREEBSD_NR_ffclock_getestimate 243 ++#define TARGET_FREEBSD_NR_clock_getcpuclockid2 247 ++#define TARGET_FREEBSD_NR_ntp_gettime 248 ++#define TARGET_FREEBSD_NR_minherit 250 ++#define TARGET_FREEBSD_NR_rfork 251 ++#define TARGET_FREEBSD_NR_openbsd_poll 252 ++#define TARGET_FREEBSD_NR_issetugid 253 ++#define TARGET_FREEBSD_NR_lchown 254 ++#define TARGET_FREEBSD_NR_aio_read 255 ++#define TARGET_FREEBSD_NR_aio_write 256 ++#define TARGET_FREEBSD_NR_lio_listio 257 ++#define TARGET_FREEBSD_NR_getdents 272 ++#define TARGET_FREEBSD_NR_lchmod 274 ++#define TARGET_FREEBSD_NR_netbsd_lchown 275 ++#define TARGET_FREEBSD_NR_lutimes 276 ++#define TARGET_FREEBSD_NR_netbsd_msync 277 ++#define TARGET_FREEBSD_NR_nstat 278 ++#define TARGET_FREEBSD_NR_nfstat 279 ++#define TARGET_FREEBSD_NR_nlstat 280 ++#define TARGET_FREEBSD_NR_preadv 289 ++#define TARGET_FREEBSD_NR_pwritev 290 ++#define TARGET_FREEBSD_NR_freebsd4_fhstatfs 297 ++#define TARGET_FREEBSD_NR_fhopen 298 ++#define TARGET_FREEBSD_NR_fhstat 299 ++#define TARGET_FREEBSD_NR_modnext 300 ++#define TARGET_FREEBSD_NR_modstat 301 ++#define TARGET_FREEBSD_NR_modfnext 302 ++#define TARGET_FREEBSD_NR_modfind 303 ++#define TARGET_FREEBSD_NR_kldload 304 ++#define TARGET_FREEBSD_NR_kldunload 305 ++#define TARGET_FREEBSD_NR_kldfind 306 ++#define TARGET_FREEBSD_NR_kldnext 307 ++#define TARGET_FREEBSD_NR_kldstat 308 ++#define TARGET_FREEBSD_NR_kldfirstmod 309 ++#define TARGET_FREEBSD_NR_getsid 310 ++#define TARGET_FREEBSD_NR_setresuid 311 ++#define TARGET_FREEBSD_NR_setresgid 312 ++ /* 313 is obsolete signanosleep */ ++#define TARGET_FREEBSD_NR_aio_return 314 ++#define TARGET_FREEBSD_NR_aio_suspend 315 ++#define TARGET_FREEBSD_NR_aio_cancel 316 ++#define TARGET_FREEBSD_NR_aio_error 317 ++#define TARGET_FREEBSD_NR_oaio_read 318 ++#define TARGET_FREEBSD_NR_oaio_write 319 ++#define TARGET_FREEBSD_NR_olio_listio 320 ++#define TARGET_FREEBSD_NR_yield 321 ++ /* 322 is obsolete thr_sleep */ ++ /* 323 is obsolete thr_wakeup */ ++#define TARGET_FREEBSD_NR_mlockall 324 ++#define TARGET_FREEBSD_NR_munlockall 325 ++#define TARGET_FREEBSD_NR___getcwd 326 ++#define TARGET_FREEBSD_NR_sched_setparam 327 ++#define TARGET_FREEBSD_NR_sched_getparam 328 ++#define TARGET_FREEBSD_NR_sched_setscheduler 329 ++#define TARGET_FREEBSD_NR_sched_getscheduler 330 ++#define TARGET_FREEBSD_NR_sched_yield 331 ++#define TARGET_FREEBSD_NR_sched_get_priority_max 332 ++#define TARGET_FREEBSD_NR_sched_get_priority_min 333 ++#define TARGET_FREEBSD_NR_sched_rr_get_interval 334 ++#define TARGET_FREEBSD_NR_utrace 335 ++#define TARGET_FREEBSD_NR_freebsd4_sendfile 336 ++#define TARGET_FREEBSD_NR_kldsym 337 ++#define TARGET_FREEBSD_NR_jail 338 ++#define TARGET_FREEBSD_NR_nnpfs_syscall 339 ++#define TARGET_FREEBSD_NR_sigprocmask 340 ++#define TARGET_FREEBSD_NR_sigsuspend 341 ++#define TARGET_FREEBSD_NR_freebsd4_sigaction 342 ++#define TARGET_FREEBSD_NR_sigpending 343 ++#define TARGET_FREEBSD_NR_freebsd4_sigreturn 344 ++#define TARGET_FREEBSD_NR_sigtimedwait 345 ++#define TARGET_FREEBSD_NR_sigwaitinfo 346 ++#define TARGET_FREEBSD_NR___acl_get_file 347 ++#define TARGET_FREEBSD_NR___acl_set_file 348 ++#define TARGET_FREEBSD_NR___acl_get_fd 349 ++#define TARGET_FREEBSD_NR___acl_set_fd 350 ++#define TARGET_FREEBSD_NR___acl_delete_file 351 ++#define TARGET_FREEBSD_NR___acl_delete_fd 352 ++#define TARGET_FREEBSD_NR___acl_aclcheck_file 353 ++#define TARGET_FREEBSD_NR___acl_aclcheck_fd 354 ++#define TARGET_FREEBSD_NR_extattrctl 355 ++#define TARGET_FREEBSD_NR_extattr_set_file 356 ++#define TARGET_FREEBSD_NR_extattr_get_file 357 ++#define TARGET_FREEBSD_NR_extattr_delete_file 358 ++#define TARGET_FREEBSD_NR_aio_waitcomplete 359 ++#define TARGET_FREEBSD_NR_getresuid 360 ++#define TARGET_FREEBSD_NR_getresgid 361 ++#define TARGET_FREEBSD_NR_kqueue 362 ++#define TARGET_FREEBSD_NR_kevent 363 ++#define TARGET_FREEBSD_NR_extattr_set_fd 371 ++#define TARGET_FREEBSD_NR_extattr_get_fd 372 ++#define TARGET_FREEBSD_NR_extattr_delete_fd 373 ++#define TARGET_FREEBSD_NR___setugid 374 ++#define TARGET_FREEBSD_NR_eaccess 376 ++#define TARGET_FREEBSD_NR_afs3_syscall 377 ++#define TARGET_FREEBSD_NR_nmount 378 ++#define TARGET_FREEBSD_NR___mac_get_proc 384 ++#define TARGET_FREEBSD_NR___mac_set_proc 385 ++#define TARGET_FREEBSD_NR___mac_get_fd 386 ++#define TARGET_FREEBSD_NR___mac_get_file 387 ++#define TARGET_FREEBSD_NR___mac_set_fd 388 ++#define TARGET_FREEBSD_NR___mac_set_file 389 ++#define TARGET_FREEBSD_NR_kenv 390 ++#define TARGET_FREEBSD_NR_lchflags 391 ++#define TARGET_FREEBSD_NR_uuidgen 392 ++#define TARGET_FREEBSD_NR_sendfile 393 ++#define TARGET_FREEBSD_NR_mac_syscall 394 ++#define TARGET_FREEBSD_NR_getfsstat 395 ++#define TARGET_FREEBSD_NR_statfs 396 ++#define TARGET_FREEBSD_NR_fstatfs 397 ++#define TARGET_FREEBSD_NR_fhstatfs 398 ++#define TARGET_FREEBSD_NR_ksem_close 400 ++#define TARGET_FREEBSD_NR_ksem_post 401 ++#define TARGET_FREEBSD_NR_ksem_wait 402 ++#define TARGET_FREEBSD_NR_ksem_trywait 403 ++#define TARGET_FREEBSD_NR_ksem_init 404 ++#define TARGET_FREEBSD_NR_ksem_open 405 ++#define TARGET_FREEBSD_NR_ksem_unlink 406 ++#define TARGET_FREEBSD_NR_ksem_getvalue 407 ++#define TARGET_FREEBSD_NR_ksem_destroy 408 ++#define TARGET_FREEBSD_NR___mac_get_pid 409 ++#define TARGET_FREEBSD_NR___mac_get_link 410 ++#define TARGET_FREEBSD_NR___mac_set_link 411 ++#define TARGET_FREEBSD_NR_extattr_set_link 412 ++#define TARGET_FREEBSD_NR_extattr_get_link 413 ++#define TARGET_FREEBSD_NR_extattr_delete_link 414 ++#define TARGET_FREEBSD_NR___mac_execve 415 ++#define TARGET_FREEBSD_NR_sigaction 416 ++#define TARGET_FREEBSD_NR_sigreturn 417 ++#define TARGET_FREEBSD_NR_getcontext 421 ++#define TARGET_FREEBSD_NR_setcontext 422 ++#define TARGET_FREEBSD_NR_swapcontext 423 ++#define TARGET_FREEBSD_NR_swapoff 424 ++#define TARGET_FREEBSD_NR___acl_get_link 425 ++#define TARGET_FREEBSD_NR___acl_set_link 426 ++#define TARGET_FREEBSD_NR___acl_delete_link 427 ++#define TARGET_FREEBSD_NR___acl_aclcheck_link 428 ++#define TARGET_FREEBSD_NR_sigwait 429 ++#define TARGET_FREEBSD_NR_thr_create 430 ++#define TARGET_FREEBSD_NR_thr_exit 431 ++#define TARGET_FREEBSD_NR_thr_self 432 ++#define TARGET_FREEBSD_NR_thr_kill 433 ++#define TARGET_FREEBSD_NR_jail_attach 436 ++#define TARGET_FREEBSD_NR_extattr_list_fd 437 ++#define TARGET_FREEBSD_NR_extattr_list_file 438 ++#define TARGET_FREEBSD_NR_extattr_list_link 439 ++#define TARGET_FREEBSD_NR_ksem_timedwait 441 ++#define TARGET_FREEBSD_NR_thr_suspend 442 ++#define TARGET_FREEBSD_NR_thr_wake 443 ++#define TARGET_FREEBSD_NR_kldunloadf 444 ++#define TARGET_FREEBSD_NR_audit 445 ++#define TARGET_FREEBSD_NR_auditon 446 ++#define TARGET_FREEBSD_NR_getauid 447 ++#define TARGET_FREEBSD_NR_setauid 448 ++#define TARGET_FREEBSD_NR_getaudit 449 ++#define TARGET_FREEBSD_NR_setaudit 450 ++#define TARGET_FREEBSD_NR_getaudit_addr 451 ++#define TARGET_FREEBSD_NR_setaudit_addr 452 ++#define TARGET_FREEBSD_NR_auditctl 453 ++#define TARGET_FREEBSD_NR__umtx_op 454 ++#define TARGET_FREEBSD_NR_thr_new 455 ++#define TARGET_FREEBSD_NR_sigqueue 456 ++#define TARGET_FREEBSD_NR_kmq_open 457 ++#define TARGET_FREEBSD_NR_kmq_setattr 458 ++#define TARGET_FREEBSD_NR_kmq_timedreceive 459 ++#define TARGET_FREEBSD_NR_kmq_timedsend 460 ++#define TARGET_FREEBSD_NR_kmq_notify 461 ++#define TARGET_FREEBSD_NR_kmq_unlink 462 ++#define TARGET_FREEBSD_NR_abort2 463 ++#define TARGET_FREEBSD_NR_thr_set_name 464 ++#define TARGET_FREEBSD_NR_aio_fsync 465 ++#define TARGET_FREEBSD_NR_rtprio_thread 466 ++#define TARGET_FREEBSD_NR_sctp_peeloff 471 ++#define TARGET_FREEBSD_NR_sctp_generic_sendmsg 472 ++#define TARGET_FREEBSD_NR_sctp_generic_sendmsg_iov 473 ++#define TARGET_FREEBSD_NR_sctp_generic_recvmsg 474 ++#define TARGET_FREEBSD_NR_pread 475 ++#define TARGET_FREEBSD_NR_pwrite 476 ++#define TARGET_FREEBSD_NR_mmap 477 ++#define TARGET_FREEBSD_NR_lseek 478 ++#define TARGET_FREEBSD_NR_truncate 479 ++#define TARGET_FREEBSD_NR_ftruncate 480 ++#define TARGET_FREEBSD_NR_thr_kill2 481 ++#define TARGET_FREEBSD_NR_shm_open 482 ++#define TARGET_FREEBSD_NR_shm_unlink 483 ++#define TARGET_FREEBSD_NR_cpuset 484 ++#define TARGET_FREEBSD_NR_cpuset_setid 485 ++#define TARGET_FREEBSD_NR_cpuset_getid 486 ++#define TARGET_FREEBSD_NR_cpuset_getaffinity 487 ++#define TARGET_FREEBSD_NR_cpuset_setaffinity 488 ++#define TARGET_FREEBSD_NR_faccessat 489 ++#define TARGET_FREEBSD_NR_fchmodat 490 ++#define TARGET_FREEBSD_NR_fchownat 491 ++#define TARGET_FREEBSD_NR_fexecve 492 ++#define TARGET_FREEBSD_NR_fstatat 493 ++#define TARGET_FREEBSD_NR_futimesat 494 ++#define TARGET_FREEBSD_NR_linkat 495 ++#define TARGET_FREEBSD_NR_mkdirat 496 ++#define TARGET_FREEBSD_NR_mkfifoat 497 ++#define TARGET_FREEBSD_NR_mknodat 498 ++#define TARGET_FREEBSD_NR_openat 499 ++#define TARGET_FREEBSD_NR_readlinkat 500 ++#define TARGET_FREEBSD_NR_renameat 501 ++#define TARGET_FREEBSD_NR_symlinkat 502 ++#define TARGET_FREEBSD_NR_unlinkat 503 ++#define TARGET_FREEBSD_NR_posix_openpt 504 ++#define TARGET_FREEBSD_NR_gssd_syscall 505 ++#define TARGET_FREEBSD_NR_jail_get 506 ++#define TARGET_FREEBSD_NR_jail_set 507 ++#define TARGET_FREEBSD_NR_jail_remove 508 ++#define TARGET_FREEBSD_NR_closefrom 509 ++#define TARGET_FREEBSD_NR___semctl 510 ++#define TARGET_FREEBSD_NR_msgctl 511 ++#define TARGET_FREEBSD_NR_shmctl 512 ++#define TARGET_FREEBSD_NR_lpathconf 513 ++ /* 514 is obsolete cap_new */ ++#define TARGET_FREEBSD_NR___cap_rights_get 515 ++#define TARGET_FREEBSD_NR_cap_enter 516 ++#define TARGET_FREEBSD_NR_cap_getmode 517 ++#define TARGET_FREEBSD_NR_pdfork 518 ++#define TARGET_FREEBSD_NR_pdkill 519 ++#define TARGET_FREEBSD_NR_pdgetpid 520 ++#define TARGET_FREEBSD_NR_pselect 522 ++#define TARGET_FREEBSD_NR_getloginclass 523 ++#define TARGET_FREEBSD_NR_setloginclass 524 ++#define TARGET_FREEBSD_NR_rctl_get_racct 525 ++#define TARGET_FREEBSD_NR_rctl_get_rules 526 ++#define TARGET_FREEBSD_NR_rctl_get_limits 527 ++#define TARGET_FREEBSD_NR_rctl_add_rule 528 ++#define TARGET_FREEBSD_NR_rctl_remove_rule 529 ++#define TARGET_FREEBSD_NR_posix_fallocate 530 ++#define TARGET_FREEBSD_NR_posix_fadvise 531 ++#define TARGET_FREEBSD_NR_wait6 532 ++#define TARGET_FREEBSD_NR_cap_rights_limit 533 ++#define TARGET_FREEBSD_NR_cap_ioctls_limit 534 ++#define TARGET_FREEBSD_NR_cap_ioctls_get 535 ++#define TARGET_FREEBSD_NR_cap_fcntls_limit 536 ++#define TARGET_FREEBSD_NR_cap_fcntls_get 537 ++#define TARGET_FREEBSD_NR_bindat 538 ++#define TARGET_FREEBSD_NR_connectat 539 ++#define TARGET_FREEBSD_NR_chflagsat 540 ++#define TARGET_FREEBSD_NR_accept4 541 ++#define TARGET_FREEBSD_NR_pipe2 542 + #define TARGET_FREEBSD_NR_aio_mlock 543 + #define TARGET_FREEBSD_NR_procctl 544 +-#define TARGET_FREEBSD_NR_MAXSYSCALL 545 ++#define TARGET_FREEBSD_NR_MAXSYSCALL 545 +diff --git a/bsd-user/syscall.c b/bsd-user/syscall.c +index 2ad63e5..4a743e8 100644 +--- a/bsd-user/syscall.c ++++ b/bsd-user/syscall.c +@@ -356,6 +356,7 @@ abi_long do_freebsd_syscall(void *cpu_env, int num, abi_long arg1, + ret = do_freebsd_cap_enter(); + break; + ++#if defined(__FreeBSD_version) && __FreeBSD_version < 1000000 + case TARGET_FREEBSD_NR_cap_new: /* cap_new(2) */ + ret = do_freebsd_cap_new(arg1, arg2); + break; +@@ -363,6 +364,7 @@ abi_long do_freebsd_syscall(void *cpu_env, int num, abi_long arg1, + case TARGET_FREEBSD_NR_cap_getrights: /* cap_getrights(2) */ + ret = do_freebsd_cap_getrights(arg1, arg2); + break; ++#endif /* __FreeBSD_version < 1000000 */ + + case TARGET_FREEBSD_NR_cap_getmode: /* cap_getmode(2) */ + ret = do_freebsd_cap_getmode(arg1); +@@ -1052,9 +1054,11 @@ abi_long do_freebsd_syscall(void *cpu_env, int num, abi_long arg1, + ret = do_bsd_kill(arg1, arg2); + break; + ++#if defined(__FreeBSD_version) && __FreeBSD_version < 1000000 + case TARGET_FREEBSD_NR_killpg: /* killpg(2) */ + ret = do_bsd_killpg(arg1, arg2); + break; ++#endif + + case TARGET_FREEBSD_NR_pdkill: /* pdkill(2) */ + ret = do_freebsd_pdkill(arg1, arg2); +@@ -1218,6 +1222,7 @@ abi_long do_freebsd_syscall(void *cpu_env, int num, abi_long arg1, + ret = do_freebsd_swapcontext(cpu_env, arg1, arg2); + break; + ++#if defined(__FreeBSD_version) && __FreeBSD_version < 1000000 + case TARGET_FREEBSD_NR__umtx_lock: /* undocumented */ + ret = do_freebsd__umtx_lock(arg1); + break; +@@ -1225,6 +1230,7 @@ abi_long do_freebsd_syscall(void *cpu_env, int num, abi_long arg1, + case TARGET_FREEBSD_NR__umtx_unlock: /* undocumented */ + ret = do_freebsd__umtx_unlock(arg1); + break; ++#endif + + case TARGET_FREEBSD_NR__umtx_op: /* undocumented */ + ret = do_freebsd__umtx_op(arg1, arg2, arg3, arg4, arg5); +@@ -1628,6 +1634,7 @@ abi_long do_freebsd_syscall(void *cpu_env, int num, abi_long arg1, + break; + + default: ++ gemu_log("qemu: unsupported syscall: %d (calling anyway)\n", num); + ret = get_errno(syscall(num, arg1, arg2, arg3, arg4, arg5, arg6, arg7, + arg8)); + break; Property changes on: emulators/qemu-devel/files/extra-patch-22b23eb877a8a5ec251b4ae0e71e3c7ce5397721 ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: emulators/qemu-devel/files/extra-patch-30c8ccb41e2c9e1ddda7e3f8a8ac1eb5dab8b408 =================================================================== --- emulators/qemu-devel/files/extra-patch-30c8ccb41e2c9e1ddda7e3f8a8ac1eb5dab8b408 (revision 0) +++ emulators/qemu-devel/files/extra-patch-30c8ccb41e2c9e1ddda7e3f8a8ac1eb5dab8b408 (working copy) @@ -0,0 +1,51 @@ +From 30c8ccb41e2c9e1ddda7e3f8a8ac1eb5dab8b408 Mon Sep 17 00:00:00 2001 +From: Stacey Son +Date: Wed, 5 Nov 2014 22:52:17 +0000 +Subject: [PATCH] Add stub for the new procctl(2) system call. + +--- + bsd-user/freebsd/os-proc.h | 10 ++++++++++ + bsd-user/syscall.c | 4 +++- + 2 files changed, 13 insertions(+), 1 deletion(-) + +diff --git a/bsd-user/freebsd/os-proc.h b/bsd-user/freebsd/os-proc.h +index 612a5fd..193e1fc 100644 +--- a/bsd-user/freebsd/os-proc.h ++++ b/bsd-user/freebsd/os-proc.h +@@ -21,6 +21,7 @@ + #define __FREEBSD_PROC_H_ + + #if defined(__FreeBSD_version) && __FreeBSD_version >= 1000000 ++#include + #include + #endif + #include +@@ -520,4 +521,13 @@ static inline abi_long do_freebsd_auditctl(abi_ulong arg1) + return -TARGET_ENOSYS; + } + ++/* procctl(2) */ ++static inline abi_long do_freebsd_procctl(__unused int idtype, __unused int id, ++ __unused int cmd, __unused abi_ulong arg) ++{ ++ ++ qemu_log("qemu: Unsupported syscall procctl()\n"); ++ return -TARGET_ENOSYS; ++} ++ + #endif /* ! __FREEBSD_PROC_H_ */ +diff --git a/bsd-user/syscall.c b/bsd-user/syscall.c +index 30dc2f3..2ad63e5 100644 +--- a/bsd-user/syscall.c ++++ b/bsd-user/syscall.c +@@ -432,7 +432,9 @@ abi_long do_freebsd_syscall(void *cpu_env, int num, abi_long arg1, + ret = do_bsd_setpriority(arg1, arg2, arg3); + break; + +- ++ case TARGET_FREEBSD_NR_procctl: /* procctl(2) */ ++ ret = do_freebsd_procctl(arg1, arg2, arg3, arg4); ++ break; + + /* + * File system calls. Property changes on: emulators/qemu-devel/files/extra-patch-30c8ccb41e2c9e1ddda7e3f8a8ac1eb5dab8b408 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: emulators/qemu-devel/files/extra-patch-5f81caf45c0d0eb2b4b852f8580a1938fb3d12c6 =================================================================== --- emulators/qemu-devel/files/extra-patch-5f81caf45c0d0eb2b4b852f8580a1938fb3d12c6 (revision 0) +++ emulators/qemu-devel/files/extra-patch-5f81caf45c0d0eb2b4b852f8580a1938fb3d12c6 (working copy) @@ -0,0 +1,201 @@ +From 5f81caf45c0d0eb2b4b852f8580a1938fb3d12c6 Mon Sep 17 00:00:00 2001 +From: Stacey Son +Date: Wed, 5 Nov 2014 20:28:13 +0000 +Subject: [PATCH] Add support for pipe2(2) and chflagsat(2) system calls. + +This change adds support for newly added pipe2(2) and chflagsat(2) +system calls. It also fixes what obviously looks like a bug with the +pipe(2) call emulation. The pipe descriptors were not written back. +--- + bsd-user/bsd-file.h | 8 +++- + bsd-user/freebsd/os-file.h | 86 +++++++++++++++++++++++++++++++++++++++++++ + bsd-user/freebsd/strace.list | 2 + + bsd-user/freebsd/syscall_nr.h | 3 +- + bsd-user/syscall.c | 9 +++++ + 5 files changed, 105 insertions(+), 3 deletions(-) + create mode 100644 bsd-user/freebsd/os-file.h + +diff --git a/bsd-user/bsd-file.h b/bsd-user/bsd-file.h +index 5d8a347..f697eac 100644 +--- a/bsd-user/bsd-file.h ++++ b/bsd-user/bsd-file.h +@@ -1013,7 +1013,7 @@ static abi_long do_bsd_lseek(void *cpu_env, abi_long arg1, abi_long arg2, + } + + /* pipe(2) */ +-static abi_long do_bsd_pipe(void *cpu_env, abi_long arg1) ++static abi_long do_bsd_pipe(void *cpu_env, abi_ulong pipedes) + { + abi_long ret; + int host_pipe[2]; +@@ -1022,8 +1022,12 @@ static abi_long do_bsd_pipe(void *cpu_env, abi_long arg1) + if (host_ret != -1) { + set_second_rval(cpu_env, host_pipe[1]); + ret = host_pipe[0]; ++ if (put_user_s32(host_pipe[0], pipedes) || ++ put_user_s32(host_pipe[1], pipedes + sizeof(host_pipe[0]))) { ++ return -TARGET_EFAULT; ++ } + } else { +- ret = get_errno(host_ret); ++ ret = get_errno(host_ret); + } + return ret; + } +diff --git a/bsd-user/freebsd/os-file.h b/bsd-user/freebsd/os-file.h +new file mode 100644 +index 0000000..2c6bc24 +--- /dev/null ++++ b/bsd-user/freebsd/os-file.h +@@ -0,0 +1,86 @@ ++/* ++ * FreeBSD file related system call shims and definitions ++ * ++ * Copyright (c) 2014 Stacey D. Son ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, see . ++ */ ++ ++#ifndef __FREEBSD_OS_FILE_H_ ++#define __FREEBSD_OS_FILE_H_ ++ ++#include ++#include ++ ++#include "qemu-os.h" ++ ++ ++#if defined(__FreeBSD_version) && __FreeBSD_version >= 1000000 ++/* pipe2(2) */ ++static abi_long do_bsd_pipe2(void *cpu_env, abi_ulong pipedes, int flags) ++{ ++ abi_long ret; ++ int host_pipe[2]; ++ int host_ret = pipe2(host_pipe, flags); ++ ++ if (is_error(host_ret)) { ++ return get_errno(host_ret); ++ } ++ if (host_ret != -1) { ++ set_second_rval(cpu_env, host_pipe[1]); ++ ret = host_pipe[0]; ++ if (put_user_s32(host_pipe[0], pipedes) || ++ put_user_s32(host_pipe[1], pipedes + sizeof(host_pipe[0]))) { ++ return -TARGET_EFAULT; ++ } ++ } else { ++ ret = get_errno(host_ret); ++ } ++ return ret; ++} ++ ++/* chflagsat(2) */ ++static inline abi_long do_bsd_chflagsat(int fd, abi_ulong path, ++ abi_ulong flags, int atflags) ++{ ++ abi_long ret; ++ void *p; ++ ++ LOCK_PATH(p, path); ++ ret = get_errno(chflagsat(fd, p, flags, atflags)); /* XXX path(p)? */ ++ UNLOCK_PATH(p, path); ++ ++ return ret; ++} ++ ++#else /* ! __FreeBSD_version > 1000000 */ ++ ++static abi_long do_bsd_pipe2(__unused void *cpu_env, __unused abi_long arg1, ++ __unused int flags) ++{ ++ ++ qemu_log("qemu: Unsupported syscall pipe2()\n"); ++ return -TARGET_ENOSYS; ++} ++ ++static inline abi_long do_bsd_chflagsat(__unused int fd, ++ __unused abi_ulong path, __unused abi_ulong flags, int atflags) ++{ ++ ++ qemu_log("qemu: Unsupported syscall chflagsat()\n"); ++ return -TARGET_ENOSYS; ++} ++ ++#endif /* ! __FreeBSD_version >= 1000000 */ ++#endif /* __FREEBSD_OS_FILE_H_ */ +diff --git a/bsd-user/freebsd/strace.list b/bsd-user/freebsd/strace.list +index 991cbe2..cba4afe 100644 +--- a/bsd-user/freebsd/strace.list ++++ b/bsd-user/freebsd/strace.list +@@ -52,6 +52,7 @@ + { TARGET_FREEBSD_NR_cap_rights_limit, "cap_rights_limit", NULL, NULL, NULL }, + { TARGET_FREEBSD_NR_chdir, "chdir", "%s(\"%s\")", NULL, NULL }, + { TARGET_FREEBSD_NR_chflags, "chflags", NULL, NULL, NULL }, ++{ TARGET_FREEBSD_NR_chflagsat, "chflagsat", NULL, NULL, NULL }, + { TARGET_FREEBSD_NR_chmod, "chmod", "%s(\"%s\",%#o)", NULL, NULL }, + { TARGET_FREEBSD_NR_chown, "chown", NULL, NULL, NULL }, + { TARGET_FREEBSD_NR_chroot, "chroot", NULL, NULL, NULL }, +@@ -160,6 +161,7 @@ + { TARGET_FREEBSD_NR_openat, "openat", "%s(%d, \"%s\",%#x,%#o)", NULL, NULL }, + { TARGET_FREEBSD_NR_pathconf, "pathconf", "%s(\"%s\", %d)", NULL, NULL }, + { TARGET_FREEBSD_NR_pipe, "pipe", NULL, NULL, NULL }, ++{ TARGET_FREEBSD_NR_pipe2, "pipe2", NULL, NULL, NULL }, + { TARGET_FREEBSD_NR_poll, "poll", NULL, NULL, NULL }, + { TARGET_FREEBSD_NR_pread, "pread", NULL, NULL, NULL }, + { TARGET_FREEBSD_NR_preadv, "preadv", NULL, NULL, NULL }, +diff --git a/bsd-user/freebsd/syscall_nr.h b/bsd-user/freebsd/syscall_nr.h +index 260fd82..b44545b 100644 +--- a/bsd-user/freebsd/syscall_nr.h ++++ b/bsd-user/freebsd/syscall_nr.h +@@ -457,4 +457,5 @@ + #define TARGET_FREEBSD_NR_connectat 539 + #define TARGET_FREEBSD_NR_chflagsat 540 + #define TARGET_FREEBSD_NR_accept4 541 +-#define TARGET_FREEBSD_NR_MAXSYSCALL 542 ++#define TARGET_FREEBSD_NR_pipe2 542 ++#define TARGET_FREEBSD_NR_MAXSYSCALL 543 +diff --git a/bsd-user/syscall.c b/bsd-user/syscall.c +index e043396..0a2ab88 100644 +--- a/bsd-user/syscall.c ++++ b/bsd-user/syscall.c +@@ -44,6 +44,7 @@ + + /* *BSD dependent syscall shims */ + #include "os-extattr.h" ++#include "os-file.h" + #include "os-time.h" + #include "os-misc.h" + #include "os-proc.h" +@@ -646,6 +647,10 @@ abi_long do_freebsd_syscall(void *cpu_env, int num, abi_long arg1, + ret = do_bsd_chflags(arg1, arg2); + break; + ++ case TARGET_FREEBSD_NR_chflagsat: /* chflagsat(2) */ ++ ret = do_bsd_chflagsat(arg1, arg2, arg3, arg4); ++ break; ++ + case TARGET_FREEBSD_NR_lchflags: /* lchflags(2) */ + ret = do_bsd_lchflags(arg1, arg2); + break; +@@ -702,6 +707,10 @@ abi_long do_freebsd_syscall(void *cpu_env, int num, abi_long arg1, + ret = do_bsd_pipe(cpu_env, arg1); + break; + ++ case TARGET_FREEBSD_NR_pipe2: /* pipe2(2) */ ++ ret = do_bsd_pipe2(cpu_env, arg1, arg2); ++ break; ++ + case TARGET_FREEBSD_NR_swapon: /* swapon(2) */ + ret = do_bsd_swapon(arg1); + break; Property changes on: emulators/qemu-devel/files/extra-patch-5f81caf45c0d0eb2b4b852f8580a1938fb3d12c6 ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: emulators/qemu-devel/files/extra-patch-TARGET_FREEBSD_NR-before10 =================================================================== --- emulators/qemu-devel/files/extra-patch-TARGET_FREEBSD_NR-before10 (revision 0) +++ emulators/qemu-devel/files/extra-patch-TARGET_FREEBSD_NR-before10 (working copy) @@ -0,0 +1,13 @@ +--- a/bsd-user/freebsd/syscall_nr.h ++++ b/bsd-user/freebsd/syscall_nr.h +@@ -467,3 +467,10 @@ + #define TARGET_FREEBSD_NR_aio_mlock 543 + #define TARGET_FREEBSD_NR_procctl 544 + #define TARGET_FREEBSD_NR_MAXSYSCALL 545 ++ ++ ++#define TARGET_FREEBSD_NR_killpg 146 /* COMPAT */ ++#define TARGET_FREEBSD_NR__umtx_lock 434 /* COMPAT */ ++#define TARGET_FREEBSD_NR__umtx_unlock 435 /* COMPAT */ ++#define TARGET_FREEBSD_NR_cap_new 514 /* COMPAT */ ++#define TARGET_FREEBSD_NR_cap_getrights 515 /* COMPAT */ Property changes on: emulators/qemu-devel/files/extra-patch-TARGET_FREEBSD_NR-before10 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: emulators/qemu-devel/files/extra-patch-a6402a4b7077af85733a1c98d63ab09f02d980ec =================================================================== --- emulators/qemu-devel/files/extra-patch-a6402a4b7077af85733a1c98d63ab09f02d980ec (revision 0) +++ emulators/qemu-devel/files/extra-patch-a6402a4b7077af85733a1c98d63ab09f02d980ec (working copy) @@ -0,0 +1,173 @@ +From a6402a4b7077af85733a1c98d63ab09f02d980ec Mon Sep 17 00:00:00 2001 +From: Stacey Son +Date: Wed, 5 Nov 2014 22:35:23 +0000 +Subject: [PATCH] Add stubs for the new aio_*() system calls. + +This change adds stubs for the asynchronous I/O system calls including: +aio_cancel(2), aio_error(2), aio_return(2), aio_read(2), aio_write(2), +aio_syspend(2), aio_waitcomplete(2), aio_fsync(2), and aio_mlock(2). +--- + bsd-user/freebsd/os-file.h | 78 +++++++++++++++++++++++++++++++++++++++++++ + bsd-user/freebsd/syscall_nr.h | 4 ++- + bsd-user/syscall.c | 43 ++++++++++++++++++++++++ + 3 files changed, 124 insertions(+), 1 deletion(-) + +diff --git a/bsd-user/freebsd/os-file.h b/bsd-user/freebsd/os-file.h +index 2c6bc24..0b3e8c5 100644 +--- a/bsd-user/freebsd/os-file.h ++++ b/bsd-user/freebsd/os-file.h +@@ -21,10 +21,88 @@ + #define __FREEBSD_OS_FILE_H_ + + #include ++#include + #include + + #include "qemu-os.h" + ++/* ++ * Asynchronous I/O. ++ */ ++ ++/* aio_read(2) */ ++static abi_long do_freebsd_aio_read(__unused abi_ulong iocb) ++{ ++ qemu_log("qemu: Unsupported syscall aio_read()\n"); ++ return -TARGET_ENOSYS; ++} ++ ++/* aio_write(2) */ ++static abi_long do_freebsd_aio_write(__unused abi_ulong iocb) ++{ ++ qemu_log("qemu: Unsupported syscall aio_write()\n"); ++ return -TARGET_ENOSYS; ++} ++ ++/* aio_suspend(2) */ ++static abi_long do_freebsd_aio_suspend(__unused abi_ulong iocbs, ++ __unused int niocb, __unused abi_ulong timeout) ++{ ++ qemu_log("qemu: Unsupported syscall aio_suspend()\n"); ++ return -TARGET_ENOSYS; ++} ++ ++/* aio_cancel(2) */ ++static abi_long do_freebsd_aio_cancel(__unused int fildes, ++ __unused abi_ulong iocb) ++{ ++ qemu_log("qemu: Unsupported syscall aio_cancel()\n"); ++ return -TARGET_ENOSYS; ++} ++ ++/* aio_error(2) */ ++static abi_long do_freebsd_aio_error(__unused abi_ulong iocb) ++{ ++ qemu_log("qemu: Unsupported syscall aio_error()\n"); ++ return -TARGET_ENOSYS; ++} ++ ++/* oaio_read(2) */ ++static abi_long do_freebsd_oaio_read(__unused abi_ulong iocb) ++{ ++ qemu_log("qemu: Unsupported syscall oaio_read()\n"); ++ return -TARGET_ENOSYS; ++} ++ ++/* oaio_write(2) */ ++static abi_long do_freebsd_oaio_write(__unused abi_ulong iocb) ++{ ++ qemu_log("qemu: Unsupported syscall oaio_write()\n"); ++ return -TARGET_ENOSYS; ++} ++ ++/* aio_waitcomplete(2) */ ++static abi_long do_freebsd_aio_waitcomplete(__unused abi_ulong iocbp, ++ __unused abi_ulong timeout) ++{ ++ qemu_log("qemu: Unsupported syscall aio_waitcomplete()\n"); ++ return -TARGET_ENOSYS; ++} ++ ++/* aio_fsync(2) */ ++static abi_long do_freebsd_aio_fsync(__unused int op, ++ __unused abi_ulong iocb) ++{ ++ qemu_log("qemu: Unsupported syscall aio_fsync()\n"); ++ return -TARGET_ENOSYS; ++} ++ ++/* aio_mlock(2) */ ++static abi_long do_freebsd_aio_mlock(__unused abi_ulong iocb) ++{ ++ qemu_log("qemu: Unsupported syscall aio_mlock()\n"); ++ return -TARGET_ENOSYS; ++} + + #if defined(__FreeBSD_version) && __FreeBSD_version >= 1000000 + /* pipe2(2) */ +diff --git a/bsd-user/freebsd/syscall_nr.h b/bsd-user/freebsd/syscall_nr.h +index b44545b..7d6bef8 100644 +--- a/bsd-user/freebsd/syscall_nr.h ++++ b/bsd-user/freebsd/syscall_nr.h +@@ -458,4 +458,6 @@ + #define TARGET_FREEBSD_NR_chflagsat 540 + #define TARGET_FREEBSD_NR_accept4 541 + #define TARGET_FREEBSD_NR_pipe2 542 +-#define TARGET_FREEBSD_NR_MAXSYSCALL 543 ++#define TARGET_FREEBSD_NR_aio_mlock 543 ++#define TARGET_FREEBSD_NR_procctl 544 ++#define TARGET_FREEBSD_NR_MAXSYSCALL 545 +diff --git a/bsd-user/syscall.c b/bsd-user/syscall.c +index 0a2ab88..30dc2f3 100644 +--- a/bsd-user/syscall.c ++++ b/bsd-user/syscall.c +@@ -1582,6 +1582,49 @@ abi_long do_freebsd_syscall(void *cpu_env, int num, abi_long arg1, + ret = do_obreak(arg1); + break; + ++ /* ++ * Asynchronous I/O ++ */ ++ case TARGET_FREEBSD_NR_aio_read: /* aio_read(2) */ ++ ret = do_freebsd_aio_read(arg1); ++ break; ++ ++ case TARGET_FREEBSD_NR_aio_write: /* aio_write(2) */ ++ ret = do_freebsd_aio_write(arg1); ++ break; ++ ++ case TARGET_FREEBSD_NR_aio_suspend: /* aio_suspend(2) */ ++ ret = do_freebsd_aio_suspend(arg1, arg2, arg3); ++ break; ++ ++ case TARGET_FREEBSD_NR_aio_cancel: /* aio_cancel(2) */ ++ ret = do_freebsd_aio_cancel(arg1, arg2); ++ break; ++ ++ case TARGET_FREEBSD_NR_aio_error: /* aio_error(2) */ ++ ret = do_freebsd_aio_error(arg1); ++ break; ++ ++ case TARGET_FREEBSD_NR_oaio_read: /* oaio_read(2) */ ++ ret = do_freebsd_oaio_read(arg1); ++ break; ++ ++ case TARGET_FREEBSD_NR_oaio_write: /* oaio_write(2) */ ++ ret = do_freebsd_oaio_write(arg1); ++ break; ++ ++ case TARGET_FREEBSD_NR_aio_waitcomplete: /* aio_waitcomplete(2) */ ++ ret = do_freebsd_aio_waitcomplete(arg1, arg2); ++ break; ++ ++ case TARGET_FREEBSD_NR_aio_fsync: /* aio_fsync(2) */ ++ ret = do_freebsd_aio_fsync(arg1, arg2); ++ break; ++ ++ case TARGET_FREEBSD_NR_aio_mlock: /* aio_mlock(2) */ ++ ret = do_freebsd_aio_mlock(arg1); ++ break; ++ + default: + ret = get_errno(syscall(num, arg1, arg2, arg3, arg4, arg5, arg6, arg7, + arg8)); Property changes on: emulators/qemu-devel/files/extra-patch-a6402a4b7077af85733a1c98d63ab09f02d980ec ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: emulators/qemu-devel/files/extra-patch-ac9f83019a2059d4bfe5cedfae35ba4151d5ac88 =================================================================== --- emulators/qemu-devel/files/extra-patch-ac9f83019a2059d4bfe5cedfae35ba4151d5ac88 (revision 0) +++ emulators/qemu-devel/files/extra-patch-ac9f83019a2059d4bfe5cedfae35ba4151d5ac88 (working copy) @@ -0,0 +1,226 @@ +From ac9f83019a2059d4bfe5cedfae35ba4151d5ac88 Mon Sep 17 00:00:00 2001 +From: Stacey Son +Date: Tue, 4 Nov 2014 21:34:25 +0000 +Subject: [PATCH] Add support for the wait6(2) system call. + +--- + bsd-user/bsd-proc.c | 37 ++++++++++++++++++++++------- + bsd-user/freebsd/os-proc.h | 55 ++++++++++++++++++++++++++++++++++++++++++- + bsd-user/freebsd/syscall_nr.h | 3 ++- + bsd-user/qemu-bsd.h | 2 ++ + bsd-user/syscall.c | 6 ++++- + bsd-user/syscall_defs.h | 5 ++++ + 6 files changed, 97 insertions(+), 11 deletions(-) + +diff --git a/bsd-user/bsd-proc.c b/bsd-user/bsd-proc.c +index a4bcdc8..7f0b21c 100644 +--- a/bsd-user/bsd-proc.c ++++ b/bsd-user/bsd-proc.c +@@ -1,7 +1,7 @@ + /* + * BSD process related system call helpers + * +- * Copyright (c) 2013 Stacey D. Son ++ * Copyright (c) 2013-14 Stacey D. Son + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +@@ -108,14 +108,9 @@ abi_ulong host_to_target_rlim(rlim_t rlim) + return result; + } + +-abi_long host_to_target_rusage(abi_ulong target_addr, +- const struct rusage *rusage) ++static void h2t_rusage(const struct rusage *rusage, ++ struct target_freebsd_rusage *target_rusage) + { +- struct target_freebsd_rusage *target_rusage; +- +- if (!lock_user_struct(VERIFY_WRITE, target_rusage, target_addr, 0)) { +- return -TARGET_EFAULT; +- } + __put_user(rusage->ru_utime.tv_sec, &target_rusage->ru_utime.tv_sec); + __put_user(rusage->ru_utime.tv_usec, &target_rusage->ru_utime.tv_usec); + +@@ -136,11 +131,37 @@ abi_long host_to_target_rusage(abi_ulong target_addr, + __put_user(rusage->ru_nsignals, &target_rusage->ru_nsignals); + __put_user(rusage->ru_nvcsw, &target_rusage->ru_nvcsw); + __put_user(rusage->ru_nivcsw, &target_rusage->ru_nivcsw); ++} ++ ++abi_long host_to_target_rusage(abi_ulong target_addr, ++ const struct rusage *rusage) ++{ ++ struct target_freebsd_rusage *target_rusage; ++ ++ if (!lock_user_struct(VERIFY_WRITE, target_rusage, target_addr, 0)) { ++ return -TARGET_EFAULT; ++ } ++ h2t_rusage(rusage, target_rusage); + unlock_user_struct(target_rusage, target_addr, 1); + + return 0; + } + ++abi_long host_to_target_wrusage(abi_ulong target_addr, ++ const struct __wrusage *wrusage) ++{ ++ struct target_freebsd__wrusage *target_wrusage; ++ ++ if (!lock_user_struct(VERIFY_WRITE, target_wrusage, target_addr, 0)) { ++ return -TARGET_EFAULT; ++ } ++ h2t_rusage(&wrusage->wru_self, &target_wrusage->wru_self); ++ h2t_rusage(&wrusage->wru_children, &target_wrusage->wru_children); ++ unlock_user_struct(target_wrusage, target_addr, 1); ++ ++ return 0; ++} ++ + /* + * wait status conversion. + * +diff --git a/bsd-user/freebsd/os-proc.h b/bsd-user/freebsd/os-proc.h +index b31f7c4..8e28f04 100644 +--- a/bsd-user/freebsd/os-proc.h ++++ b/bsd-user/freebsd/os-proc.h +@@ -1,7 +1,7 @@ + /* + * process related system call shims and definitions + * +- * Copyright (c) 2013 Stacey D. Son ++ * Copyright (c) 2013-14 Stacey D. Son + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +@@ -20,6 +20,9 @@ + #ifndef __FREEBSD_PROC_H_ + #define __FREEBSD_PROC_H_ + ++#if defined(__FreeBSD_version) && __FreeBSD_version > 1100000 ++#include ++#endif + #include + #if defined(__FreeBSD_version) && __FreeBSD_version > 900000 + #include +@@ -72,6 +75,56 @@ static inline abi_long do_freebsd_wait4(abi_long arg1, abi_ulong target_status, + return ret; + } + ++#if defined(__FreeBSD_version) && __FreeBSD_version > 1100000 ++/* wait6(2) */ ++static inline abi_long do_freebsd_wait6(abi_long idtype, abi_long id, ++ abi_ulong target_status, abi_long options, abi_ulong target_wrusage, ++ abi_ulong target_infop) ++{ ++ abi_long ret; ++ int status; ++ struct __wrusage wrusage, *wrusage_ptr = NULL; ++ siginfo_t info; ++ void *p; ++ ++ if (target_wrusage) { ++ wrusage_ptr = &wrusage; ++ } ++ ret = get_errno(wait6(idtype, id, &status, options, wrusage_ptr, &info)); ++ if (!is_error(ret)) { ++ status = host_to_target_waitstatus(status); ++ if (put_user_s32(status, target_status) != 0) { ++ return -TARGET_EFAULT; ++ } ++ if (target_wrusage != 0) { ++ host_to_target_wrusage(target_wrusage, &wrusage); ++ } ++ if (target_infop != 0) { ++ p = lock_user(VERIFY_WRITE, target_infop, sizeof(target_siginfo_t), ++ 0); ++ if (p == NULL) { ++ return -TARGET_EFAULT; ++ } ++ host_to_target_siginfo(p, &info); ++ unlock_user(p, target_infop, sizeof(target_siginfo_t)); ++ } ++ } ++ return ret; ++} ++ ++#else /* ! __FreeBSD_version > 1100000 */ ++ ++static inline abi_long do_freebsd_wait6( __unused abi_long idtype, ++ __unused abi_long id, __unused abi_ulong target_status, ++ __unused abi_long options, __unused abi_ulong target_wrusage, ++ __unused abi_ulong target_infop) ++{ ++ ++ qemu_log("qemu: Unsupported syscall wait6()\n"); ++ return -TARGET_ENOSYS; ++} ++#endif /* __FreeBSD_version > 1100000 */ ++ + #if defined(__FreeBSD_version) && __FreeBSD_version > 900000 + /* setloginclass(2) */ + static inline abi_long do_freebsd_setloginclass(abi_ulong arg1) +diff --git a/bsd-user/freebsd/syscall_nr.h b/bsd-user/freebsd/syscall_nr.h +index d849024..779e192 100644 +--- a/bsd-user/freebsd/syscall_nr.h ++++ b/bsd-user/freebsd/syscall_nr.h +@@ -447,4 +447,5 @@ + #define TARGET_FREEBSD_NR_rctl_remove_rule 529 + #define TARGET_FREEBSD_NR_posix_fallocate 530 + #define TARGET_FREEBSD_NR_posix_fadvise 531 +-#define TARGET_FREEBSD_NR_MAXSYSCALL 532 ++#define TARGET_FREEBSD_NR_wait6 532 ++#define TARGET_FREEBSD_NR_MAXSYSCALL 533 +diff --git a/bsd-user/qemu-bsd.h b/bsd-user/qemu-bsd.h +index 771245d..e58fdd7 100644 +--- a/bsd-user/qemu-bsd.h ++++ b/bsd-user/qemu-bsd.h +@@ -48,6 +48,8 @@ rlim_t target_to_host_rlim(abi_ulong target_rlim); + abi_ulong host_to_target_rlim(rlim_t rlim); + abi_long host_to_target_rusage(abi_ulong target_addr, + const struct rusage *rusage); ++abi_long host_to_target_wrusage(abi_ulong target_addr, ++ const struct __wrusage *wrusage); + int host_to_target_waitstatus(int status); + + /* bsd-socket.c */ +diff --git a/bsd-user/syscall.c b/bsd-user/syscall.c +index ac27584..4f5a008 100644 +--- a/bsd-user/syscall.c ++++ b/bsd-user/syscall.c +@@ -2,7 +2,7 @@ + * BSD syscalls + * + * Copyright (c) 2003 - 2008 Fabrice Bellard +- * Copyright (c) 2013 Stacey D. Son ++ * Copyright (c) 2013-14 Stacey D. Son + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +@@ -189,6 +189,10 @@ abi_long do_freebsd_syscall(void *cpu_env, int num, abi_long arg1, + ret = do_freebsd_wait4(arg1, arg2, arg3, arg4); + break; + ++ case TARGET_FREEBSD_NR_wait6: /* wait6(2) */ ++ ret = do_freebsd_wait6(arg1, arg2, arg3, arg4, arg5, arg6); ++ break; ++ + case TARGET_FREEBSD_NR_exit: /* exit(2) */ + ret = do_bsd_exit(cpu_env, arg1); + break; +diff --git a/bsd-user/syscall_defs.h b/bsd-user/syscall_defs.h +index d02476c..1af31da 100644 +--- a/bsd-user/syscall_defs.h ++++ b/bsd-user/syscall_defs.h +@@ -281,6 +281,11 @@ struct target_freebsd_rusage { + abi_long ru_nivcsw; /* involuntary context switches */ + }; + ++struct target_freebsd__wrusage { ++ struct target_freebsd_rusage wru_self; ++ struct target_freebsd_rusage wru_children; ++}; ++ + /* + * sys/socket.h + */ Property changes on: emulators/qemu-devel/files/extra-patch-ac9f83019a2059d4bfe5cedfae35ba4151d5ac88 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: emulators/qemu-devel/files/extra-patch-ac9f83019a2059d4bfe5cedfae35ba4151d5ac88-before10 =================================================================== --- emulators/qemu-devel/files/extra-patch-ac9f83019a2059d4bfe5cedfae35ba4151d5ac88-before10 (revision 0) +++ emulators/qemu-devel/files/extra-patch-ac9f83019a2059d4bfe5cedfae35ba4151d5ac88-before10 (working copy) @@ -0,0 +1,26 @@ +--- a/bsd-user/bsd-proc.c ++++ b/bsd-user/bsd-proc.c +@@ -20,6 +20,7 @@ + #include + #include + #include ++#include + + #include "qemu.h" + #include "qemu-bsd.h" +@@ -147,6 +148,7 @@ abi_long host_to_target_rusage(abi_ulong + return 0; + } + ++#if defined(__FreeBSD_version) && __FreeBSD_version >= 1000000 + abi_long host_to_target_wrusage(abi_ulong target_addr, + const struct __wrusage *wrusage) + { +@@ -161,6 +162,7 @@ abi_long host_to_target_wrusage(abi_ulon + + return 0; + } ++#endif + + /* + * wait status conversion. Property changes on: emulators/qemu-devel/files/extra-patch-ac9f83019a2059d4bfe5cedfae35ba4151d5ac88-before10 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: emulators/qemu-devel/files/extra-patch-c9c55ac786f09ce575b5f67b35241ce9452896c9 =================================================================== --- emulators/qemu-devel/files/extra-patch-c9c55ac786f09ce575b5f67b35241ce9452896c9 (revision 0) +++ emulators/qemu-devel/files/extra-patch-c9c55ac786f09ce575b5f67b35241ce9452896c9 (working copy) @@ -0,0 +1,224 @@ +From c9c55ac786f09ce575b5f67b35241ce9452896c9 Mon Sep 17 00:00:00 2001 +From: Stacey Son +Date: Tue, 4 Nov 2014 23:38:38 +0000 +Subject: [PATCH] Add support for new socket system calls. + +This change adds support for bindat(2), connectat(2), and accept4(2) +system calls. +--- + bsd-user/freebsd/os-socket.h | 106 +++++++++++++++++++++++++++++++++++++++++- + bsd-user/freebsd/strace.list | 13 ++++++ + bsd-user/freebsd/syscall_nr.h | 6 ++- + bsd-user/syscall.c | 12 +++++ + 4 files changed, 135 insertions(+), 2 deletions(-) + +diff --git a/bsd-user/freebsd/os-socket.h b/bsd-user/freebsd/os-socket.h +index 6530a07..61e3440 100644 +--- a/bsd-user/freebsd/os-socket.h ++++ b/bsd-user/freebsd/os-socket.h +@@ -1,7 +1,7 @@ + /* + * FreeBSD socket related system call shims + * +- * Copyright (c) 2013 Stacey D. Son ++ * Copyright (c) 2013-14 Stacey D. Son + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +@@ -557,4 +557,108 @@ static inline abi_long do_freebsd_sendfile(abi_long fd, abi_long s, + return -TARGET_ENOSYS; + } + ++#if defined(__FreeBSD_version) && __FreeBSD_version > 1100000 ++/* bindat(2) */ ++static inline abi_long do_bsd_bindat(int fd, int sockfd, abi_ulong target_addr, ++ socklen_t addrlen) ++{ ++ abi_long ret; ++ void *addr; ++ ++ if ((int)addrlen < 0) { ++ return -TARGET_EINVAL; ++ } ++ ++ addr = alloca(addrlen + 1); ++ ret = target_to_host_sockaddr(addr, target_addr, addrlen); ++ if (is_error(ret)) { ++ return ret; ++ } ++ ++ return get_errno(bindat(fd, sockfd, addr, addrlen)); ++} ++ ++/* connectat(2) */ ++static inline abi_long do_bsd_connectat(int fd, int sockfd, ++ abi_ulong target_addr, socklen_t addrlen) ++{ ++ abi_long ret; ++ void *addr; ++ ++ if ((int)addrlen < 0) { ++ return -TARGET_EINVAL; ++ } ++ addr = alloca(addrlen); ++ ++ ret = target_to_host_sockaddr(addr, target_addr, addrlen); ++ ++ if (is_error(ret)) { ++ return ret; ++ } ++ ++ return get_errno(connectat(fd, sockfd, addr, addrlen)); ++} ++ ++/* accept4(2) */ ++static inline abi_long do_bsd_accept4(int fd, abi_ulong target_addr, ++ abi_ulong target_addrlen_addr, int flags) ++{ ++ socklen_t addrlen; ++ void *addr; ++ abi_long ret; ++ ++ if (target_addr == 0) { ++ return get_errno(accept(fd, NULL, NULL)); ++ } ++ /* return EINVAL if addrlen pointer is invalid */ ++ if (get_user_u32(addrlen, target_addrlen_addr)) { ++ return -TARGET_EINVAL; ++ } ++ if ((int)addrlen < 0) { ++ return -TARGET_EINVAL; ++ } ++ if (!access_ok(VERIFY_WRITE, target_addr, addrlen)) { ++ return -TARGET_EINVAL; ++ } ++ addr = alloca(addrlen); ++ ++ ret = get_errno(accept4(fd, addr, &addrlen, flags)); ++ if (!is_error(ret)) { ++ host_to_target_sockaddr(target_addr, addr, addrlen); ++ if (put_user_u32(addrlen, target_addrlen_addr)) { ++ ret = -TARGET_EFAULT; ++ } ++ } ++ return ret; ++} ++ ++#else /* ! __FreeBSD_version > 1100000 */ ++ ++/* bindat(2) */ ++static inline abi_long do_bsd_bindat(__unused int sockfd, ++ __unused abi_ulong target_addr, __unused socklen_t addrlen) ++{ ++ ++ qemu_log("qemu: Unsupported syscall bindat()\n"); ++ return -TARGET_ENOSYS; ++} ++ ++/* connectat(2) */ ++static inline abi_long do_bsd_connectat(__unused int sockfd, ++ __unused abi_ulong target_addr, __unused socklen_t addrlen) ++{ ++ ++ qemu_log("qemu: Unsupported syscall connectat()\n"); ++ return -TARGET_ENOSYS; ++} ++ ++static inline abi_long do_bsd_accept4(__unused int fd, ++ __unused abi_ulong target_addr, __unused abi_ulong target_addrlen_addr, ++ __unused int flags) ++{ ++ ++ qemu_log("qemu: Unsupported syscall accept4()\n"); ++ return -TARGET_ENOSYS; ++} ++#endif /* ! __FreeBSD_version > 1100000 */ + #endif /* !__FREEBSD_SOCKET_H_ */ +diff --git a/bsd-user/freebsd/strace.list b/bsd-user/freebsd/strace.list +index f8858aa..991cbe2 100644 +--- a/bsd-user/freebsd/strace.list ++++ b/bsd-user/freebsd/strace.list +@@ -34,11 +34,22 @@ + { TARGET_FREEBSD_NR___sysctl, "__sysctl", NULL, print_sysctl, NULL }, + { TARGET_FREEBSD_NR__umtx_op, "_umtx_op", "%s(%#x, %d, %d, %#x, %#x)", NULL, NULL }, + { TARGET_FREEBSD_NR_accept, "accept", "%s(%d,%#x,%#x)", NULL, NULL }, ++{ TARGET_FREEBSD_NR_accept4, "accept4", "%s(%d,%d,%#x,%#x)", NULL, NULL }, + { TARGET_FREEBSD_NR_access, "access", "%s(\"%s\",%#o)", NULL, NULL }, + { TARGET_FREEBSD_NR_acct, "acct", NULL, NULL, NULL }, + { TARGET_FREEBSD_NR_adjtime, "adjtime", NULL, NULL, NULL }, + { TARGET_FREEBSD_NR_bind, "bind", NULL, NULL, NULL }, ++{ TARGET_FREEBSD_NR_bindat, "bindat", NULL, NULL, NULL }, + { TARGET_FREEBSD_NR_break, "break", NULL, NULL, NULL }, ++{ TARGET_FREEBSD_NR_cap_enter, "cap_enter", NULL, NULL, NULL }, ++{ TARGET_FREEBSD_NR_cap_fcntls_get, "cap_fcntls_get", NULL, NULL, NULL }, ++{ TARGET_FREEBSD_NR_cap_fcntls_limit, "cap_fcntls_limit", NULL, NULL, NULL }, ++{ TARGET_FREEBSD_NR_cap_getmode, "cap_getmode", NULL, NULL, NULL }, ++{ TARGET_FREEBSD_NR_cap_getrights, "cap_getrights", NULL, NULL, NULL }, ++{ TARGET_FREEBSD_NR_cap_ioctls_get, "cap_ioctls_get", NULL, NULL, NULL }, ++{ TARGET_FREEBSD_NR_cap_ioctls_limit, "cap_ioctls_limit", NULL, NULL, NULL }, ++{ TARGET_FREEBSD_NR_cap_new, "cap_new", NULL, NULL, NULL }, ++{ TARGET_FREEBSD_NR_cap_rights_limit, "cap_rights_limit", NULL, NULL, NULL }, + { TARGET_FREEBSD_NR_chdir, "chdir", "%s(\"%s\")", NULL, NULL }, + { TARGET_FREEBSD_NR_chflags, "chflags", NULL, NULL, NULL }, + { TARGET_FREEBSD_NR_chmod, "chmod", "%s(\"%s\",%#o)", NULL, NULL }, +@@ -49,6 +60,7 @@ + { TARGET_FREEBSD_NR_clock_settime, "clock_settime", NULL, NULL, NULL }, + { TARGET_FREEBSD_NR_close, "close", "%s(%d)", NULL, NULL }, + { TARGET_FREEBSD_NR_connect, "connect", "%s(%d,%#x,%d)", NULL, NULL }, ++{ TARGET_FREEBSD_NR_connectat, "connectat", "%s(%d,%d,%#x,%d)", NULL, NULL }, + { TARGET_FREEBSD_NR_dup, "dup", NULL, NULL, NULL }, + { TARGET_FREEBSD_NR_dup2, "dup2", NULL, NULL, NULL }, + { TARGET_FREEBSD_NR_eaccess, "eaccess", "%s(\"%s\",%#x)", NULL, NULL }, +@@ -228,6 +240,7 @@ + { TARGET_FREEBSD_NR_utimes, "utimes", NULL, NULL, NULL }, + { TARGET_FREEBSD_NR_vfork, "vfork", NULL, NULL, NULL }, + { TARGET_FREEBSD_NR_wait4, "wait4", NULL, NULL, NULL }, ++{ TARGET_FREEBSD_NR_wait6, "wait6", NULL, NULL, NULL }, + { TARGET_FREEBSD_NR_write, "write", "%s(%d,%#x,%d)", NULL, NULL }, + { TARGET_FREEBSD_NR_writev, "writev", "%s(%d,%p,%#x)", NULL, NULL }, + { TARGET_FREEBSD_NR_posix_openpt, "posix_openpt", "%s(%d)", NULL, NULL }, +diff --git a/bsd-user/freebsd/syscall_nr.h b/bsd-user/freebsd/syscall_nr.h +index 2ab3e1e..260fd82 100644 +--- a/bsd-user/freebsd/syscall_nr.h ++++ b/bsd-user/freebsd/syscall_nr.h +@@ -453,4 +453,8 @@ + #define TARGET_FREEBSD_NR_cap_ioctls_get 535 + #define TARGET_FREEBSD_NR_cap_fcntls_limit 536 + #define TARGET_FREEBSD_NR_cap_fcntls_get 537 +-#define TARGET_FREEBSD_NR_MAXSYSCALL 538 ++#define TARGET_FREEBSD_NR_bindat 538 ++#define TARGET_FREEBSD_NR_connectat 539 ++#define TARGET_FREEBSD_NR_chflagsat 540 ++#define TARGET_FREEBSD_NR_accept4 541 ++#define TARGET_FREEBSD_NR_MAXSYSCALL 542 +diff --git a/bsd-user/syscall.c b/bsd-user/syscall.c +index c615bb8..e043396 100644 +--- a/bsd-user/syscall.c ++++ b/bsd-user/syscall.c +@@ -1056,14 +1056,26 @@ abi_long do_freebsd_syscall(void *cpu_env, int num, abi_long arg1, + ret = do_bsd_accept(arg1, arg2, arg3); + break; + ++ case TARGET_FREEBSD_NR_accept4: /* accept4(2) */ ++ ret = do_bsd_accept4(arg1, arg2, arg3, arg4); ++ break; ++ + case TARGET_FREEBSD_NR_bind: /* bind(2) */ + ret = do_bsd_bind(arg1, arg2, arg3); + break; + ++ case TARGET_FREEBSD_NR_bindat: /* bindat(2) */ ++ ret = do_bsd_bindat(arg1, arg2, arg3, arg4); ++ break; ++ + case TARGET_FREEBSD_NR_connect: /* connect(2) */ + ret = do_bsd_connect(arg1, arg2, arg3); + break; + ++ case TARGET_FREEBSD_NR_connectat: /* connectat(2) */ ++ ret = do_bsd_connectat(arg1, arg2, arg3, arg4); ++ break; ++ + case TARGET_FREEBSD_NR_getpeername: /* getpeername(2) */ + ret = do_bsd_getpeername(arg1, arg2, arg3); + break; Property changes on: emulators/qemu-devel/files/extra-patch-c9c55ac786f09ce575b5f67b35241ce9452896c9 ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: emulators/qemu-devel/files/extra-patch-c9c55ac786f09ce575b5f67b35241ce9452896c9-before11 =================================================================== --- emulators/qemu-devel/files/extra-patch-c9c55ac786f09ce575b5f67b35241ce9452896c9-before11 (revision 0) +++ emulators/qemu-devel/files/extra-patch-c9c55ac786f09ce575b5f67b35241ce9452896c9-before11 (working copy) @@ -0,0 +1,20 @@ +--- a/bsd-user/freebsd/os-socket.h ++++ b/bsd-user/freebsd/os-socket.h +@@ -635,7 +635,7 @@ static inline abi_long do_bsd_accept4(in + #else /* ! __FreeBSD_version > 1100000 */ + + /* bindat(2) */ +-static inline abi_long do_bsd_bindat(__unused int sockfd, ++static inline abi_long do_bsd_bindat(__unused int fd, __unused int sockfd, + __unused abi_ulong target_addr, __unused socklen_t addrlen) + { + +@@ -644,7 +644,7 @@ static inline abi_long do_bsd_bindat(__u + } + + /* connectat(2) */ +-static inline abi_long do_bsd_connectat(__unused int sockfd, ++static inline abi_long do_bsd_connectat(__unused int fd, __unused int sockfd, + __unused abi_ulong target_addr, __unused socklen_t addrlen) + { + Property changes on: emulators/qemu-devel/files/extra-patch-c9c55ac786f09ce575b5f67b35241ce9452896c9-before11 ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: emulators/qemu-devel/files/extra-patch-d9388715135ed1f36e12e6cdbcc1be09d1657916 =================================================================== --- emulators/qemu-devel/files/extra-patch-d9388715135ed1f36e12e6cdbcc1be09d1657916 (revision 0) +++ emulators/qemu-devel/files/extra-patch-d9388715135ed1f36e12e6cdbcc1be09d1657916 (working copy) @@ -0,0 +1,112 @@ +From d9388715135ed1f36e12e6cdbcc1be09d1657916 Mon Sep 17 00:00:00 2001 +From: Stacey Son +Date: Tue, 4 Nov 2014 22:14:50 +0000 +Subject: [PATCH] Add stubs for the new cap_*() system calls. + +This change adds stubs for cap_right_limit(2), cap_ioctls_limit(2), +cap_ioctls_get(2), cap_fcntls_limit(2), and cap_fcntls_get(2) system calls. +--- + bsd-user/freebsd/os-proc.h | 42 ++++++++++++++++++++++++++++++++++++++++++ + bsd-user/freebsd/syscall_nr.h | 7 ++++++- + bsd-user/syscall.c | 20 ++++++++++++++++++++ + 3 files changed, 68 insertions(+), 1 deletion(-) + +diff --git a/bsd-user/freebsd/os-proc.h b/bsd-user/freebsd/os-proc.h +index 8e28f04..cd05e96 100644 +--- a/bsd-user/freebsd/os-proc.h ++++ b/bsd-user/freebsd/os-proc.h +@@ -419,6 +419,48 @@ static inline abi_long do_freebsd_cap_getmode(abi_ulong arg1) + return -TARGET_ENOSYS; + } + ++/* cap_rights_limit(2) */ ++static inline abi_long do_freebsd_cap_rights_limit(int arg1, abi_ulong arg2) ++{ ++ ++ qemu_log("qemu: Unsupported syscall cap_rights_limit()\n"); ++ return -TARGET_ENOSYS; ++} ++ ++/* cap_ioctls_limit(2) */ ++static inline abi_long do_freebsd_cap_ioctls_limit(int arg1, abi_ulong arg2, ++ abi_ulong arg3) ++{ ++ ++ qemu_log("qemu: Unsupported syscall cap_ioctls_limit()\n"); ++ return -TARGET_ENOSYS; ++} ++ ++/* cap_ioctls_get(2) */ ++static inline abi_long do_freebsd_cap_ioctls_get(int arg1, abi_ulong arg2, ++ abi_ulong arg3) ++{ ++ ++ qemu_log("qemu: Unsupported syscall cap_ioctls_limit()\n"); ++ return -TARGET_ENOSYS; ++} ++ ++/* cap_fcntls_limit(2) */ ++static inline abi_long do_freebsd_cap_fcntls_limit(int arg1, abi_ulong arg2) ++{ ++ ++ qemu_log("qemu: Unsupported syscall cap_fcntls_limit()\n"); ++ return -TARGET_ENOSYS; ++} ++ ++/* cap_fcntls_get(2) */ ++static inline abi_long do_freebsd_cap_fcntls_get(int arg1, abi_ulong arg2) ++{ ++ ++ qemu_log("qemu: Unsupported syscall cap_fcntls_get()\n"); ++ return -TARGET_ENOSYS; ++} ++ + /* audit(2) */ + static inline abi_long do_freebsd_audit(abi_ulong arg1, abi_ulong arg2) + { +diff --git a/bsd-user/freebsd/syscall_nr.h b/bsd-user/freebsd/syscall_nr.h +index 779e192..2ab3e1e 100644 +--- a/bsd-user/freebsd/syscall_nr.h ++++ b/bsd-user/freebsd/syscall_nr.h +@@ -448,4 +448,9 @@ + #define TARGET_FREEBSD_NR_posix_fallocate 530 + #define TARGET_FREEBSD_NR_posix_fadvise 531 + #define TARGET_FREEBSD_NR_wait6 532 +-#define TARGET_FREEBSD_NR_MAXSYSCALL 533 ++#define TARGET_FREEBSD_NR_cap_rights_limit 533 ++#define TARGET_FREEBSD_NR_cap_ioctls_limit 534 ++#define TARGET_FREEBSD_NR_cap_ioctls_get 535 ++#define TARGET_FREEBSD_NR_cap_fcntls_limit 536 ++#define TARGET_FREEBSD_NR_cap_fcntls_get 537 ++#define TARGET_FREEBSD_NR_MAXSYSCALL 538 +diff --git a/bsd-user/syscall.c b/bsd-user/syscall.c +index 4f5a008..c615bb8 100644 +--- a/bsd-user/syscall.c ++++ b/bsd-user/syscall.c +@@ -367,6 +367,26 @@ abi_long do_freebsd_syscall(void *cpu_env, int num, abi_long arg1, + ret = do_freebsd_cap_getmode(arg1); + break; + ++ case TARGET_FREEBSD_NR_cap_rights_limit: /* cap_rights_limit(2) */ ++ ret = do_freebsd_cap_rights_limit(arg1, arg2); ++ break; ++ ++ case TARGET_FREEBSD_NR_cap_ioctls_limit: /* cap_ioctls_limit(2) */ ++ ret = do_freebsd_cap_ioctls_limit(arg1, arg2, arg3); ++ break; ++ ++ case TARGET_FREEBSD_NR_cap_ioctls_get: /* cap_ioctls_get(2) */ ++ ret = do_freebsd_cap_ioctls_get(arg1, arg2, arg3); ++ break; ++ ++ case TARGET_FREEBSD_NR_cap_fcntls_limit: /* cap_fcntls_limit(2) */ ++ ret = do_freebsd_cap_fcntls_limit(arg1, arg2); ++ break; ++ ++ case TARGET_FREEBSD_NR_cap_fcntls_get: /* cap_fcntls_get(2) */ ++ ret = do_freebsd_cap_fcntls_get(arg1, arg2); ++ break; ++ + case TARGET_FREEBSD_NR_audit: /* audit(2) */ + ret = do_freebsd_audit(arg1, arg2); + break; Property changes on: emulators/qemu-devel/files/extra-patch-d9388715135ed1f36e12e6cdbcc1be09d1657916 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: emulators/qemu-devel/files/extra-patch-f32d585446698e1faa319c95df6b4d00c16f866c =================================================================== --- emulators/qemu-devel/files/extra-patch-f32d585446698e1faa319c95df6b4d00c16f866c (revision 0) +++ emulators/qemu-devel/files/extra-patch-f32d585446698e1faa319c95df6b4d00c16f866c (working copy) @@ -0,0 +1,81 @@ +From f32d585446698e1faa319c95df6b4d00c16f866c Mon Sep 17 00:00:00 2001 +From: Stacey Son +Date: Wed, 5 Nov 2014 20:55:35 +0000 +Subject: [PATCH] The new system calls were actually added in 10.0. + +This change fixes when cap_*[_limit, _get](2), bindat(2), connectat(2), +and wait6(2) were actually added to the FreeBSD kernel. +--- + bsd-user/freebsd/os-proc.h | 8 ++++---- + bsd-user/freebsd/os-socket.h | 6 +++--- + 2 files changed, 7 insertions(+), 7 deletions(-) + +diff --git a/bsd-user/freebsd/os-proc.h b/bsd-user/freebsd/os-proc.h +index cd05e96..612a5fd 100644 +--- a/bsd-user/freebsd/os-proc.h ++++ b/bsd-user/freebsd/os-proc.h +@@ -20,7 +20,7 @@ + #ifndef __FREEBSD_PROC_H_ + #define __FREEBSD_PROC_H_ + +-#if defined(__FreeBSD_version) && __FreeBSD_version > 1100000 ++#if defined(__FreeBSD_version) && __FreeBSD_version >= 1000000 + #include + #endif + #include +@@ -75,7 +75,7 @@ static inline abi_long do_freebsd_wait4(abi_long arg1, abi_ulong target_status, + return ret; + } + +-#if defined(__FreeBSD_version) && __FreeBSD_version > 1100000 ++#if defined(__FreeBSD_version) && __FreeBSD_version >= 1000000 + /* wait6(2) */ + static inline abi_long do_freebsd_wait6(abi_long idtype, abi_long id, + abi_ulong target_status, abi_long options, abi_ulong target_wrusage, +@@ -112,7 +112,7 @@ static inline abi_long do_freebsd_wait6(abi_long idtype, abi_long id, + return ret; + } + +-#else /* ! __FreeBSD_version > 1100000 */ ++#else /* ! __FreeBSD_version >= 1000000 */ + + static inline abi_long do_freebsd_wait6( __unused abi_long idtype, + __unused abi_long id, __unused abi_ulong target_status, +@@ -123,7 +123,7 @@ static inline abi_long do_freebsd_wait6( __unused abi_long idtype, + qemu_log("qemu: Unsupported syscall wait6()\n"); + return -TARGET_ENOSYS; + } +-#endif /* __FreeBSD_version > 1100000 */ ++#endif /* __FreeBSD_version >= 1000000 */ + + #if defined(__FreeBSD_version) && __FreeBSD_version > 900000 + /* setloginclass(2) */ +diff --git a/bsd-user/freebsd/os-socket.h b/bsd-user/freebsd/os-socket.h +index 61e3440..4212f0a 100644 +--- a/bsd-user/freebsd/os-socket.h ++++ b/bsd-user/freebsd/os-socket.h +@@ -557,7 +557,7 @@ static inline abi_long do_freebsd_sendfile(abi_long fd, abi_long s, + return -TARGET_ENOSYS; + } + +-#if defined(__FreeBSD_version) && __FreeBSD_version > 1100000 ++#if defined(__FreeBSD_version) && __FreeBSD_version >= 1000000 + /* bindat(2) */ + static inline abi_long do_bsd_bindat(int fd, int sockfd, abi_ulong target_addr, + socklen_t addrlen) +@@ -632,7 +632,7 @@ static inline abi_long do_bsd_accept4(int fd, abi_ulong target_addr, + return ret; + } + +-#else /* ! __FreeBSD_version > 1100000 */ ++#else /* ! __FreeBSD_version >= 1000000 */ + + /* bindat(2) */ + static inline abi_long do_bsd_bindat(__unused int sockfd, +@@ -660,5 +660,5 @@ static inline abi_long do_bsd_accept4(__unused int fd, + qemu_log("qemu: Unsupported syscall accept4()\n"); + return -TARGET_ENOSYS; + } +-#endif /* ! __FreeBSD_version > 1100000 */ ++#endif /* ! __FreeBSD_version >= 1000000 */ + #endif /* !__FREEBSD_SOCKET_H_ */ Property changes on: emulators/qemu-devel/files/extra-patch-f32d585446698e1faa319c95df6b4d00c16f866c ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property