diff options
author | Ed Schouten <ed@FreeBSD.org> | 2017-12-16 19:37:55 +0000 |
---|---|---|
committer | Ed Schouten <ed@FreeBSD.org> | 2017-12-16 19:37:55 +0000 |
commit | 87f69beea3fd1e4bf1f5002de1af811bc56c327f (patch) | |
tree | 1a8d73e760939836f1b2a674465e4c6739939a02 | |
parent | 5bf0d7ad74798ada70507eddc2422609305080d6 (diff) |
Notes
-rw-r--r-- | lib/libsysdecode/errno.c | 8 | ||||
-rw-r--r-- | lib/libsysdecode/syscallnames.c | 10 | ||||
-rw-r--r-- | lib/libsysdecode/sysdecode.3 | 7 | ||||
-rw-r--r-- | lib/libsysdecode/sysdecode.h | 3 |
4 files changed, 15 insertions, 13 deletions
diff --git a/lib/libsysdecode/errno.c b/lib/libsysdecode/errno.c index 512b76d0e0d62..d50ea72d039fa 100644 --- a/lib/libsysdecode/errno.c +++ b/lib/libsysdecode/errno.c @@ -58,7 +58,6 @@ static int bsd_to_linux_errno[ELAST + 1] = { }; #endif -#if defined(__aarch64__) || defined(__amd64__) #include <contrib/cloudabi/cloudabi_types_common.h> static const int cloudabi_errno_table[] = { @@ -139,7 +138,6 @@ static const int cloudabi_errno_table[] = { [CLOUDABI_EXDEV] = EXDEV, [CLOUDABI_ENOTCAPABLE] = ENOTCAPABLE, }; -#endif int sysdecode_abi_to_freebsd_errno(enum sysdecode_abi abi, int error) @@ -165,13 +163,12 @@ sysdecode_abi_to_freebsd_errno(enum sysdecode_abi abi, int error) break; } #endif -#if defined(__aarch64__) || defined(__amd64__) + case SYSDECODE_ABI_CLOUDABI32: case SYSDECODE_ABI_CLOUDABI64: if (error >= 0 && (unsigned int)error < nitems(cloudabi_errno_table)) return (cloudabi_errno_table[error]); break; -#endif default: break; } @@ -193,7 +190,7 @@ sysdecode_freebsd_to_abi_errno(enum sysdecode_abi abi, int error) return (bsd_to_linux_errno[error]); break; #endif -#if defined(__aarch64__) || defined(__amd64__) + case SYSDECODE_ABI_CLOUDABI32: case SYSDECODE_ABI_CLOUDABI64: { unsigned int i; @@ -203,7 +200,6 @@ sysdecode_freebsd_to_abi_errno(enum sysdecode_abi abi, int error) } break; } -#endif default: break; } diff --git a/lib/libsysdecode/syscallnames.c b/lib/libsysdecode/syscallnames.c index df588c2576632..abe284c693aaa 100644 --- a/lib/libsysdecode/syscallnames.c +++ b/lib/libsysdecode/syscallnames.c @@ -63,10 +63,10 @@ static #include <amd64/linux32/linux32_syscalls.c> #endif -#if defined(__amd64__) || defined(__aarch64__) +static +#include <compat/cloudabi32/cloudabi32_syscalls.c> static #include <compat/cloudabi64/cloudabi64_syscalls.c> -#endif const char * sysdecode_syscallname(enum sysdecode_abi abi, unsigned int code) @@ -95,12 +95,14 @@ sysdecode_syscallname(enum sysdecode_abi abi, unsigned int code) return (linux32_syscallnames[code]); break; #endif -#if defined(__amd64__) || defined(__aarch64__) + case SYSDECODE_ABI_CLOUDABI32: + if (code < nitems(cloudabi32_syscallnames)) + return (cloudabi32_syscallnames[code]); + break; case SYSDECODE_ABI_CLOUDABI64: if (code < nitems(cloudabi64_syscallnames)) return (cloudabi64_syscallnames[code]); break; -#endif default: break; } diff --git a/lib/libsysdecode/sysdecode.3 b/lib/libsysdecode/sysdecode.3 index e84681f2e7ff2..c0278137930cc 100644 --- a/lib/libsysdecode/sysdecode.3 +++ b/lib/libsysdecode/sysdecode.3 @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 24, 2017 +.Dd December 16, 2017 .Dt SYSDECODE 3 .Os .Sh NAME @@ -61,9 +61,12 @@ Supported on amd64 and i386. .It Li SYSDECODE_ABI_LINUX32 32-bit Linux binaries. Supported on amd64. +.It Li SYSDECODE_ABI_CLOUDABI32 +32-bit CloudABI binaries. +Supported on all platforms. .It Li SYSDECODE_ABI_CLOUDABI64 64-bit CloudABI binaries. -Supported on aarch64 and amd64. +Supported on all platforms. .It Li SYSDECODE_ABI_UNKNOWN A placeholder for use when the ABI is not known. .El diff --git a/lib/libsysdecode/sysdecode.h b/lib/libsysdecode/sysdecode.h index f766f0c149d97..316c30ed71d3c 100644 --- a/lib/libsysdecode/sysdecode.h +++ b/lib/libsysdecode/sysdecode.h @@ -35,7 +35,8 @@ enum sysdecode_abi { SYSDECODE_ABI_FREEBSD32, SYSDECODE_ABI_LINUX, SYSDECODE_ABI_LINUX32, - SYSDECODE_ABI_CLOUDABI64 + SYSDECODE_ABI_CLOUDABI64, + SYSDECODE_ABI_CLOUDABI32 }; int sysdecode_abi_to_freebsd_errno(enum sysdecode_abi _abi, int _error); |