]> git.proxmox.com Git - mirror_qemu.git/commitdiff
bsd-user: export get_errno and is_error from syscall.c
authorWarner Losh <imp@bsdimp.com>
Sat, 18 Sep 2021 06:26:49 +0000 (00:26 -0600)
committerWarner Losh <imp@bsdimp.com>
Mon, 18 Oct 2021 18:51:39 +0000 (12:51 -0600)
Make get_errno and is_error global so files other than syscall.c can use
them.

Signed-off-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Kyle Evans <kevans@FreeBSD.org>
bsd-user/qemu.h
bsd-user/syscall.c

index 522d6c4031b9eab240a382577081c2ae137cb347..3b8475394c3b1938f4c3300a3f263371d284c59b 100644 (file)
@@ -235,6 +235,10 @@ extern unsigned long target_dflssiz;
 extern unsigned long target_maxssiz;
 extern unsigned long target_sgrowsiz;
 
+/* syscall.c */
+abi_long get_errno(abi_long ret);
+bool is_error(abi_long ret);
+
 /* user access */
 
 #define VERIFY_READ  PAGE_READ
index 372836d44df84e740aae3e33c542664fa51dc4b8..2fd2ba833002fd8e57506e67f82fd68bf656515a 100644 (file)
 static abi_ulong target_brk;
 static abi_ulong target_original_brk;
 
-static inline abi_long get_errno(abi_long ret)
+abi_long get_errno(abi_long ret)
 {
-    if (ret == -1)
+    if (ret == -1) {
         /* XXX need to translate host -> target errnos here */
         return -(errno);
-    else
-        return ret;
+    }
+    return ret;
 }
 
 #define target_to_host_bitmask(x, tbl) (x)
 
-static inline int is_error(abi_long ret)
+bool is_error(abi_long ret)
 {
     return (abi_ulong)ret >= (abi_ulong)(-4096);
 }