Files
erofs-linux/tools/include/nolibc/sys
Thomas Weißschuh 2eb64b936d tools/nolibc: add the _syscall() macro
The standard syscall() function or macro uses the libc return value
convention. Errors returned from the kernel as negative values are
stored in errno and -1 is returned. Users who want to avoid using
errno don't have a way to call raw syscalls and check the returned
error.

Add a new macro _syscall() which works like the standard syscall()
but passes through the return value from the kernel unchanged.
The naming scheme and return values match the named _sys_foo()
system call wrappers already part of nolibc.

Signed-off-by: Thomas Weißschuh <[email protected]>
Acked-by: Willy Tarreau <[email protected]>
Link: https://patch.msgid.link/[email protected]
2026-04-07 09:27:07 +02:00
..
2025-04-19 14:22:29 +02:00