diff options
author | Richard Henderson <rth@twiddle.net> | 2016-12-05 13:08:12 -0800 |
---|---|---|
committer | Richard Henderson <rth@twiddle.net> | 2017-01-22 18:14:10 -0800 |
commit | fe8ed7d5794f6cecc69bb31ab1291e2356d31bcd (patch) | |
tree | 25721767d3d1c8ea0e5c782075ae2f0f2da6b2bd | |
parent | 405b49150425a3570de4eab99870498d14712b11 (diff) |
linux-user: Handle ERFKILL and EHWPOISON
With definitions for generic, alpha and mips taken from 4.9-rc2.
Signed-off-by: Richard Henderson <rth@twiddle.net>
-rw-r--r-- | linux-user/alpha/target_syscall.h | 2 | ||||
-rw-r--r-- | linux-user/errno_defs.h | 3 | ||||
-rw-r--r-- | linux-user/mips/target_syscall.h | 5 | ||||
-rw-r--r-- | linux-user/mips64/target_syscall.h | 5 | ||||
-rw-r--r-- | linux-user/syscall.c | 6 |
5 files changed, 21 insertions, 0 deletions
diff --git a/linux-user/alpha/target_syscall.h b/linux-user/alpha/target_syscall.h index b580fc5b37..3426cc5b4e 100644 --- a/linux-user/alpha/target_syscall.h +++ b/linux-user/alpha/target_syscall.h @@ -235,6 +235,8 @@ struct target_pt_regs { #define TARGET_ENOTRECOVERABLE 137 #undef TARGET_ERFKILL #define TARGET_ERFKILL 138 +#undef TARGET_EHWPOISON +#define TARGET_EHWPOISON 139 // For sys_osf_getsysinfo #define TARGET_GSI_UACPROC 8 diff --git a/linux-user/errno_defs.h b/linux-user/errno_defs.h index 65522c4516..55fbebda51 100644 --- a/linux-user/errno_defs.h +++ b/linux-user/errno_defs.h @@ -140,6 +140,9 @@ #define TARGET_EOWNERDEAD 130 /* Owner died */ #define TARGET_ENOTRECOVERABLE 131 /* State not recoverable */ +#define TARGET_ERFKILL 132 /* Operation not possible due to RF-kill */ +#define TARGET_EHWPOISON 133 /* Memory page has hardware error */ + /* QEMU internal, not visible to the guest. This is returned when a * system call should be restarted, to tell the main loop that it * should wind the guest PC backwards so it will re-execute the syscall diff --git a/linux-user/mips/target_syscall.h b/linux-user/mips/target_syscall.h index 0b64b73714..2fca1c6bf9 100644 --- a/linux-user/mips/target_syscall.h +++ b/linux-user/mips/target_syscall.h @@ -221,6 +221,11 @@ struct target_pt_regs { #undef TARGET_ENOTRECOVERABLE #define TARGET_ENOTRECOVERABLE 166 /* State not recoverable */ +#undef TARGET_ERFKILL +#define TARGET_ERFKILL 167 +#undef TARGET_EHWPOISON +#define TARGET_EHWPOISON 168 + #undef TARGET_EDQUOT #define TARGET_EDQUOT 1133 /* Quota exceeded */ diff --git a/linux-user/mips64/target_syscall.h b/linux-user/mips64/target_syscall.h index 6692917e2e..078437d765 100644 --- a/linux-user/mips64/target_syscall.h +++ b/linux-user/mips64/target_syscall.h @@ -218,6 +218,11 @@ struct target_pt_regs { #undef TARGET_ENOTRECOVERABLE #define TARGET_ENOTRECOVERABLE 166 /* State not recoverable */ +#undef TARGET_ERFKILL +#define TARGET_ERFKILL 167 +#undef TARGET_EHWPOISON +#define TARGET_EHWPOISON 168 + #undef TARGET_EDQUOT #define TARGET_EDQUOT 1133 /* Quota exceeded */ diff --git a/linux-user/syscall.c b/linux-user/syscall.c index acb004f035..11a311f9db 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -798,6 +798,12 @@ static uint16_t host_to_target_errno_table[ERRNO_TABLE_SIZE] = { #ifdef ENOMSG [ENOMSG] = TARGET_ENOMSG, #endif +#ifdef ERKFILL + [ERFKILL] = TARGET_ERFKILL, +#endif +#ifdef EHWPOISON + [EHWPOISON] = TARGET_EHWPOISON, +#endif }; static inline int host_to_target_errno(int err) |