in progress commit (in syscall at do_fork)
This commit is contained in:
parent
b9997601e7
commit
49833bdadb
|
@ -134,8 +134,9 @@ endif #CONFIG_BSD_USER
|
|||
|
||||
ifdef CONFIG_DARWIN_USER
|
||||
|
||||
QEMU_CFLAGS+=-I$(SRC_PATH)/darwin-user -I$(SRC_PATH)/darwin-user/$(TARGET_ABI_DIR) \
|
||||
-I$(SRC_PATH)/darwin-user/$(HOST_VARIANT_DIR)
|
||||
QEMU_CFLAGS+=-I$(SRC_PATH)/darwin-user/$(TARGET_ABI_DIR) \
|
||||
-I$(SRC_PATH)/darwin-user/host/$(ARCH) \
|
||||
-I$(SRC_PATH)/darwin-user
|
||||
|
||||
obj-y += darwin-user/
|
||||
obj-y += gdbstub.o
|
||||
|
|
|
@ -430,7 +430,8 @@ static void page_init(void)
|
|||
#else
|
||||
FILE *f;
|
||||
|
||||
last_brk = (unsigned long)sbrk(0);
|
||||
// depreciated in osx, but value is not used?
|
||||
//last_brk = (unsigned long)sbrk(0);
|
||||
|
||||
f = fopen("/compat/linux/proc/self/maps", "r");
|
||||
if (f) {
|
||||
|
|
|
@ -244,6 +244,11 @@ int cpu_signal_handler(int host_signum, void *pinfo,
|
|||
#define TRAP_sig(context) ((context)->sc_trapno)
|
||||
#define ERROR_sig(context) ((context)->sc_err)
|
||||
#define MASK_sig(context) ((context)->sc_mask)
|
||||
#elif defined(__APPLE__)
|
||||
#define PC_sig(context) ((context)->uc_mcontext->__ss.__rip)
|
||||
#define TRAP_sig(context) ((context)->uc_mcontext->__es.__trapno)
|
||||
#define ERROR_sig(context) ((context)->uc_mcontext->__es.__err)
|
||||
#define MASK_sig(context) ((context)->uc_sigmask)
|
||||
#elif defined(__FreeBSD__) || defined(__DragonFly__)
|
||||
#include <ucontext.h>
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#define TARGET_ENOENT 2 /* No such file or directory */
|
||||
#define TARGET_ESRCH 3 /* No such process */
|
||||
#define TARGET_EINTR 4 /* Interrupted function call */
|
||||
#define TARGET_EIO 5 /* I/O error */
|
||||
#define TARGET_EIO 5 /* I/O error */
|
||||
#define TARGET_ENXIO 6 /* No such device or address */
|
||||
#define TARGET_E2BIG 7 /* Arg list too long */
|
||||
#define TARGET_ENOEXEC 8 /* Exec format error */
|
||||
|
@ -37,7 +37,7 @@
|
|||
#define TARGET_EROFS 30 /* Read only file system */
|
||||
#define TARGET_EMLINK 31 /* Too many links */
|
||||
#define TARGET_EPIPE 32 /* Broken pipe */
|
||||
#define TARGET_EDOM 33 /* Domain error */
|
||||
#define TARGET_EDOM 33 /* Domain error */
|
||||
#define TARGET_ERANGE 34 /* Result too large */
|
||||
#define TARGET_ENOMSG 35 /* No message of desired type */
|
||||
#define TARGET_EIDRM 36 /* Identifier removed */
|
||||
|
@ -46,7 +46,7 @@
|
|||
#define TARGET_EL3HLT 39 /* Level 3 halted */
|
||||
#define TARGET_EL3RST 40 /* Level 3 reset */
|
||||
#define TARGET_ELNRNG 41 /* Link number out of range */
|
||||
#define TARGET_EUNATCH 42 /* Protocol driver not attached */
|
||||
#define TARGET_EUNATCH 42 /* Protocol driver not attached */
|
||||
#define TARGET_ENOCSI 43 /* No CSI structure available */
|
||||
#define TARGET_EL2HLT 44 /* Level 2 halted */
|
||||
#define TARGET_EDEADLK 45 /* Resource deadlock avoided */
|
||||
|
@ -74,7 +74,7 @@
|
|||
#define TARGET_ENOPKG 65 /* Package not installed */
|
||||
#define TARGET_EREMOTE 66 /* The object is remote */
|
||||
#define TARGET_ENOLINK 67 /* the link has been severed */
|
||||
#define TARGET_EADV 68 /* advertise error */
|
||||
#define TARGET_EADV 68 /* advertise error */
|
||||
#define TARGET_ESRMNT 69 /* srmount error */
|
||||
|
||||
#define TARGET_ECOMM 70 /* Communication error on send */
|
||||
|
@ -155,7 +155,7 @@
|
|||
#define TARGET_EREMDEV 142 /* Error 142 */
|
||||
#define TARGET_ECANCELED 158 /* AIO operation canceled */
|
||||
|
||||
#else
|
||||
#else /* !(defined TARGET_ABI_IRIX || defined TARGET_ABI_SOLARIS) */
|
||||
#define TARGET_EPERM 1 /* Operation not permitted */
|
||||
#define TARGET_ENOENT 2 /* No such file or directory */
|
||||
#define TARGET_ESRCH 3 /* No such process */
|
||||
|
@ -294,7 +294,7 @@
|
|||
|
||||
#define TARGET_ERFKILL 132 /* Operation not possible due to RF-kill */
|
||||
#define TARGET_EHWPOISON 133 /* Memory page has hardware error */
|
||||
#endif
|
||||
#endif /* defined TARGET_ABI_IRIX || defined TARGET_ABI_SOLARIS */
|
||||
|
||||
/* QEMU internal, not visible to the guest. This is returned when a
|
||||
* system call should be restarted, to tell the main loop that it
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
/*
|
||||
* hostdep.h : things which are dependent on the host architecture
|
||||
*
|
||||
* * Written by Peter Maydell <peter.maydell@linaro.org>
|
||||
*
|
||||
* Copyright (C) 2016 Linaro Limited
|
||||
*
|
||||
* This work is licensed under the terms of the GNU GPL, version 2 or later.
|
||||
* See the COPYING file in the top-level directory.
|
||||
*/
|
||||
|
||||
#ifndef X86_64_HOSTDEP_H
|
||||
#define X86_64_HOSTDEP_H
|
||||
|
||||
/* Turn off safe-syscall for now ... */
|
||||
|
||||
// /* We have a safe-syscall.inc.S */
|
||||
// #define HAVE_SAFE_SYSCALL
|
||||
//
|
||||
// #ifndef __ASSEMBLER__
|
||||
//
|
||||
// /* These are defined by the safe-syscall.inc.S file */
|
||||
// extern char safe_syscall_start[];
|
||||
// extern char safe_syscall_end[];
|
||||
//
|
||||
// /* Adjust the signal context to rewind out of safe-syscall if we're in it */
|
||||
// static inline void rewind_if_in_safe_syscall(void *puc)
|
||||
// {
|
||||
// ucontext_t *uc = puc;
|
||||
// greg_t *pcreg = &uc->uc_mcontext.gregs[REG_RIP];
|
||||
//
|
||||
// if (*pcreg > (uintptr_t)safe_syscall_start
|
||||
// && *pcreg < (uintptr_t)safe_syscall_end) {
|
||||
// *pcreg = (uintptr_t)safe_syscall_start;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// #endif /* __ASSEMBLER__ */
|
||||
|
||||
#endif
|
|
@ -0,0 +1,91 @@
|
|||
/*
|
||||
* safe-syscall.inc.S : host-specific assembly fragment
|
||||
* to handle signals occurring at the same time as system calls.
|
||||
* This is intended to be included by linux-user/safe-syscall.S
|
||||
*
|
||||
* Copyright (C) 2015 Timothy Edward Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
|
||||
*
|
||||
* This work is licensed under the terms of the GNU GPL, version 2 or later.
|
||||
* See the COPYING file in the top-level directory.
|
||||
*/
|
||||
|
||||
.global safe_syscall_base
|
||||
.global safe_syscall_start
|
||||
.global safe_syscall_end
|
||||
.type safe_syscall_base, @function
|
||||
|
||||
/* This is the entry point for making a system call. The calling
|
||||
* convention here is that of a C varargs function with the
|
||||
* first argument an 'int *' to the signal_pending flag, the
|
||||
* second one the system call number (as a 'long'), and all further
|
||||
* arguments being syscall arguments (also 'long').
|
||||
* We return a long which is the syscall's return value, which
|
||||
* may be negative-errno on failure. Conversion to the
|
||||
* -1-and-errno-set convention is done by the calling wrapper.
|
||||
*/
|
||||
safe_syscall_base:
|
||||
.cfi_startproc
|
||||
/* This saves a frame pointer and aligns the stack for the syscall.
|
||||
* (It's unclear if the syscall ABI has the same stack alignment
|
||||
* requirements as the userspace function call ABI, but better safe than
|
||||
* sorry. Appendix A2 of http://www.x86-64.org/documentation/abi.pdf
|
||||
* does not list any ABI differences regarding stack alignment.)
|
||||
*/
|
||||
push %rbp
|
||||
.cfi_adjust_cfa_offset 8
|
||||
.cfi_rel_offset rbp, 0
|
||||
|
||||
/* The syscall calling convention isn't the same as the
|
||||
* C one:
|
||||
* we enter with rdi == *signal_pending
|
||||
* rsi == syscall number
|
||||
* rdx, rcx, r8, r9, (stack), (stack) == syscall arguments
|
||||
* and return the result in rax
|
||||
* and the syscall instruction needs
|
||||
* rax == syscall number
|
||||
* rdi, rsi, rdx, r10, r8, r9 == syscall arguments
|
||||
* and returns the result in rax
|
||||
* Shuffle everything around appropriately.
|
||||
* Note that syscall will trash rcx and r11.
|
||||
*/
|
||||
mov %rsi, %rax /* syscall number */
|
||||
mov %rdi, %rbp /* signal_pending pointer */
|
||||
/* and the syscall arguments */
|
||||
mov %rdx, %rdi
|
||||
mov %rcx, %rsi
|
||||
mov %r8, %rdx
|
||||
mov %r9, %r10
|
||||
mov 16(%rsp), %r8
|
||||
mov 24(%rsp), %r9
|
||||
|
||||
/* This next sequence of code works in conjunction with the
|
||||
* rewind_if_safe_syscall_function(). If a signal is taken
|
||||
* and the interrupted PC is anywhere between 'safe_syscall_start'
|
||||
* and 'safe_syscall_end' then we rewind it to 'safe_syscall_start'.
|
||||
* The code sequence must therefore be able to cope with this, and
|
||||
* the syscall instruction must be the final one in the sequence.
|
||||
*/
|
||||
safe_syscall_start:
|
||||
/* if signal_pending is non-zero, don't do the call */
|
||||
cmpl $0, (%rbp)
|
||||
jnz 1f
|
||||
syscall
|
||||
safe_syscall_end:
|
||||
/* code path for having successfully executed the syscall */
|
||||
pop %rbp
|
||||
.cfi_remember_state
|
||||
.cfi_def_cfa_offset 8
|
||||
.cfi_restore rbp
|
||||
ret
|
||||
|
||||
1:
|
||||
/* code path when we didn't execute the syscall */
|
||||
.cfi_restore_state
|
||||
mov $-TARGET_ERESTARTSYS, %rax
|
||||
pop %rbp
|
||||
.cfi_def_cfa_offset 8
|
||||
.cfi_restore rbp
|
||||
ret
|
||||
.cfi_endproc
|
||||
|
||||
.size safe_syscall_base, .-safe_syscall_base
|
|
@ -1,66 +1,71 @@
|
|||
/* emulated ioctl list */
|
||||
|
||||
// https://stackoverflow.com/questions/41906713/is-there-a-way-to-determine-if-stdin-is-a-tty-through-a-system-call
|
||||
// But in BSD flavors (as OS X) it is TIOCGETA, not TCGETS
|
||||
// defined in 'sys/ttycom.h'
|
||||
#ifdef TARGET_ABI_IRIX
|
||||
IOCTL_MAP(TCNGETS, TCGETS, IOC_R, MK_PTR(MK_STRUCT(STRUCT_termios)))
|
||||
IOCTL_MAP(TCNSETS, TCSETS, IOC_R, MK_PTR(MK_STRUCT(STRUCT_termios)))
|
||||
IOCTL_MAP(TCNSETSF, TCSETSF, IOC_R, MK_PTR(MK_STRUCT(STRUCT_termios)))
|
||||
IOCTL_MAP(TCNSETSW, TCSETSW, IOC_R, MK_PTR(MK_STRUCT(STRUCT_termios)))
|
||||
IOCTL_MAP(TCNGETS, TIOCGETA, IOC_R, MK_PTR(MK_STRUCT(STRUCT_termios)))
|
||||
IOCTL_MAP(TCNSETS, TIOCSETA, IOC_R, MK_PTR(MK_STRUCT(STRUCT_termios)))
|
||||
IOCTL_MAP(TCNSETSF, TIOCSETAF, IOC_R, MK_PTR(MK_STRUCT(STRUCT_termios)))
|
||||
IOCTL_MAP(TCNSETSW, TIOCSETAW, IOC_R, MK_PTR(MK_STRUCT(STRUCT_termios)))
|
||||
#endif
|
||||
|
||||
IOCTL(TCGETS, IOC_R, MK_PTR(MK_STRUCT(STRUCT_termios)))
|
||||
IOCTL(TCSETS, IOC_W, MK_PTR(MK_STRUCT(STRUCT_termios)))
|
||||
IOCTL(TCSETSF, IOC_W, MK_PTR(MK_STRUCT(STRUCT_termios)))
|
||||
IOCTL(TCSETSW, IOC_W, MK_PTR(MK_STRUCT(STRUCT_termios)))
|
||||
// NOTE: the linux GETS takes *termios, while GETA takes *termio
|
||||
// darwin doesn't seem to have struct termio, so maybe convert if needed?
|
||||
IOCTL_MAP(TCGETS, TIOCGETA, IOC_R, MK_PTR(MK_STRUCT(STRUCT_termios)))
|
||||
IOCTL_MAP(TCSETS, TIOCSETA, IOC_W, MK_PTR(MK_STRUCT(STRUCT_termios)))
|
||||
IOCTL_MAP(TCSETSF, TIOCSETAF, IOC_W, MK_PTR(MK_STRUCT(STRUCT_termios)))
|
||||
IOCTL_MAP(TCSETSW, TIOCSETAW, IOC_W, MK_PTR(MK_STRUCT(STRUCT_termios)))
|
||||
IOCTL(TIOCGWINSZ, IOC_R, MK_PTR(MK_STRUCT(STRUCT_winsize)))
|
||||
IOCTL(TIOCSWINSZ, IOC_W, MK_PTR(MK_STRUCT(STRUCT_winsize)))
|
||||
IOCTL(FIONREAD, IOC_R, MK_PTR(TYPE_INT))
|
||||
IOCTL(TCGETA, IOC_R, MK_PTR(TYPE_INT))
|
||||
IOCTL(TCSETA, IOC_W, MK_PTR(TYPE_INT))
|
||||
IOCTL(TCSETAW, IOC_W, MK_PTR(TYPE_INT))
|
||||
IOCTL(TCSETAF, IOC_W, MK_PTR(TYPE_INT))
|
||||
IOCTL(TCSBRK, 0, TYPE_INT)
|
||||
IOCTL(TCSBRKP, 0, TYPE_INT)
|
||||
IOCTL(TCXONC, 0, TYPE_INT)
|
||||
IOCTL(TCFLSH, 0, TYPE_INT)
|
||||
IOCTL_MAP(TCGETA, TIOCGETA, IOC_R, MK_PTR(TYPE_INT))
|
||||
IOCTL_MAP(TCSETA, TIOCSETA, IOC_W, MK_PTR(TYPE_INT))
|
||||
IOCTL_MAP(TCSETAW, TIOCSETAW, IOC_W, MK_PTR(TYPE_INT))
|
||||
IOCTL_MAP(TCSETAF, TIOCSETAF, IOC_W, MK_PTR(TYPE_INT))
|
||||
IOCTL_SPECIAL_MAP(TCSBRK, TIOCSBRK, 0, do_ioctl_tcsbrk, TYPE_INT) // tcsendbreak(fd, arg); these seem different than linux's?
|
||||
IOCTL_SPECIAL_MAP(TCSBRKP, TIOCSBRK, 0, do_ioctl_tcsbrk, TYPE_INT) // tcsendbreak(fd, arg) measured in deciseconds
|
||||
IOCTL_SPECIAL_MAP(TCXONC, 0, 0, do_ioctl_tcxonc, TYPE_INT) // Equivalent to tcflow(fd, arg)
|
||||
IOCTL_SPECIAL_MAP(TCFLSH, 0, 0, do_ioctl_tcflsh, TYPE_INT) // Equivalent to tcflush(fd, arg)
|
||||
IOCTL(TIOCEXCL, 0, TYPE_NULL)
|
||||
IOCTL(TIOCNXCL, 0, TYPE_NULL)
|
||||
IOCTL(TIOCSCTTY, 0, TYPE_INT)
|
||||
IOCTL(TIOCGPGRP, IOC_R, MK_PTR(TYPE_INT))
|
||||
IOCTL(TIOCSPGRP, IOC_W, MK_PTR(TYPE_INT))
|
||||
IOCTL(TIOCGSID, IOC_W, MK_PTR(TYPE_INT))
|
||||
IOCTL_MAP(TIOCGSID, 0, IOC_W, MK_PTR(TYPE_INT)) // error out for now
|
||||
IOCTL(TIOCOUTQ, IOC_R, MK_PTR(TYPE_INT))
|
||||
IOCTL(TIOCSTI, IOC_W, MK_PTR(TYPE_INT))
|
||||
IOCTL(TIOCMGET, IOC_R, MK_PTR(TYPE_INT))
|
||||
IOCTL(TIOCMBIS, IOC_W, MK_PTR(TYPE_INT))
|
||||
IOCTL(TIOCMBIC, IOC_W, MK_PTR(TYPE_INT))
|
||||
IOCTL(TIOCMSET, IOC_W, MK_PTR(TYPE_INT))
|
||||
IOCTL(TIOCGSOFTCAR, IOC_R, MK_PTR(TYPE_INT))
|
||||
IOCTL(TIOCSSOFTCAR, IOC_W, MK_PTR(TYPE_INT))
|
||||
IOCTL(TIOCLINUX, IOC_R | IOC_W, MK_PTR(TYPE_INT))
|
||||
// IOCTL(TIOCGSOFTCAR, IOC_R, MK_PTR(TYPE_INT)) not actually defined in IRIX
|
||||
// IOCTL(TIOCSSOFTCAR, IOC_W, MK_PTR(TYPE_INT))
|
||||
// IOCTL(TIOCLINUX, IOC_R | IOC_W, MK_PTR(TYPE_INT))
|
||||
IOCTL(TIOCCONS, 0, TYPE_NULL)
|
||||
IOCTL(TIOCGSERIAL, IOC_R, MK_PTR(TYPE_INT))
|
||||
IOCTL(TIOCSSERIAL, IOC_W, MK_PTR(TYPE_INT))
|
||||
// IOCTL(TIOCGSERIAL, IOC_R, MK_PTR(TYPE_INT)) ibid
|
||||
// IOCTL(TIOCSSERIAL, IOC_W, MK_PTR(TYPE_INT))
|
||||
IOCTL(TIOCPKT, IOC_W, MK_PTR(TYPE_INT))
|
||||
IOCTL(FIONBIO, IOC_W, MK_PTR(TYPE_INT))
|
||||
IOCTL(TIOCNOTTY, 0, TYPE_NULL)
|
||||
IOCTL(TIOCGETD, IOC_R, MK_PTR(TYPE_INT))
|
||||
IOCTL(TIOCSETD, IOC_W, MK_PTR(TYPE_INT))
|
||||
IOCTL(TIOCGPTN, IOC_R, MK_PTR(TYPE_INT))
|
||||
IOCTL(TIOCSPTLCK, IOC_W, MK_PTR(TYPE_INT))
|
||||
IOCTL_MAP(TIOCGPTN, 0, IOC_R, MK_PTR(TYPE_INT)) // error out for now
|
||||
IOCTL_MAP(TIOCSPTLCK, 0, IOC_W, MK_PTR(TYPE_INT)) // error out for now
|
||||
#if defined TIOCGPTPEER && defined TARGET_TIOCGPTPEER
|
||||
IOCTL_SPECIAL(TIOCGPTPEER, 0, do_ioctl_tiocgptpeer, TYPE_INT)
|
||||
#endif
|
||||
IOCTL(FIOCLEX, 0, TYPE_NULL)
|
||||
IOCTL(FIONCLEX, 0, TYPE_NULL)
|
||||
IOCTL(FIOASYNC, IOC_W, MK_PTR(TYPE_INT))
|
||||
IOCTL(TIOCGLCKTRMIOS, IOC_R, MK_PTR(MK_STRUCT(STRUCT_termios)))
|
||||
IOCTL(TIOCSLCKTRMIOS, IOC_W, MK_PTR(MK_STRUCT(STRUCT_termios)))
|
||||
IOCTL(TIOCSERCONFIG, 0, TYPE_NULL)
|
||||
IOCTL(TIOCSERGETLSR, IOC_R, MK_PTR(TYPE_INT))
|
||||
IOCTL(TIOCSERGETMULTI, IOC_R, MK_PTR(MK_STRUCT(STRUCT_serial_multiport_struct)))
|
||||
IOCTL(TIOCSERSETMULTI, IOC_W, MK_PTR(MK_STRUCT(STRUCT_serial_multiport_struct)))
|
||||
IOCTL(TIOCMIWAIT, 0, TYPE_INT)
|
||||
IOCTL(TIOCGICOUNT, IOC_R, MK_PTR(MK_STRUCT(STRUCT_serial_icounter_struct)))
|
||||
// None of these are in Irix, so don't worry..
|
||||
// IOCTL(TIOCGLCKTRMIOS, IOC_R, MK_PTR(MK_STRUCT(STRUCT_termios)))
|
||||
// IOCTL(TIOCSLCKTRMIOS, IOC_W, MK_PTR(MK_STRUCT(STRUCT_termios)))
|
||||
// IOCTL(TIOCSERCONFIG, 0, TYPE_NULL)
|
||||
// IOCTL(TIOCSERGETLSR, IOC_R, MK_PTR(TYPE_INT))
|
||||
// IOCTL(TIOCSERGETMULTI, IOC_R, MK_PTR(MK_STRUCT(STRUCT_serial_multiport_struct)))
|
||||
// IOCTL(TIOCSERSETMULTI, IOC_W, MK_PTR(MK_STRUCT(STRUCT_serial_multiport_struct)))
|
||||
// IOCTL(TIOCMIWAIT, 0, TYPE_INT)
|
||||
// IOCTL(TIOCGICOUNT, IOC_R, MK_PTR(MK_STRUCT(STRUCT_serial_icounter_struct)))
|
||||
|
||||
#if !defined(TARGET_ABI_IRIX) && !defined(TARGET_ABI_SOLARIS)
|
||||
IOCTL(KIOCSOUND, 0, TYPE_INT)
|
||||
|
@ -137,55 +142,59 @@
|
|||
#endif
|
||||
#endif
|
||||
|
||||
// don't look to be in indy dump...
|
||||
#ifndef TARGET_ABI_IRIX
|
||||
IOCTL(FS_IOC_GETFLAGS, IOC_R, MK_PTR(TYPE_INT))
|
||||
IOCTL(FS_IOC_SETFLAGS, IOC_W, MK_PTR(TYPE_INT))
|
||||
|
||||
IOCTL(SIOCATMARK, IOC_R, MK_PTR(TYPE_INT))
|
||||
IOCTL(SIOCGIFNAME, IOC_RW, MK_PTR(TYPE_INT))
|
||||
IOCTL(SIOCGIFFLAGS, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_short_ifreq)))
|
||||
IOCTL(SIOCSIFFLAGS, IOC_W, MK_PTR(MK_STRUCT(STRUCT_short_ifreq)))
|
||||
IOCTL(SIOCGIFADDR, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq)))
|
||||
IOCTL(SIOCSIFADDR, IOC_W, MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq)))
|
||||
IOCTL(SIOCGIFBRDADDR, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq)))
|
||||
IOCTL(SIOCSIFBRDADDR, IOC_W, MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq)))
|
||||
IOCTL(SIOCGIFDSTADDR, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq)))
|
||||
IOCTL(SIOCSIFDSTADDR, IOC_W, MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq)))
|
||||
IOCTL(SIOCGIFNETMASK, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq)))
|
||||
IOCTL(SIOCSIFNETMASK, IOC_W, MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq)))
|
||||
IOCTL(SIOCGIFHWADDR, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq)))
|
||||
IOCTL(SIOCSIFHWADDR, IOC_W, MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq)))
|
||||
IOCTL(SIOCGIFTXQLEN, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq)))
|
||||
IOCTL(SIOCSIFTXQLEN, IOC_W, MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq)))
|
||||
IOCTL(SIOCGIFMETRIC, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_int_ifreq)))
|
||||
IOCTL(SIOCSIFMETRIC, IOC_W, MK_PTR(MK_STRUCT(STRUCT_int_ifreq)))
|
||||
IOCTL(SIOCGIFMTU, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_int_ifreq)))
|
||||
IOCTL(SIOCSIFMTU, IOC_W, MK_PTR(MK_STRUCT(STRUCT_int_ifreq)))
|
||||
IOCTL(SIOCGIFMAP, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_ifmap_ifreq)))
|
||||
IOCTL(SIOCSIFMAP, IOC_W, MK_PTR(MK_STRUCT(STRUCT_ifmap_ifreq)))
|
||||
IOCTL(SIOCGIFSLAVE, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_char_ifreq)))
|
||||
IOCTL(SIOCSIFSLAVE, IOC_W, MK_PTR(MK_STRUCT(STRUCT_char_ifreq)))
|
||||
IOCTL(SIOCGIFMEM, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_ptr_ifreq)))
|
||||
IOCTL(SIOCSIFMEM, IOC_W, MK_PTR(MK_STRUCT(STRUCT_ptr_ifreq)))
|
||||
IOCTL(SIOCADDMULTI, IOC_W, MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq)))
|
||||
IOCTL(SIOCDELMULTI, IOC_W, MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq)))
|
||||
IOCTL(SIOCGIFINDEX, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_int_ifreq)))
|
||||
IOCTL(SIOCSIFLINK, 0, TYPE_NULL)
|
||||
IOCTL_SPECIAL(SIOCGIFCONF, IOC_W | IOC_R, do_ioctl_ifconf,
|
||||
MK_PTR(MK_STRUCT(STRUCT_ifconf)))
|
||||
IOCTL(SIOCGIFENCAP, IOC_RW, MK_PTR(TYPE_INT))
|
||||
IOCTL(SIOCSIFENCAP, IOC_W, MK_PTR(TYPE_INT))
|
||||
IOCTL(SIOCDARP, IOC_W, MK_PTR(MK_STRUCT(STRUCT_arpreq)))
|
||||
IOCTL(SIOCSARP, IOC_W, MK_PTR(MK_STRUCT(STRUCT_arpreq)))
|
||||
IOCTL(SIOCGARP, IOC_R, MK_PTR(MK_STRUCT(STRUCT_arpreq)))
|
||||
IOCTL(SIOCDRARP, IOC_W, MK_PTR(MK_STRUCT(STRUCT_arpreq)))
|
||||
IOCTL(SIOCSRARP, IOC_W, MK_PTR(MK_STRUCT(STRUCT_arpreq)))
|
||||
IOCTL(SIOCGRARP, IOC_R, MK_PTR(MK_STRUCT(STRUCT_arpreq)))
|
||||
IOCTL(SIOCGIWNAME, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_char_ifreq)))
|
||||
IOCTL(SIOCGPGRP, IOC_R, MK_PTR(TYPE_INT)) /* pid_t */
|
||||
IOCTL(SIOCGSTAMP, IOC_R, MK_PTR(MK_STRUCT(STRUCT_timeval)))
|
||||
IOCTL(SIOCGSTAMPNS, IOC_R, MK_PTR(MK_STRUCT(STRUCT_timespec)))
|
||||
IOCTL(SIOCATMARK, IOC_R, MK_PTR(TYPE_INT))
|
||||
IOCTL(SIOCGIFNAME, IOC_RW, MK_PTR(TYPE_INT))
|
||||
IOCTL(SIOCGIFFLAGS, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_short_ifreq)))
|
||||
IOCTL(SIOCSIFFLAGS, IOC_W, MK_PTR(MK_STRUCT(STRUCT_short_ifreq)))
|
||||
IOCTL(SIOCGIFADDR, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq)))
|
||||
IOCTL(SIOCSIFADDR, IOC_W, MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq)))
|
||||
IOCTL(SIOCGIFBRDADDR, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq)))
|
||||
IOCTL(SIOCSIFBRDADDR, IOC_W, MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq)))
|
||||
IOCTL(SIOCGIFDSTADDR, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq)))
|
||||
IOCTL(SIOCSIFDSTADDR, IOC_W, MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq)))
|
||||
IOCTL(SIOCGIFNETMASK, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq)))
|
||||
IOCTL(SIOCSIFNETMASK, IOC_W, MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq)))
|
||||
IOCTL(SIOCGIFHWADDR, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq)))
|
||||
IOCTL(SIOCSIFHWADDR, IOC_W, MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq)))
|
||||
IOCTL(SIOCGIFTXQLEN, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq)))
|
||||
IOCTL(SIOCSIFTXQLEN, IOC_W, MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq)))
|
||||
IOCTL(SIOCGIFMETRIC, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_int_ifreq)))
|
||||
IOCTL(SIOCSIFMETRIC, IOC_W, MK_PTR(MK_STRUCT(STRUCT_int_ifreq)))
|
||||
IOCTL(SIOCGIFMTU, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_int_ifreq)))
|
||||
IOCTL(SIOCSIFMTU, IOC_W, MK_PTR(MK_STRUCT(STRUCT_int_ifreq)))
|
||||
IOCTL(SIOCGIFMAP, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_ifmap_ifreq)))
|
||||
IOCTL(SIOCSIFMAP, IOC_W, MK_PTR(MK_STRUCT(STRUCT_ifmap_ifreq)))
|
||||
IOCTL(SIOCGIFSLAVE, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_char_ifreq)))
|
||||
IOCTL(SIOCSIFSLAVE, IOC_W, MK_PTR(MK_STRUCT(STRUCT_char_ifreq)))
|
||||
IOCTL(SIOCGIFMEM, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_ptr_ifreq)))
|
||||
IOCTL(SIOCSIFMEM, IOC_W, MK_PTR(MK_STRUCT(STRUCT_ptr_ifreq)))
|
||||
IOCTL(SIOCADDMULTI, IOC_W, MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq)))
|
||||
IOCTL(SIOCDELMULTI, IOC_W, MK_PTR(MK_STRUCT(STRUCT_sockaddr_ifreq)))
|
||||
IOCTL(SIOCGIFINDEX, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_int_ifreq)))
|
||||
IOCTL(SIOCSIFLINK, 0, TYPE_NULL)
|
||||
IOCTL_SPECIAL(SIOCGIFCONF, IOC_W | IOC_R, do_ioctl_ifconf,
|
||||
MK_PTR(MK_STRUCT(STRUCT_ifconf)))
|
||||
IOCTL(SIOCGIFENCAP, IOC_RW, MK_PTR(TYPE_INT))
|
||||
IOCTL(SIOCSIFENCAP, IOC_W, MK_PTR(TYPE_INT))
|
||||
IOCTL(SIOCDARP, IOC_W, MK_PTR(MK_STRUCT(STRUCT_arpreq)))
|
||||
IOCTL(SIOCSARP, IOC_W, MK_PTR(MK_STRUCT(STRUCT_arpreq)))
|
||||
IOCTL(SIOCGARP, IOC_R, MK_PTR(MK_STRUCT(STRUCT_arpreq)))
|
||||
IOCTL(SIOCDRARP, IOC_W, MK_PTR(MK_STRUCT(STRUCT_arpreq)))
|
||||
IOCTL(SIOCSRARP, IOC_W, MK_PTR(MK_STRUCT(STRUCT_arpreq)))
|
||||
IOCTL(SIOCGRARP, IOC_R, MK_PTR(MK_STRUCT(STRUCT_arpreq)))
|
||||
IOCTL(SIOCGIWNAME, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_char_ifreq)))
|
||||
IOCTL(SIOCGPGRP, IOC_R, MK_PTR(TYPE_INT)) /* pid_t */
|
||||
IOCTL(SIOCGSTAMP, IOC_R, MK_PTR(MK_STRUCT(STRUCT_timeval)))
|
||||
IOCTL(SIOCGSTAMPNS, IOC_R, MK_PTR(MK_STRUCT(STRUCT_timespec)))
|
||||
#endif
|
||||
|
||||
#ifdef TARGET_ABI_IRIX
|
||||
IOCTL_MAP(SIOCNREAD, FIONREAD, IOC_R, MK_PTR(TYPE_INT))
|
||||
IOCTL_MAP(SIOCNREAD, FIONREAD, IOC_R, MK_PTR(TYPE_INT))
|
||||
#endif
|
||||
|
||||
#if !defined TARGET_ABI_IRIX && !defined TARGET_ABI_SOLARIS
|
||||
|
|
|
@ -4,218 +4,218 @@
|
|||
#define TARGET_NR_Linux 1000
|
||||
|
||||
/* syscalls as per IRIX /usr/include/sys.s */
|
||||
#define TARGET_NR_syscall (0+TARGET_NR_Linux)
|
||||
#define TARGET_NR_exit (1+TARGET_NR_Linux)
|
||||
#define TARGET_NR_fork (2+TARGET_NR_Linux)
|
||||
#define TARGET_NR_read (3+TARGET_NR_Linux)
|
||||
#define TARGET_NR_write (4+TARGET_NR_Linux)
|
||||
#define TARGET_NR_open (5+TARGET_NR_Linux)
|
||||
#define TARGET_NR_close (6+TARGET_NR_Linux)
|
||||
#define TARGET_NR_creat (8+TARGET_NR_Linux)
|
||||
#define TARGET_NR_link (9+TARGET_NR_Linux)
|
||||
#define TARGET_NR_unlink (10+TARGET_NR_Linux)
|
||||
#define TARGET_NR_execv (11+TARGET_NR_Linux)
|
||||
#define TARGET_NR_chdir (12+TARGET_NR_Linux)
|
||||
#define TARGET_NR_time (13+TARGET_NR_Linux)
|
||||
#define TARGET_NR_chmod (15+TARGET_NR_Linux)
|
||||
#define TARGET_NR_chown (16+TARGET_NR_Linux)
|
||||
#define TARGET_NR_brk (17+TARGET_NR_Linux)
|
||||
#define TARGET_NR_stat (18+TARGET_NR_Linux)
|
||||
#define TARGET_NR_lseek (19+TARGET_NR_Linux)
|
||||
#define TARGET_NR_getpid (20+TARGET_NR_Linux)
|
||||
#define TARGET_NR_mount (21+TARGET_NR_Linux)
|
||||
#define TARGET_NR_umount (22+TARGET_NR_Linux)
|
||||
#define TARGET_NR_setuid (23+TARGET_NR_Linux)
|
||||
#define TARGET_NR_getuid (24+TARGET_NR_Linux)
|
||||
#define TARGET_NR_stime (25+TARGET_NR_Linux)
|
||||
#define TARGET_NR_ptrace (26+TARGET_NR_Linux)
|
||||
#define TARGET_NR_alarm (27+TARGET_NR_Linux)
|
||||
#define TARGET_NR_pause (29+TARGET_NR_Linux)
|
||||
#define TARGET_NR_utime (30+TARGET_NR_Linux)
|
||||
#define TARGET_NR_access (33+TARGET_NR_Linux)
|
||||
#define TARGET_NR_nice (34+TARGET_NR_Linux)
|
||||
#define TARGET_NR_statfs (35+TARGET_NR_Linux)
|
||||
#define TARGET_NR_sync (36+TARGET_NR_Linux)
|
||||
#define TARGET_NR_kill (37+TARGET_NR_Linux)
|
||||
#define TARGET_NR_fstatfs (38+TARGET_NR_Linux)
|
||||
#define TARGET_NR_pgrpsys (39+TARGET_NR_Linux)
|
||||
#define TARGET_NR_syssgi (40+TARGET_NR_Linux)
|
||||
#define TARGET_NR_dup (41+TARGET_NR_Linux)
|
||||
#define TARGET_NR_pipe (42+TARGET_NR_Linux)
|
||||
#define TARGET_NR_times (43+TARGET_NR_Linux)
|
||||
#define TARGET_NR_profil (44+TARGET_NR_Linux)
|
||||
#define TARGET_NR_plock (45+TARGET_NR_Linux)
|
||||
#define TARGET_NR_setgid (46+TARGET_NR_Linux)
|
||||
#define TARGET_NR_getgid (47+TARGET_NR_Linux)
|
||||
#define TARGET_NR_msgsys (49+TARGET_NR_Linux)
|
||||
#define TARGET_NR_sysmips (50+TARGET_NR_Linux)
|
||||
#define TARGET_NR_acct (51+TARGET_NR_Linux)
|
||||
#define TARGET_NR_shmsys (52+TARGET_NR_Linux)
|
||||
#define TARGET_NR_semsys (53+TARGET_NR_Linux)
|
||||
#define TARGET_NR_ioctl (54+TARGET_NR_Linux)
|
||||
#define TARGET_NR_uadmin (55+TARGET_NR_Linux)
|
||||
#define TARGET_NR_sysmp (56+TARGET_NR_Linux)
|
||||
#define TARGET_NR_utssyssgi (57+TARGET_NR_Linux)
|
||||
#define TARGET_NR_execve (59+TARGET_NR_Linux)
|
||||
#define TARGET_NR_umask (60+TARGET_NR_Linux)
|
||||
#define TARGET_NR_chroot (61+TARGET_NR_Linux)
|
||||
#define TARGET_NR_fcntl (62+TARGET_NR_Linux)
|
||||
#define TARGET_NR_ulimit (63+TARGET_NR_Linux)
|
||||
#define TARGET_NR_getrlimit64 (75+TARGET_NR_Linux)
|
||||
#define TARGET_NR_setrlimit64 (76+TARGET_NR_Linux)
|
||||
#define TARGET_NR_nanosleep (77+TARGET_NR_Linux)
|
||||
#define TARGET_NR_lseek64 (78+TARGET_NR_Linux)
|
||||
#define TARGET_NR_rmdir (79+TARGET_NR_Linux)
|
||||
#define TARGET_NR_mkdir (80+TARGET_NR_Linux)
|
||||
#define TARGET_NR_getdents (81+TARGET_NR_Linux)
|
||||
#define TARGET_NR_sginap (82+TARGET_NR_Linux)
|
||||
#define TARGET_NR_sgikopt (83+TARGET_NR_Linux)
|
||||
#define TARGET_NR_sysfs (84+TARGET_NR_Linux)
|
||||
#define TARGET_NR_getmsg (85+TARGET_NR_Linux)
|
||||
#define TARGET_NR_putmsg (86+TARGET_NR_Linux)
|
||||
#define TARGET_NR_poll (87+TARGET_NR_Linux)
|
||||
#define TARGET_NR_sigreturn (88+TARGET_NR_Linux)
|
||||
#define TARGET_NR_accept (89+TARGET_NR_Linux)
|
||||
#define TARGET_NR_bind (90+TARGET_NR_Linux)
|
||||
#define TARGET_NR_connect (91+TARGET_NR_Linux)
|
||||
#define TARGET_NR_gethostid (92+TARGET_NR_Linux)
|
||||
#define TARGET_NR_getpeername (93+TARGET_NR_Linux)
|
||||
#define TARGET_NR_getsockname (94+TARGET_NR_Linux)
|
||||
#define TARGET_NR_getsockopt (95+TARGET_NR_Linux)
|
||||
#define TARGET_NR_listen (96+TARGET_NR_Linux)
|
||||
#define TARGET_NR_recv (97+TARGET_NR_Linux)
|
||||
#define TARGET_NR_recvfrom (98+TARGET_NR_Linux)
|
||||
#define TARGET_NR_recvmsg (99+TARGET_NR_Linux)
|
||||
#define TARGET_NR_select (100+TARGET_NR_Linux)
|
||||
#define TARGET_NR_send (101+TARGET_NR_Linux)
|
||||
#define TARGET_NR_sendmsg (102+TARGET_NR_Linux)
|
||||
#define TARGET_NR_sendto (103+TARGET_NR_Linux)
|
||||
#define TARGET_NR_sethostid (104+TARGET_NR_Linux)
|
||||
#define TARGET_NR_setsockopt (105+TARGET_NR_Linux)
|
||||
#define TARGET_NR_shutdown (106+TARGET_NR_Linux)
|
||||
#define TARGET_NR_socket (107+TARGET_NR_Linux)
|
||||
#define TARGET_NR_gethostname (108+TARGET_NR_Linux)
|
||||
#define TARGET_NR_sethostname (109+TARGET_NR_Linux)
|
||||
#define TARGET_NR_getdomainname (110+TARGET_NR_Linux)
|
||||
#define TARGET_NR_setdomainname (111+TARGET_NR_Linux)
|
||||
#define TARGET_NR_truncate (112+TARGET_NR_Linux)
|
||||
#define TARGET_NR_ftruncate (113+TARGET_NR_Linux)
|
||||
#define TARGET_NR_rename (114+TARGET_NR_Linux)
|
||||
#define TARGET_NR_symlink (115+TARGET_NR_Linux)
|
||||
#define TARGET_NR_readlink (116+TARGET_NR_Linux)
|
||||
#define TARGET_NR_nfssvc (119+TARGET_NR_Linux)
|
||||
#define TARGET_NR_getfh (120+TARGET_NR_Linux)
|
||||
#define TARGET_NR_async_daemons (121+TARGET_NR_Linux)
|
||||
#define TARGET_NR_exportfs (122+TARGET_NR_Linux)
|
||||
#define TARGET_NR_setregid (123+TARGET_NR_Linux)
|
||||
#define TARGET_NR_setreuid (124+TARGET_NR_Linux)
|
||||
#define TARGET_NR_getitimer (125+TARGET_NR_Linux)
|
||||
#define TARGET_NR_setitimer (126+TARGET_NR_Linux)
|
||||
#define TARGET_NR_adjtime (127+TARGET_NR_Linux)
|
||||
#define TARGET_NR_gettimeofday (128+TARGET_NR_Linux)
|
||||
#define TARGET_NR_sproc (129+TARGET_NR_Linux)
|
||||
#define TARGET_NR_sgiprctl (130+TARGET_NR_Linux)
|
||||
#define TARGET_NR_procblk (131+TARGET_NR_Linux)
|
||||
#define TARGET_NR_sprocsp (132+TARGET_NR_Linux)
|
||||
#define TARGET_NR_mmap (134+TARGET_NR_Linux)
|
||||
#define TARGET_NR_munmap (135+TARGET_NR_Linux)
|
||||
#define TARGET_NR_mprotect (136+TARGET_NR_Linux)
|
||||
#define TARGET_NR_msync (137+TARGET_NR_Linux)
|
||||
#define TARGET_NR_madvise (138+TARGET_NR_Linux)
|
||||
#define TARGET_NR_pagelock (139+TARGET_NR_Linux)
|
||||
#define TARGET_NR_getpagesize (140+TARGET_NR_Linux)
|
||||
#define TARGET_NR_quotactl (141+TARGET_NR_Linux)
|
||||
#define TARGET_NR_getpgid (143+TARGET_NR_Linux)
|
||||
#define TARGET_NR_setpgid (144+TARGET_NR_Linux)
|
||||
#define TARGET_NR_vhangup (145+TARGET_NR_Linux)
|
||||
#define TARGET_NR_fsync (146+TARGET_NR_Linux)
|
||||
#define TARGET_NR_fchdir (147+TARGET_NR_Linux)
|
||||
#define TARGET_NR_getrlimit (148+TARGET_NR_Linux)
|
||||
#define TARGET_NR_setrlimit (149+TARGET_NR_Linux)
|
||||
#define TARGET_NR_cacheflush (150+TARGET_NR_Linux)
|
||||
#define TARGET_NR_cachectl (151+TARGET_NR_Linux)
|
||||
#define TARGET_NR_fchown (152+TARGET_NR_Linux)
|
||||
#define TARGET_NR_fchmod (153+TARGET_NR_Linux)
|
||||
#define TARGET_NR_socketpair (155+TARGET_NR_Linux)
|
||||
#define TARGET_NR_sysinfosgi (156+TARGET_NR_Linux)
|
||||
#define TARGET_NR_uname (157+TARGET_NR_Linux)
|
||||
#define TARGET_NR_xstat (158+TARGET_NR_Linux)
|
||||
#define TARGET_NR_lxstat (159+TARGET_NR_Linux)
|
||||
#define TARGET_NR_fxstat (160+TARGET_NR_Linux)
|
||||
#define TARGET_NR_xmknod (161+TARGET_NR_Linux)
|
||||
#define TARGET_NR_sigaction (162+TARGET_NR_Linux)
|
||||
#define TARGET_NR_sigpending (163+TARGET_NR_Linux)
|
||||
#define TARGET_NR_sigprocmask (164+TARGET_NR_Linux)
|
||||
#define TARGET_NR_sigsuspend (165+TARGET_NR_Linux)
|
||||
#define TARGET_NR_sigpoll (166+TARGET_NR_Linux)
|
||||
#define TARGET_NR_swapctl (167+TARGET_NR_Linux)
|
||||
#define TARGET_NR_getcontext (168+TARGET_NR_Linux)
|
||||
#define TARGET_NR_setcontext (169+TARGET_NR_Linux)
|
||||
#define TARGET_NR_waitid (170+TARGET_NR_Linux)
|
||||
#define TARGET_NR_sigstack (171+TARGET_NR_Linux)
|
||||
#define TARGET_NR_sigaltstack (172+TARGET_NR_Linux)
|
||||
#define TARGET_NR_sigsendset (173+TARGET_NR_Linux)
|
||||
#define TARGET_NR_statvfs (174+TARGET_NR_Linux)
|
||||
#define TARGET_NR_fstatvfs (175+TARGET_NR_Linux)
|
||||
#define TARGET_NR_getpmsg (176+TARGET_NR_Linux)
|
||||
#define TARGET_NR_putpmsg (177+TARGET_NR_Linux)
|
||||
#define TARGET_NR_lchown (178+TARGET_NR_Linux)
|
||||
#define TARGET_NR_priocntl (179+TARGET_NR_Linux)
|
||||
#define TARGET_NR_ksigqueue (180+TARGET_NR_Linux)
|
||||
#define TARGET_NR_readv (181+TARGET_NR_Linux)
|
||||
#define TARGET_NR_writev (182+TARGET_NR_Linux)
|
||||
#define TARGET_NR_truncate64 (183+TARGET_NR_Linux)
|
||||
#define TARGET_NR_ftruncate64 (184+TARGET_NR_Linux)
|
||||
#define TARGET_NR_mmap64 (185+TARGET_NR_Linux)
|
||||
#define TARGET_NR_dmi (186+TARGET_NR_Linux)
|
||||
#define TARGET_NR_pread64 (187+TARGET_NR_Linux)
|
||||
#define TARGET_NR_pwrite64 (188+TARGET_NR_Linux)
|
||||
#define TARGET_NR_fdatasync (189+TARGET_NR_Linux)
|
||||
#define TARGET_NR_sgifastpath (190+TARGET_NR_Linux)
|
||||
#define TARGET_NR_attr_get (191+TARGET_NR_Linux)
|
||||
#define TARGET_NR_attr_getf (192+TARGET_NR_Linux)
|
||||
#define TARGET_NR_attr_set (193+TARGET_NR_Linux)
|
||||
#define TARGET_NR_attr_setf (194+TARGET_NR_Linux)
|
||||
#define TARGET_NR_attr_remove (195+TARGET_NR_Linux)
|
||||
#define TARGET_NR_attr_removef (196+TARGET_NR_Linux)
|
||||
#define TARGET_NR_attr_list (197+TARGET_NR_Linux)
|
||||
#define TARGET_NR_attr_listf (198+TARGET_NR_Linux)
|
||||
#define TARGET_NR_attr_multi (199+TARGET_NR_Linux)
|
||||
#define TARGET_NR_attr_multif (200+TARGET_NR_Linux)
|
||||
#define TARGET_NR_statvfs64 (201+TARGET_NR_Linux)
|
||||
#define TARGET_NR_fstatvfs64 (202+TARGET_NR_Linux)
|
||||
#define TARGET_NR_getmountid (203+TARGET_NR_Linux)
|
||||
#define TARGET_NR_nsproc (204+TARGET_NR_Linux)
|
||||
#define TARGET_NR_getdents64 (205+TARGET_NR_Linux)
|
||||
#define TARGET_NR_afs_syscall (206+TARGET_NR_Linux)
|
||||
#define TARGET_NR_ngetdents (207+TARGET_NR_Linux)
|
||||
#define TARGET_NR_ngetdents64 (208+TARGET_NR_Linux)
|
||||
#define TARGET_NR_sgi_sesmgr (209+TARGET_NR_Linux)
|
||||
#define TARGET_NR_pidsprocsp (210+TARGET_NR_Linux)
|
||||
#define TARGET_NR_rexec (211+TARGET_NR_Linux)
|
||||
#define TARGET_NR_timer_create (212+TARGET_NR_Linux)
|
||||
#define TARGET_NR_timer_delete (213+TARGET_NR_Linux)
|
||||
#define TARGET_NR_timer_settime (214+TARGET_NR_Linux)
|
||||
#define TARGET_NR_timer_gettime (215+TARGET_NR_Linux)
|
||||
#define TARGET_NR_timer_getoverrun (216+TARGET_NR_Linux)
|
||||
#define TARGET_NR_sched_rr_get_interval (217+TARGET_NR_Linux)
|
||||
#define TARGET_NR_sched_yield (218+TARGET_NR_Linux)
|
||||
#define TARGET_NR_sched_getscheduler (219+TARGET_NR_Linux)
|
||||
#define TARGET_NR_sched_setscheduler (220+TARGET_NR_Linux)
|
||||
#define TARGET_NR_sched_getparam (221+TARGET_NR_Linux)
|
||||
#define TARGET_NR_sched_setparam (222+TARGET_NR_Linux)
|
||||
#define TARGET_NR_usync_cntl (223+TARGET_NR_Linux)
|
||||
#define TARGET_NR_psema_cntl (224+TARGET_NR_Linux)
|
||||
#define TARGET_NR_restartreturn (225+TARGET_NR_Linux)
|
||||
#define TARGET_NR_sysget (226+TARGET_NR_Linux)
|
||||
#define TARGET_NR_xpg4_recvmsg (227+TARGET_NR_Linux)
|
||||
#define TARGET_NR_umfscall (228+TARGET_NR_Linux)
|
||||
#define TARGET_NR_nsproctid (229+TARGET_NR_Linux)
|
||||
#define TARGET_NR_rexec_complete (230+TARGET_NR_Linux)
|
||||
#define TARGET_NR_xpg4_sigaltstack (231+TARGET_NR_Linux)
|
||||
#define TARGET_NR_xpg4_select (232+TARGET_NR_Linux)
|
||||
#define TARGET_NR_xpg4_setregid (233+TARGET_NR_Linux)
|
||||
#define TARGET_NR_linkfollow (234+TARGET_NR_Linux)
|
||||
#define TARGET_NR_syscall (0+TARGET_NR_Linux)
|
||||
#define TARGET_NR_exit (1+TARGET_NR_Linux)
|
||||
#define TARGET_NR_fork (2+TARGET_NR_Linux)
|
||||
#define TARGET_NR_read (3+TARGET_NR_Linux)
|
||||
#define TARGET_NR_write (4+TARGET_NR_Linux)
|
||||
#define TARGET_NR_open (5+TARGET_NR_Linux)
|
||||
#define TARGET_NR_close (6+TARGET_NR_Linux)
|
||||
#define TARGET_NR_creat (8+TARGET_NR_Linux)
|
||||
#define TARGET_NR_link (9+TARGET_NR_Linux)
|
||||
#define TARGET_NR_unlink (10+TARGET_NR_Linux)
|
||||
#define TARGET_NR_execv (11+TARGET_NR_Linux)
|
||||
#define TARGET_NR_chdir (12+TARGET_NR_Linux)
|
||||
#define TARGET_NR_time (13+TARGET_NR_Linux)
|
||||
#define TARGET_NR_chmod (15+TARGET_NR_Linux)
|
||||
#define TARGET_NR_chown (16+TARGET_NR_Linux)
|
||||
#define TARGET_NR_brk (17+TARGET_NR_Linux)
|
||||
#define TARGET_NR_stat (18+TARGET_NR_Linux)
|
||||
#define TARGET_NR_lseek (19+TARGET_NR_Linux)
|
||||
#define TARGET_NR_getpid (20+TARGET_NR_Linux)
|
||||
#define TARGET_NR_mount (21+TARGET_NR_Linux)
|
||||
#define TARGET_NR_umount (22+TARGET_NR_Linux)
|
||||
#define TARGET_NR_setuid (23+TARGET_NR_Linux)
|
||||
#define TARGET_NR_getuid (24+TARGET_NR_Linux)
|
||||
#define TARGET_NR_stime (25+TARGET_NR_Linux)
|
||||
#define TARGET_NR_ptrace (26+TARGET_NR_Linux)
|
||||
#define TARGET_NR_alarm (27+TARGET_NR_Linux)
|
||||
#define TARGET_NR_pause (29+TARGET_NR_Linux)
|
||||
#define TARGET_NR_utime (30+TARGET_NR_Linux)
|
||||
#define TARGET_NR_access (33+TARGET_NR_Linux)
|
||||
#define TARGET_NR_nice (34+TARGET_NR_Linux)
|
||||
#define TARGET_NR_statfs (35+TARGET_NR_Linux)
|
||||
#define TARGET_NR_sync (36+TARGET_NR_Linux)
|
||||
#define TARGET_NR_kill (37+TARGET_NR_Linux)
|
||||
#define TARGET_NR_fstatfs (38+TARGET_NR_Linux)
|
||||
#define TARGET_NR_pgrpsys (39+TARGET_NR_Linux)
|
||||
#define TARGET_NR_syssgi (40+TARGET_NR_Linux)
|
||||
#define TARGET_NR_dup (41+TARGET_NR_Linux)
|
||||
#define TARGET_NR_pipe (42+TARGET_NR_Linux)
|
||||
#define TARGET_NR_times (43+TARGET_NR_Linux)
|
||||
#define TARGET_NR_profil (44+TARGET_NR_Linux)
|
||||
#define TARGET_NR_plock (45+TARGET_NR_Linux)
|
||||
#define TARGET_NR_setgid (46+TARGET_NR_Linux)
|
||||
#define TARGET_NR_getgid (47+TARGET_NR_Linux)
|
||||
#define TARGET_NR_msgsys (49+TARGET_NR_Linux)
|
||||
#define TARGET_NR_sysmips (50+TARGET_NR_Linux)
|
||||
#define TARGET_NR_acct (51+TARGET_NR_Linux)
|
||||
#define TARGET_NR_shmsys (52+TARGET_NR_Linux)
|
||||
#define TARGET_NR_semsys (53+TARGET_NR_Linux)
|
||||
#define TARGET_NR_ioctl (54+TARGET_NR_Linux)
|
||||
#define TARGET_NR_uadmin (55+TARGET_NR_Linux)
|
||||
#define TARGET_NR_sysmp (56+TARGET_NR_Linux)
|
||||
#define TARGET_NR_utssyssgi (57+TARGET_NR_Linux)
|
||||
#define TARGET_NR_execve (59+TARGET_NR_Linux)
|
||||
#define TARGET_NR_umask (60+TARGET_NR_Linux)
|
||||
#define TARGET_NR_chroot (61+TARGET_NR_Linux)
|
||||
#define TARGET_NR_fcntl (62+TARGET_NR_Linux)
|
||||
#define TARGET_NR_ulimit (63+TARGET_NR_Linux)
|
||||
#define TARGET_NR_getrlimit64 (75+TARGET_NR_Linux)
|
||||
#define TARGET_NR_setrlimit64 (76+TARGET_NR_Linux)
|
||||
#define TARGET_NR_nanosleep (77+TARGET_NR_Linux)
|
||||
#define TARGET_NR_lseek64 (78+TARGET_NR_Linux)
|
||||
#define TARGET_NR_rmdir (79+TARGET_NR_Linux)
|
||||
#define TARGET_NR_mkdir (80+TARGET_NR_Linux)
|
||||
#define TARGET_NR_getdents (81+TARGET_NR_Linux)
|
||||
#define TARGET_NR_sginap (82+TARGET_NR_Linux)
|
||||
#define TARGET_NR_sgikopt (83+TARGET_NR_Linux)
|
||||
#define TARGET_NR_sysfs (84+TARGET_NR_Linux)
|
||||
#define TARGET_NR_getmsg (85+TARGET_NR_Linux)
|
||||
#define TARGET_NR_putmsg (86+TARGET_NR_Linux)
|
||||
#define TARGET_NR_poll (87+TARGET_NR_Linux)
|
||||
#define TARGET_NR_sigreturn (88+TARGET_NR_Linux)
|
||||
#define TARGET_NR_accept (89+TARGET_NR_Linux)
|
||||
#define TARGET_NR_bind (90+TARGET_NR_Linux)
|
||||
#define TARGET_NR_connect (91+TARGET_NR_Linux)
|
||||
#define TARGET_NR_gethostid (92+TARGET_NR_Linux)
|
||||
#define TARGET_NR_getpeername (93+TARGET_NR_Linux)
|
||||
#define TARGET_NR_getsockname (94+TARGET_NR_Linux)
|
||||
#define TARGET_NR_getsockopt (95+TARGET_NR_Linux)
|
||||
#define TARGET_NR_listen (96+TARGET_NR_Linux)
|
||||
#define TARGET_NR_recv (97+TARGET_NR_Linux)
|
||||
#define TARGET_NR_recvfrom (98+TARGET_NR_Linux)
|
||||
#define TARGET_NR_recvmsg (99+TARGET_NR_Linux)
|
||||
#define TARGET_NR_select (100+TARGET_NR_Linux)
|
||||
#define TARGET_NR_send (101+TARGET_NR_Linux)
|
||||
#define TARGET_NR_sendmsg (102+TARGET_NR_Linux)
|
||||
#define TARGET_NR_sendto (103+TARGET_NR_Linux)
|
||||
#define TARGET_NR_sethostid (104+TARGET_NR_Linux)
|
||||
#define TARGET_NR_setsockopt (105+TARGET_NR_Linux)
|
||||
#define TARGET_NR_shutdown (106+TARGET_NR_Linux)
|
||||
#define TARGET_NR_socket (107+TARGET_NR_Linux)
|
||||
#define TARGET_NR_gethostname (108+TARGET_NR_Linux)
|
||||
#define TARGET_NR_sethostname (109+TARGET_NR_Linux)
|
||||
#define TARGET_NR_getdomainname (110+TARGET_NR_Linux)
|
||||
#define TARGET_NR_setdomainname (111+TARGET_NR_Linux)
|
||||
#define TARGET_NR_truncate (112+TARGET_NR_Linux)
|
||||
#define TARGET_NR_ftruncate (113+TARGET_NR_Linux)
|
||||
#define TARGET_NR_rename (114+TARGET_NR_Linux)
|
||||
#define TARGET_NR_symlink (115+TARGET_NR_Linux)
|
||||
#define TARGET_NR_readlink (116+TARGET_NR_Linux)
|
||||
#define TARGET_NR_nfssvc (119+TARGET_NR_Linux)
|
||||
#define TARGET_NR_getfh (120+TARGET_NR_Linux)
|
||||
#define TARGET_NR_async_daemons (121+TARGET_NR_Linux)
|
||||
#define TARGET_NR_exportfs (122+TARGET_NR_Linux)
|
||||
#define TARGET_NR_setregid (123+TARGET_NR_Linux)
|
||||
#define TARGET_NR_setreuid (124+TARGET_NR_Linux)
|
||||
#define TARGET_NR_getitimer (125+TARGET_NR_Linux)
|
||||
#define TARGET_NR_setitimer (126+TARGET_NR_Linux)
|
||||
#define TARGET_NR_adjtime (127+TARGET_NR_Linux)
|
||||
#define TARGET_NR_gettimeofday (128+TARGET_NR_Linux)
|
||||
#define TARGET_NR_sproc (129+TARGET_NR_Linux)
|
||||
#define TARGET_NR_sgiprctl (130+TARGET_NR_Linux)
|
||||
#define TARGET_NR_procblk (131+TARGET_NR_Linux)
|
||||
#define TARGET_NR_sprocsp (132+TARGET_NR_Linux)
|
||||
#define TARGET_NR_mmap (134+TARGET_NR_Linux)
|
||||
#define TARGET_NR_munmap (135+TARGET_NR_Linux)
|
||||
#define TARGET_NR_mprotect (136+TARGET_NR_Linux)
|
||||
#define TARGET_NR_msync (137+TARGET_NR_Linux)
|
||||
#define TARGET_NR_madvise (138+TARGET_NR_Linux)
|
||||
#define TARGET_NR_pagelock (139+TARGET_NR_Linux)
|
||||
#define TARGET_NR_getpagesize (140+TARGET_NR_Linux)
|
||||
#define TARGET_NR_quotactl (141+TARGET_NR_Linux)
|
||||
#define TARGET_NR_getpgid (143+TARGET_NR_Linux)
|
||||
#define TARGET_NR_setpgid (144+TARGET_NR_Linux)
|
||||
#define TARGET_NR_vhangup (145+TARGET_NR_Linux)
|
||||
#define TARGET_NR_fsync (146+TARGET_NR_Linux)
|
||||
#define TARGET_NR_fchdir (147+TARGET_NR_Linux)
|
||||
#define TARGET_NR_getrlimit (148+TARGET_NR_Linux)
|
||||
#define TARGET_NR_setrlimit (149+TARGET_NR_Linux)
|
||||
#define TARGET_NR_cacheflush (150+TARGET_NR_Linux)
|
||||
#define TARGET_NR_cachectl (151+TARGET_NR_Linux)
|
||||
#define TARGET_NR_fchown (152+TARGET_NR_Linux)
|
||||
#define TARGET_NR_fchmod (153+TARGET_NR_Linux)
|
||||
#define TARGET_NR_socketpair (155+TARGET_NR_Linux)
|
||||
#define TARGET_NR_sysinfosgi (156+TARGET_NR_Linux)
|
||||
#define TARGET_NR_uname (157+TARGET_NR_Linux)
|
||||
#define TARGET_NR_xstat (158+TARGET_NR_Linux)
|
||||
#define TARGET_NR_lxstat (159+TARGET_NR_Linux)
|
||||
#define TARGET_NR_fxstat (160+TARGET_NR_Linux)
|
||||
#define TARGET_NR_xmknod (161+TARGET_NR_Linux)
|
||||
#define TARGET_NR_sigaction (162+TARGET_NR_Linux)
|
||||
#define TARGET_NR_sigpending (163+TARGET_NR_Linux)
|
||||
#define TARGET_NR_sigprocmask (164+TARGET_NR_Linux)
|
||||
#define TARGET_NR_sigsuspend (165+TARGET_NR_Linux)
|
||||
#define TARGET_NR_sigpoll (166+TARGET_NR_Linux)
|
||||
#define TARGET_NR_swapctl (167+TARGET_NR_Linux)
|
||||
#define TARGET_NR_getcontext (168+TARGET_NR_Linux)
|
||||
#define TARGET_NR_setcontext (169+TARGET_NR_Linux)
|
||||
#define TARGET_NR_waitid (170+TARGET_NR_Linux)
|
||||
#define TARGET_NR_sigstack (171+TARGET_NR_Linux)
|
||||
#define TARGET_NR_sigaltstack (172+TARGET_NR_Linux)
|
||||
#define TARGET_NR_sigsendset (173+TARGET_NR_Linux)
|
||||
#define TARGET_NR_statvfs (174+TARGET_NR_Linux)
|
||||
#define TARGET_NR_fstatvfs (175+TARGET_NR_Linux)
|
||||
#define TARGET_NR_getpmsg (176+TARGET_NR_Linux)
|
||||
#define TARGET_NR_putpmsg (177+TARGET_NR_Linux)
|
||||
#define TARGET_NR_lchown (178+TARGET_NR_Linux)
|
||||
#define TARGET_NR_priocntl (179+TARGET_NR_Linux)
|
||||
#define TARGET_NR_ksigqueue (180+TARGET_NR_Linux)
|
||||
#define TARGET_NR_readv (181+TARGET_NR_Linux)
|
||||
#define TARGET_NR_writev (182+TARGET_NR_Linux)
|
||||
#define TARGET_NR_truncate64 (183+TARGET_NR_Linux)
|
||||
#define TARGET_NR_ftruncate64 (184+TARGET_NR_Linux)
|
||||
#define TARGET_NR_mmap64 (185+TARGET_NR_Linux)
|
||||
#define TARGET_NR_dmi (186+TARGET_NR_Linux)
|
||||
#define TARGET_NR_pread64 (187+TARGET_NR_Linux)
|
||||
#define TARGET_NR_pwrite64 (188+TARGET_NR_Linux)
|
||||
#define TARGET_NR_fdatasync (189+TARGET_NR_Linux)
|
||||
#define TARGET_NR_sgifastpath (190+TARGET_NR_Linux)
|
||||
#define TARGET_NR_attr_get (191+TARGET_NR_Linux)
|
||||
#define TARGET_NR_attr_getf (192+TARGET_NR_Linux)
|
||||
#define TARGET_NR_attr_set (193+TARGET_NR_Linux)
|
||||
#define TARGET_NR_attr_setf (194+TARGET_NR_Linux)
|
||||
#define TARGET_NR_attr_remove (195+TARGET_NR_Linux)
|
||||
#define TARGET_NR_attr_removef (196+TARGET_NR_Linux)
|
||||
#define TARGET_NR_attr_list (197+TARGET_NR_Linux)
|
||||
#define TARGET_NR_attr_listf (198+TARGET_NR_Linux)
|
||||
#define TARGET_NR_attr_multi (199+TARGET_NR_Linux)
|
||||
#define TARGET_NR_attr_multif (200+TARGET_NR_Linux)
|
||||
#define TARGET_NR_statvfs64 (201+TARGET_NR_Linux)
|
||||
#define TARGET_NR_fstatvfs64 (202+TARGET_NR_Linux)
|
||||
#define TARGET_NR_getmountid (203+TARGET_NR_Linux)
|
||||
#define TARGET_NR_nsproc (204+TARGET_NR_Linux)
|
||||
#define TARGET_NR_getdents64 (205+TARGET_NR_Linux)
|
||||
#define TARGET_NR_afs_syscall (206+TARGET_NR_Linux)
|
||||
#define TARGET_NR_ngetdents (207+TARGET_NR_Linux)
|
||||
#define TARGET_NR_ngetdents64 (208+TARGET_NR_Linux)
|
||||
#define TARGET_NR_sgi_sesmgr (209+TARGET_NR_Linux)
|
||||
#define TARGET_NR_pidsprocsp (210+TARGET_NR_Linux)
|
||||
#define TARGET_NR_rexec (211+TARGET_NR_Linux)
|
||||
#define TARGET_NR_timer_create (212+TARGET_NR_Linux)
|
||||
#define TARGET_NR_timer_delete (213+TARGET_NR_Linux)
|
||||
#define TARGET_NR_timer_settime (214+TARGET_NR_Linux)
|
||||
#define TARGET_NR_timer_gettime (215+TARGET_NR_Linux)
|
||||
#define TARGET_NR_timer_getoverrun (216+TARGET_NR_Linux)
|
||||
#define TARGET_NR_sched_rr_get_interval (217+TARGET_NR_Linux)
|
||||
#define TARGET_NR_sched_yield (218+TARGET_NR_Linux)
|
||||
#define TARGET_NR_sched_getscheduler (219+TARGET_NR_Linux)
|
||||
#define TARGET_NR_sched_setscheduler (220+TARGET_NR_Linux)
|
||||
#define TARGET_NR_sched_getparam (221+TARGET_NR_Linux)
|
||||
#define TARGET_NR_sched_setparam (222+TARGET_NR_Linux)
|
||||
#define TARGET_NR_usync_cntl (223+TARGET_NR_Linux)
|
||||
#define TARGET_NR_psema_cntl (224+TARGET_NR_Linux)
|
||||
#define TARGET_NR_restartreturn (225+TARGET_NR_Linux)
|
||||
#define TARGET_NR_sysget (226+TARGET_NR_Linux)
|
||||
#define TARGET_NR_xpg4_recvmsg (227+TARGET_NR_Linux)
|
||||
#define TARGET_NR_umfscall (228+TARGET_NR_Linux)
|
||||
#define TARGET_NR_nsproctid (229+TARGET_NR_Linux)
|
||||
#define TARGET_NR_rexec_complete (230+TARGET_NR_Linux)
|
||||
#define TARGET_NR_xpg4_sigaltstack (231+TARGET_NR_Linux)
|
||||
#define TARGET_NR_xpg4_select (232+TARGET_NR_Linux)
|
||||
#define TARGET_NR_xpg4_setregid (233+TARGET_NR_Linux)
|
||||
#define TARGET_NR_linkfollow (234+TARGET_NR_Linux)
|
||||
|
||||
|
||||
/* msgsys(cmd, ...), same as solaris... */
|
||||
|
@ -244,63 +244,63 @@
|
|||
|
||||
|
||||
/* syssgi(cmd, ...) */
|
||||
#define TARGET_NR_syssgi_setsid (20)
|
||||
#define TARGET_NR_syssgi_setpgid (21)
|
||||
#define TARGET_NR_syssgi_sysconf (22)
|
||||
#define TARGET_NR_syssgi_pathconf (23)
|
||||
#define TARGET_NR_syssgi_setgroups (40)
|
||||
#define TARGET_NR_syssgi_getgroups (41)
|
||||
#define TARGET_NR_syssgi_settimeofday (52)
|
||||
#define TARGET_NR_syssgi_rusage (56)
|
||||
#define TARGET_NR_syssgi_sigaltstack (60)
|
||||
#define TARGET_NR_syssgi_getpgid (64)
|
||||
#define TARGET_NR_syssgi_getsid (65)
|
||||
#define TARGET_NR_syssgi_setsid (20)
|
||||
#define TARGET_NR_syssgi_setpgid (21)
|
||||
#define TARGET_NR_syssgi_sysconf (22)
|
||||
#define TARGET_NR_syssgi_pathconf (23)
|
||||
#define TARGET_NR_syssgi_setgroups (40)
|
||||
#define TARGET_NR_syssgi_getgroups (41)
|
||||
#define TARGET_NR_syssgi_settimeofday (52)
|
||||
#define TARGET_NR_syssgi_rusage (56)
|
||||
#define TARGET_NR_syssgi_sigaltstack (60)
|
||||
#define TARGET_NR_syssgi_getpgid (64)
|
||||
#define TARGET_NR_syssgi_getsid (65)
|
||||
/* SGI specific syssgi calls */
|
||||
#define TARGET_NR_syssgi_sysid (1)
|
||||
#define TARGET_NR_syssgi_elfmap (68)
|
||||
#define TARGET_NR_syssgi_getprocattr (85)
|
||||
#define TARGET_NR_syssgi_rldenv (92)
|
||||
#define TARGET_NR_syssgi_tosstsave (108)
|
||||
#define TARGET_NR_syssgi_fdhi (109)
|
||||
#define TARGET_NR_syssgi_fpbcopy (129)
|
||||
#define TARGET_NR_syssgi_getust (130)
|
||||
#define TARGET_NR_syssgi_sysid (1)
|
||||
#define TARGET_NR_syssgi_elfmap (68)
|
||||
#define TARGET_NR_syssgi_getprocattr (85)
|
||||
#define TARGET_NR_syssgi_rldenv (92)
|
||||
#define TARGET_NR_syssgi_tosstsave (108)
|
||||
#define TARGET_NR_syssgi_fdhi (109)
|
||||
#define TARGET_NR_syssgi_fpbcopy (129)
|
||||
#define TARGET_NR_syssgi_getust (130)
|
||||
|
||||
|
||||
/* syssgi(sysconf, cmd, ...) */
|
||||
#define TARGET_NR_sysconf_childmax (2)
|
||||
#define TARGET_NR_sysconf_clktick (3)
|
||||
#define TARGET_NR_sysconf_openmax (5)
|
||||
#define TARGET_NR_sysconf_pagesize (11)
|
||||
#define TARGET_NR_sysconf_nprocs (14)
|
||||
#define TARGET_NR_sysconf_acl (25)
|
||||
#define TARGET_NR_sysconf_mac (28)
|
||||
#define TARGET_NR_sysconf_cap (29)
|
||||
#define TARGET_NR_sysconf_childmax (2)
|
||||
#define TARGET_NR_sysconf_clktick (3)
|
||||
#define TARGET_NR_sysconf_openmax (5)
|
||||
#define TARGET_NR_sysconf_pagesize (11)
|
||||
#define TARGET_NR_sysconf_nprocs (14)
|
||||
#define TARGET_NR_sysconf_acl (25)
|
||||
#define TARGET_NR_sysconf_mac (28)
|
||||
#define TARGET_NR_sysconf_cap (29)
|
||||
|
||||
|
||||
/* sysmp(cmd, ...) */
|
||||
#define TARGET_NR_sysmp_nprocs (1)
|
||||
#define TARGET_NR_sysmp_naprocs (2)
|
||||
#define TARGET_NR_sysmp_pgsize (14)
|
||||
#define TARGET_NR_sysmp_nprocs (1)
|
||||
#define TARGET_NR_sysmp_naprocs (2)
|
||||
#define TARGET_NR_sysmp_pgsize (14)
|
||||
|
||||
|
||||
/* prctl(cmd, ...) */
|
||||
#define TARGET_NR_prctl_isblocked (2)
|
||||
#define TARGET_NR_prctl_maxpprocs (5)
|
||||
#define TARGET_NR_prctl_unblkonexec (6)
|
||||
#define TARGET_NR_prctl_setexitsig (8)
|
||||
#define TARGET_NR_prctl_termchild (12)
|
||||
#define TARGET_NR_prctl_getnshare (14)
|
||||
#define TARGET_NR_prctl_initthreads (20)
|
||||
#define TARGET_NR_prctl_threadctl (21)
|
||||
#define TARGET_NR_prctl_lastshexit (22)
|
||||
#define TARGET_NR_prctl_isblocked (2)
|
||||
#define TARGET_NR_prctl_maxpprocs (5)
|
||||
#define TARGET_NR_prctl_unblkonexec (6)
|
||||
#define TARGET_NR_prctl_setexitsig (8)
|
||||
#define TARGET_NR_prctl_termchild (12)
|
||||
#define TARGET_NR_prctl_getnshare (14)
|
||||
#define TARGET_NR_prctl_initthreads (20)
|
||||
#define TARGET_NR_prctl_threadctl (21)
|
||||
#define TARGET_NR_prctl_lastshexit (22)
|
||||
|
||||
|
||||
/* prctl(TARGET_NR_prctl_threadctl, cmd, ...) */
|
||||
#define TARGET_NR_prctl_thread_exit (1)
|
||||
#define TARGET_NR_prctl_thread_block (2)
|
||||
#define TARGET_NR_prctl_thread_unblock (3)
|
||||
#define TARGET_NR_prctl_thread_kill (4)
|
||||
#define TARGET_NR_prctl_thread_sched (5)
|
||||
#define TARGET_NR_prctl_thread_exit (1)
|
||||
#define TARGET_NR_prctl_thread_block (2)
|
||||
#define TARGET_NR_prctl_thread_unblock (3)
|
||||
#define TARGET_NR_prctl_thread_kill (4)
|
||||
#define TARGET_NR_prctl_thread_sched (5)
|
||||
|
||||
|
||||
/* procblk(cmd, ...) */
|
||||
|
@ -334,23 +334,23 @@
|
|||
|
||||
|
||||
/* swapctl(cmd, arg) */
|
||||
#define TARGET_NR_swapctl_getfree (103)
|
||||
#define TARGET_NR_swapctl_getfree (103)
|
||||
|
||||
|
||||
/* sysinfosgi(cmd, buf, size) */
|
||||
#define TARGET_NR_sysinfo_gethostname 2
|
||||
#define TARGET_NR_sysinfo_sethostname 258
|
||||
#define TARGET_NR_sysinfo_getsrpcdomain 9
|
||||
#define TARGET_NR_sysinfo_setsrpcdomain 265
|
||||
#define TARGET_NR_sysinfo_sysname 1
|
||||
#define TARGET_NR_sysinfo_release 3
|
||||
#define TARGET_NR_sysinfo_version 4
|
||||
#define TARGET_NR_sysinfo_machine 5
|
||||
#define TARGET_NR_sysinfo_cpuarch 6
|
||||
#define TARGET_NR_sysinfo_hwserial 7
|
||||
#define TARGET_NR_sysinfo_hwproducer 8
|
||||
#define TARGET_NR_sysinfo_processors 109
|
||||
#define TARGET_NR_sysinfo_gethostname 2
|
||||
#define TARGET_NR_sysinfo_sethostname 258
|
||||
#define TARGET_NR_sysinfo_getsrpcdomain 9
|
||||
#define TARGET_NR_sysinfo_setsrpcdomain 265
|
||||
#define TARGET_NR_sysinfo_sysname 1
|
||||
#define TARGET_NR_sysinfo_release 3
|
||||
#define TARGET_NR_sysinfo_version 4
|
||||
#define TARGET_NR_sysinfo_machine 5
|
||||
#define TARGET_NR_sysinfo_cpuarch 6
|
||||
#define TARGET_NR_sysinfo_hwserial 7
|
||||
#define TARGET_NR_sysinfo_hwproducer 8
|
||||
#define TARGET_NR_sysinfo_processors 109
|
||||
|
||||
|
||||
/* utssyssgi(obuf, ibuf, cmd) */
|
||||
#define TARGET_NR_utssys_uname (0)
|
||||
#define TARGET_NR_utssys_uname (0)
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
/* Irix resource limit values from sys/resource.h
|
||||
* included in syscall_defs.h
|
||||
* */
|
||||
|
||||
#define TARGET_RLIMIT_CPU 0 /* cpu time in milliseconds */
|
||||
#define TARGET_RLIMIT_FSIZE 1 /* maximum file size */
|
||||
#define TARGET_RLIMIT_DATA 2 /* data size */
|
||||
#define TARGET_RLIMIT_STACK 3 /* stack size */
|
||||
#define TARGET_RLIMIT_CORE 4 /* core file size */
|
||||
#define TARGET_RLIMIT_NOFILE 5 /* file descriptors */
|
||||
#define TARGET_RLIMIT_VMEM 6 /* maximum mapped memory */
|
||||
#define TARGET_RLIMIT_RSS 7 /* resident set size */
|
||||
#define TARGET_RLIMIT_AS TARGET_RLIMIT_VMEM
|
||||
|
||||
#define TARGETRLIM_NLIMITS 8 /* number of resource limits */
|
||||
|
||||
// TODO: set these according to bits in long (32 vs 64)?
|
||||
#define TARGET_RLIM_INFINITY 0x7fffffff
|
||||
#define TARGET_RLIM64_INFINITY 0x7fffffffffffffffull
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef IRIX_TARGET_SYSCALL_H
|
||||
#define IRIX_TARGET_SYSCALL_H
|
||||
|
||||
#include "cpu.h"
|
||||
|
||||
/* this struct defines the way the registers are stored on the
|
||||
stack during a system call. */
|
||||
|
||||
|
@ -27,4 +29,30 @@ static inline abi_ulong target_shmlba(CPUMIPSState *env)
|
|||
return 0x40000;
|
||||
}
|
||||
|
||||
/* IRIX sys/types.h */
|
||||
typedef uint32_t target_ino_t;
|
||||
typedef abi_long target_off_t;
|
||||
|
||||
/* IRIX sys/dirent.h */
|
||||
struct target_dirent {
|
||||
target_ino_t d_ino;
|
||||
target_off_t d_off;
|
||||
abi_ushort d_reclen;
|
||||
char d_name[1];
|
||||
};
|
||||
/* size of struct target_dirent without the name array */
|
||||
#define target_dirent_len (offsetof(struct target_dirent, d_name));
|
||||
|
||||
/* IRIX sys/types.h */
|
||||
typedef uint64_t target_ino64_t;
|
||||
typedef uint64_t target_off64_t;
|
||||
|
||||
/* IRIX sys/dirent.h */
|
||||
struct target_dirent64 {
|
||||
target_ino64_t d_ino;
|
||||
target_off64_t d_off;
|
||||
abi_ushort d_reclen;
|
||||
char d_name[1];
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -14,6 +14,13 @@ struct target_termios {
|
|||
unsigned char c_cc[TARGET_NCCS]; /* control characters */
|
||||
};
|
||||
|
||||
struct target_winsize {
|
||||
abi_ushort ws_row; /* rows, in characters*/
|
||||
abi_ushort ws_col; /* columns, in character */
|
||||
abi_ushort ws_xpixel; /* horizontal size, pixels */
|
||||
abi_ushort ws_ypixel; /* vertical size, pixels */
|
||||
};
|
||||
|
||||
/* c_iflag bits */
|
||||
#define TARGET_IGNBRK 0000001
|
||||
#define TARGET_BRKINT 0000002
|
||||
|
@ -199,8 +206,8 @@ struct target_termios {
|
|||
#define TARGET_TIOCPKT_NOSTOP 0x10 /* no more ^S, ^Q */
|
||||
#define TARGET_TIOCPKT_DOSTOP 0x20 /* now do ^S ^Q */
|
||||
/* #define TIOCPKT_IOCTL 0x40 state change of pty driver */
|
||||
#define TARGET_TIOCSWINSZ TARGET_IOW('t', 103, struct winsize) /* set window size */
|
||||
#define TARGET_TIOCGWINSZ TARGET_IOR('t', 104, struct winsize) /* get window size */
|
||||
#define TARGET_TIOCSWINSZ TARGET_IOW('t', 103, struct target_winsize) /* set window size */
|
||||
#define TARGET_TIOCGWINSZ TARGET_IOR('t', 104, struct target_winsize) /* get window size */
|
||||
#define TARGET_TIOCNOTTY 0x5471 /* void tty association */
|
||||
#define TARGET_TIOCSETD 0x7401
|
||||
#define TARGET_TIOCGETD 0x7400
|
||||
|
|
3529
darwin-user/main.c
3529
darwin-user/main.c
File diff suppressed because it is too large
Load Diff
|
@ -500,7 +500,7 @@ static inline int access_ok(int type, abi_ulong addr, abi_ulong size)
|
|||
((hptr), (x)), (void)0)
|
||||
|
||||
#define __get_user_e(x, hptr, e) \
|
||||
((x) = (typeof(*hptr))( \
|
||||
((x) = (__typeof__(*(hptr)))( \
|
||||
__builtin_choose_expr(sizeof(*(hptr)) == 1, ldub_p, \
|
||||
__builtin_choose_expr(sizeof(*(hptr)) == 2, lduw_##e##_p, \
|
||||
__builtin_choose_expr(sizeof(*(hptr)) == 4, ldl_##e##_p, \
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -32,18 +32,18 @@
|
|||
#define TARGET_SYS_RECVMMSG 19 /* recvmmsg() */
|
||||
#define TARGET_SYS_SENDMMSG 20 /* sendmmsg() */
|
||||
|
||||
#define IPCOP_semop 1
|
||||
#define IPCOP_semget 2
|
||||
#define IPCOP_semctl 3
|
||||
#define IPCOP_semtimedop 4
|
||||
#define IPCOP_msgsnd 11
|
||||
#define IPCOP_msgrcv 12
|
||||
#define IPCOP_msgget 13
|
||||
#define IPCOP_msgctl 14
|
||||
#define IPCOP_shmat 21
|
||||
#define IPCOP_shmdt 22
|
||||
#define IPCOP_shmget 23
|
||||
#define IPCOP_shmctl 24
|
||||
#define IPCOP_semop 1
|
||||
#define IPCOP_semget 2
|
||||
#define IPCOP_semctl 3
|
||||
#define IPCOP_semtimedop 4
|
||||
#define IPCOP_msgsnd 11
|
||||
#define IPCOP_msgrcv 12
|
||||
#define IPCOP_msgget 13
|
||||
#define IPCOP_msgctl 14
|
||||
#define IPCOP_shmat 21
|
||||
#define IPCOP_shmdt 22
|
||||
#define IPCOP_shmget 23
|
||||
#define IPCOP_shmctl 24
|
||||
|
||||
/*
|
||||
* The following is for compatibility across the various Linux
|
||||
|
@ -389,23 +389,6 @@ struct kernel_statfs {
|
|||
int f_spare[6];
|
||||
};
|
||||
|
||||
struct target_dirent {
|
||||
abi_long d_ino;
|
||||
abi_long d_off;
|
||||
unsigned short d_reclen;
|
||||
char d_name[];
|
||||
};
|
||||
|
||||
struct target_dirent64 {
|
||||
uint64_t d_ino;
|
||||
int64_t d_off;
|
||||
unsigned short d_reclen;
|
||||
#if !defined TARGET_ABI_IRIX && !defined TARGET_ABI_SOLARIS
|
||||
unsigned char d_type;
|
||||
#endif
|
||||
char d_name[256];
|
||||
};
|
||||
|
||||
|
||||
/* mostly generic signal stuff */
|
||||
#define TARGET_SIG_DFL ((abi_long)0) /* default signal handling */
|
||||
|
@ -1004,54 +987,56 @@ struct target_rlimit {
|
|||
abi_ulong rlim_max;
|
||||
};
|
||||
|
||||
#if defined(TARGET_ALPHA)
|
||||
#define TARGET_RLIM_INFINITY 0x7fffffffffffffffull
|
||||
#elif defined(TARGET_MIPS) || (defined(TARGET_SPARC) && TARGET_ABI_BITS == 32)
|
||||
#define TARGET_RLIM_INFINITY 0x7fffffffUL
|
||||
#define TARGET_RLIM64_INFINITY 0x7fffffffffffffffull
|
||||
#else
|
||||
#define TARGET_RLIM_INFINITY ((abi_ulong)-1)
|
||||
#define TARGET_RLIM64_INFINITY ((uint64_t)-1)
|
||||
#endif
|
||||
#include "syscall_rlimit.h"
|
||||
|
||||
#if defined(TARGET_MIPS) || defined(TARGET_ABI_SOLARIS)
|
||||
#define TARGET_RLIMIT_CPU 0
|
||||
#define TARGET_RLIMIT_FSIZE 1
|
||||
#define TARGET_RLIMIT_DATA 2
|
||||
#define TARGET_RLIMIT_STACK 3
|
||||
#define TARGET_RLIMIT_CORE 4
|
||||
#define TARGET_RLIMIT_RSS 7
|
||||
#define TARGET_RLIMIT_NPROC 8
|
||||
#define TARGET_RLIMIT_NOFILE 5
|
||||
#define TARGET_RLIMIT_MEMLOCK 9
|
||||
#define TARGET_RLIMIT_AS 6
|
||||
#define TARGET_RLIMIT_LOCKS 10
|
||||
#define TARGET_RLIMIT_SIGPENDING 11
|
||||
#define TARGET_RLIMIT_MSGQUEUE 12
|
||||
#define TARGET_RLIMIT_NICE 13
|
||||
#define TARGET_RLIMIT_RTPRIO 14
|
||||
#else
|
||||
#define TARGET_RLIMIT_CPU 0
|
||||
#define TARGET_RLIMIT_FSIZE 1
|
||||
#define TARGET_RLIMIT_DATA 2
|
||||
#define TARGET_RLIMIT_STACK 3
|
||||
#define TARGET_RLIMIT_CORE 4
|
||||
#define TARGET_RLIMIT_RSS 5
|
||||
#if defined(TARGET_SPARC)
|
||||
#define TARGET_RLIMIT_NOFILE 6
|
||||
#define TARGET_RLIMIT_NPROC 7
|
||||
#else
|
||||
#define TARGET_RLIMIT_NPROC 6
|
||||
#define TARGET_RLIMIT_NOFILE 7
|
||||
#endif
|
||||
#define TARGET_RLIMIT_MEMLOCK 8
|
||||
#define TARGET_RLIMIT_AS 9
|
||||
#define TARGET_RLIMIT_LOCKS 10
|
||||
#define TARGET_RLIMIT_SIGPENDING 11
|
||||
#define TARGET_RLIMIT_MSGQUEUE 12
|
||||
#define TARGET_RLIMIT_NICE 13
|
||||
#define TARGET_RLIMIT_RTPRIO 14
|
||||
#endif
|
||||
// #if defined(TARGET_ALPHA)
|
||||
// #define TARGET_RLIM_INFINITY 0x7fffffffffffffffull
|
||||
// #elif defined(TARGET_MIPS) || (defined(TARGET_SPARC) && TARGET_ABI_BITS == 32)
|
||||
// #define TARGET_RLIM_INFINITY 0x7fffffffUL
|
||||
// #define TARGET_RLIM64_INFINITY 0x7fffffffffffffffull
|
||||
// #else
|
||||
// #define TARGET_RLIM_INFINITY ((abi_ulong)-1)
|
||||
// #define TARGET_RLIM64_INFINITY ((uint64_t)-1)
|
||||
// #endif
|
||||
//
|
||||
// #if defined(TARGET_MIPS) || defined(TARGET_ABI_SOLARIS)
|
||||
// #define TARGET_RLIMIT_CPU 0
|
||||
// #define TARGET_RLIMIT_FSIZE 1
|
||||
// #define TARGET_RLIMIT_DATA 2
|
||||
// #define TARGET_RLIMIT_STACK 3
|
||||
// #define TARGET_RLIMIT_CORE 4
|
||||
// #define TARGET_RLIMIT_RSS 7
|
||||
// #define TARGET_RLIMIT_NPROC 8
|
||||
// #define TARGET_RLIMIT_NOFILE 5
|
||||
// #define TARGET_RLIMIT_MEMLOCK 9
|
||||
// #define TARGET_RLIMIT_AS 6
|
||||
// #define TARGET_RLIMIT_LOCKS 10
|
||||
// #define TARGET_RLIMIT_SIGPENDING 11
|
||||
// #define TARGET_RLIMIT_MSGQUEUE 12
|
||||
// #define TARGET_RLIMIT_NICE 13
|
||||
// #define TARGET_RLIMIT_RTPRIO 14
|
||||
// #else
|
||||
// #define TARGET_RLIMIT_CPU 0
|
||||
// #define TARGET_RLIMIT_FSIZE 1
|
||||
// #define TARGET_RLIMIT_DATA 2
|
||||
// #define TARGET_RLIMIT_STACK 3
|
||||
// #define TARGET_RLIMIT_CORE 4
|
||||
// #define TARGET_RLIMIT_RSS 5
|
||||
// #if defined(TARGET_SPARC)
|
||||
// #define TARGET_RLIMIT_NOFILE 6
|
||||
// #define TARGET_RLIMIT_NPROC 7
|
||||
// #else
|
||||
// #define TARGET_RLIMIT_NPROC 6
|
||||
// #define TARGET_RLIMIT_NOFILE 7
|
||||
// #endif
|
||||
// #define TARGET_RLIMIT_MEMLOCK 8
|
||||
// #define TARGET_RLIMIT_AS 9
|
||||
// #define TARGET_RLIMIT_LOCKS 10
|
||||
// #define TARGET_RLIMIT_SIGPENDING 11
|
||||
// #define TARGET_RLIMIT_MSGQUEUE 12
|
||||
// #define TARGET_RLIMIT_NICE 13
|
||||
// #define TARGET_RLIMIT_RTPRIO 14
|
||||
// #endif
|
||||
|
||||
struct target_pollfd {
|
||||
int fd; /* file descriptor */
|
||||
|
@ -1400,13 +1385,6 @@ struct target_termio {
|
|||
unsigned char c_cc[TARGET_NCC]; /* control characters */
|
||||
};
|
||||
|
||||
struct target_winsize {
|
||||
unsigned short ws_row;
|
||||
unsigned short ws_col;
|
||||
unsigned short ws_xpixel;
|
||||
unsigned short ws_ypixel;
|
||||
};
|
||||
|
||||
#include "termbits.h"
|
||||
|
||||
#if defined(TARGET_MIPS)
|
||||
|
@ -2529,7 +2507,7 @@ struct target_statfs64 {
|
|||
short __pad1;
|
||||
uint32_t f_bsize;
|
||||
uint32_t f_frsize; /* Fragment size - unsupported */
|
||||
uint32_t __pad2;
|
||||
uint32_t __pad2;
|
||||
#else
|
||||
uint32_t f_type;
|
||||
uint32_t f_bsize;
|
||||
|
@ -2541,6 +2519,8 @@ struct target_statfs64 {
|
|||
uint64_t f_files;
|
||||
uint64_t f_ffree;
|
||||
uint64_t f_bavail;
|
||||
|
||||
/* Linux specials */
|
||||
target_fsid_t f_fsid;
|
||||
uint32_t f_namelen;
|
||||
uint32_t f_spare[6];
|
||||
|
|
|
@ -30,8 +30,9 @@ STRUCT(ifmap,
|
|||
/* Spare 3 bytes */
|
||||
TYPE_CHAR, TYPE_CHAR, TYPE_CHAR)
|
||||
|
||||
/* Remove if structs for darwing */
|
||||
/* The *_ifreq_list arrays deal with the fact that struct ifreq has unions */
|
||||
|
||||
/*
|
||||
STRUCT(sockaddr_ifreq,
|
||||
MK_ARRAY(TYPE_CHAR, IFNAMSIZ), MK_STRUCT(STRUCT_sockaddr))
|
||||
|
||||
|
@ -53,13 +54,13 @@ STRUCT(ptr_ifreq,
|
|||
|
||||
STRUCT(ifconf,
|
||||
TYPE_INT, TYPE_PTRVOID)
|
||||
|
||||
STRUCT(arpreq,
|
||||
MK_STRUCT(STRUCT_sockaddr), MK_STRUCT(STRUCT_sockaddr), TYPE_INT, MK_STRUCT(STRUCT_sockaddr),
|
||||
MK_ARRAY(TYPE_CHAR, 16))
|
||||
|
||||
STRUCT(arpreq_old,
|
||||
MK_STRUCT(STRUCT_sockaddr), MK_STRUCT(STRUCT_sockaddr), TYPE_INT, MK_STRUCT(STRUCT_sockaddr))
|
||||
*/
|
||||
|
||||
STRUCT(cdrom_read_audio,
|
||||
TYPE_CHAR, TYPE_CHAR, TYPE_CHAR, TYPE_CHAR, TYPE_CHAR, TYPE_INT, TYPE_PTRVOID,
|
||||
|
@ -254,15 +255,16 @@ STRUCT(fiemap,
|
|||
TYPE_INT, /* fm_extent_count */
|
||||
TYPE_INT) /* fm_reserved */
|
||||
|
||||
STRUCT(blkpg_partition,
|
||||
TYPE_LONGLONG, /* start */
|
||||
TYPE_LONGLONG, /* length */
|
||||
TYPE_INT, /* pno */
|
||||
MK_ARRAY(TYPE_CHAR, BLKPG_DEVNAMELTH), /* devname */
|
||||
MK_ARRAY(TYPE_CHAR, BLKPG_VOLNAMELTH)) /* volname */
|
||||
// Removed; not needed for Irix
|
||||
// STRUCT(blkpg_partition,
|
||||
// TYPE_LONGLONG, /* start */
|
||||
// TYPE_LONGLONG, /* length */
|
||||
// TYPE_INT, /* pno */
|
||||
// MK_ARRAY(TYPE_CHAR, BLKPG_DEVNAMELTH), /* devname */
|
||||
// MK_ARRAY(TYPE_CHAR, BLKPG_VOLNAMELTH)) /* volname */
|
||||
|
||||
STRUCT(blkpg_ioctl_arg,
|
||||
TYPE_INT, /* op */
|
||||
TYPE_INT, /* flags */
|
||||
TYPE_INT, /* datalen */
|
||||
TYPE_PTRVOID) /* data */
|
||||
// STRUCT(blkpg_ioctl_arg,
|
||||
// TYPE_INT, /* op */
|
||||
// TYPE_INT, /* flags */
|
||||
// TYPE_INT, /* datalen */
|
||||
// TYPE_PTRVOID) /* data */
|
||||
|
|
|
@ -72,33 +72,24 @@ const char *cpu_to_uname_machine(void *cpu_env)
|
|||
|
||||
#define COPY_UTSNAME_FIELD(dest, src) \
|
||||
do { \
|
||||
/* __NEW_UTS_LEN doesn't include terminating null */ \
|
||||
(void) strncpy((dest), (src), __NEW_UTS_LEN); \
|
||||
(dest)[__NEW_UTS_LEN] = '\0'; \
|
||||
/* _SYS_NAMELEN does include terminating null */ \
|
||||
(void) strncpy((dest), (src), _SYS_NAMELEN); \
|
||||
} while (0)
|
||||
|
||||
int sys_uname(struct new_utsname *buf)
|
||||
int sys_uname(struct utsname *buf)
|
||||
{
|
||||
struct utsname uts_buf;
|
||||
|
||||
if (uname(&uts_buf) < 0)
|
||||
return (-1);
|
||||
|
||||
/*
|
||||
* Just in case these have some differences, we
|
||||
* translate utsname to new_utsname (which is the
|
||||
* struct linux kernel uses).
|
||||
*/
|
||||
|
||||
/* Just in case these have some differences */
|
||||
memset(buf, 0, sizeof(*buf));
|
||||
COPY_UTSNAME_FIELD(buf->sysname, uts_buf.sysname);
|
||||
COPY_UTSNAME_FIELD(buf->nodename, uts_buf.nodename);
|
||||
COPY_UTSNAME_FIELD(buf->release, uts_buf.release);
|
||||
COPY_UTSNAME_FIELD(buf->version, uts_buf.version);
|
||||
COPY_UTSNAME_FIELD(buf->machine, uts_buf.machine);
|
||||
#ifdef _GNU_SOURCE
|
||||
COPY_UTSNAME_FIELD(buf->domainname, uts_buf.domainname);
|
||||
#endif
|
||||
return (0);
|
||||
|
||||
#undef COPY_UTSNAME_FIELD
|
||||
|
|
|
@ -2,9 +2,8 @@
|
|||
#define UNAME_H
|
||||
|
||||
#include <sys/utsname.h>
|
||||
#include <linux/utsname.h>
|
||||
|
||||
const char *cpu_to_uname_machine(void *cpu_env);
|
||||
int sys_uname(struct new_utsname *buf);
|
||||
int sys_uname(struct utsname *buf);
|
||||
|
||||
#endif /* UNAME_H */
|
||||
|
|
Loading…
Reference in New Issue