diff options
author | Mattias Andrée <maandree@kth.se> | 2023-12-16 13:47:10 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2023-12-16 13:47:10 +0100 |
commit | 522948817bebc886ad236450745466975633e977 (patch) | |
tree | f53fc385c29be9b08d9c8f9c88a00ce9d1543de4 /libsyscalls_get_syscall_errors.c | |
parent | All kinds of stuff (diff) | |
download | libsyscalls-522948817bebc886ad236450745466975633e977.tar.gz libsyscalls-522948817bebc886ad236450745466975633e977.tar.bz2 libsyscalls-522948817bebc886ad236450745466975633e977.tar.xz |
Tell the user whether signals and errors are signed or unsigned
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'libsyscalls_get_syscall_errors.c')
-rw-r--r-- | libsyscalls_get_syscall_errors.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libsyscalls_get_syscall_errors.c b/libsyscalls_get_syscall_errors.c index 1af1589..9ec7e05 100644 --- a/libsyscalls_get_syscall_errors.c +++ b/libsyscalls_get_syscall_errors.c @@ -6,17 +6,20 @@ enum libsyscalls_error libsyscalls_get_syscall_errors(enum libsyscalls_os os, enum libsyscalls_arch arch, - const struct libsyscalls_named_number **errors_out, size_t *num_errors_out) + const struct libsyscalls_named_number **errors_out, + size_t *num_errors_out, int *are_signed_out) { const struct libsyscalls_named_number *discard_errors; size_t discard_num_errors; + int discard_are_signed; if (!errors_out) errors_out = &discard_errors; if (!num_errors_out) num_errors_out = &discard_num_errors; + if (!are_signed_out) are_signed_out = &discard_are_signed; #define CASE(UPPERCASE, LOWERCASE)\ case LIBSYSCALLS_OS_##UPPERCASE:\ - return get_##LOWERCASE##_syscall_errors(arch, errors_out, num_errors_out) + return get_##LOWERCASE##_syscall_errors(arch, errors_out, num_errors_out, are_signed_out) switch ((int)os) { LIST_OSES(CASE, ;); |