aboutsummaryrefslogtreecommitdiff
path: root/linux-user/sparc
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>2021-07-08 19:05:45 +0200
committerLaurent Vivier <laurent@vivier.eu>2021-07-12 21:53:35 +0200
commit8f968b6a24aec7de8b1a1b4d2de922adad689297 (patch)
tree672c47e157f30ffd9ae8cb26b5a07a4d58b55885 /linux-user/sparc
parentf007472331068f35e1cf3dca9adb87a4c1df59e8 (diff)
downloadqemu-8f968b6a24aec7de8b1a1b4d2de922adad689297.zip
qemu-8f968b6a24aec7de8b1a1b4d2de922adad689297.tar.gz
qemu-8f968b6a24aec7de8b1a1b4d2de922adad689297.tar.bz2
linux-user: Extract target errno to 'target_errno_defs.h'
We want to access the target errno indepently of the rest of the linux-user code. Move the header containing the generic errno definitions ('errno_defs.h') to 'generic/target_errno_defs.h', create a new 'target_errno_defs.h' in each target which itself includes 'generic/target_errno_defs.h'. Suggested-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20210708170550.1846343-4-f4bug@amsat.org> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'linux-user/sparc')
-rw-r--r--linux-user/sparc/target_errno_defs.h7
-rw-r--r--linux-user/sparc/target_syscall.h2
2 files changed, 6 insertions, 3 deletions
diff --git a/linux-user/sparc/target_errno_defs.h b/linux-user/sparc/target_errno_defs.h
index e000810..de4f1ff 100644
--- a/linux-user/sparc/target_errno_defs.h
+++ b/linux-user/sparc/target_errno_defs.h
@@ -1,7 +1,12 @@
#ifndef SPARC_TARGET_ERRNO_DEFS_H
#define SPARC_TARGET_ERRNO_DEFS_H
-/* Target errno definitions taken from asm-sparc/errno.h */
+#include "../generic/target_errno_defs.h"
+
+/*
+ * Generic target errno overridden with definitions taken
+ * from asm-sparc/errno.h
+ */
#undef TARGET_EWOULDBLOCK
#define TARGET_EWOULDBLOCK TARGET_EAGAIN /* Operation would block */
#undef TARGET_EINPROGRESS
diff --git a/linux-user/sparc/target_syscall.h b/linux-user/sparc/target_syscall.h
index dad501d..087b39d 100644
--- a/linux-user/sparc/target_syscall.h
+++ b/linux-user/sparc/target_syscall.h
@@ -1,8 +1,6 @@
#ifndef SPARC_TARGET_SYSCALL_H
#define SPARC_TARGET_SYSCALL_H
-#include "target_errno_defs.h"
-
#if defined(TARGET_SPARC64) && !defined(TARGET_ABI32)
struct target_pt_regs {
abi_ulong u_regs[16];