diff options
author | Lennart Poettering <lennart@poettering.net> | 2021-11-14 22:31:27 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2021-11-16 08:04:09 +0100 |
commit | ef470ffa234c8c824897488195fb2fc9a4a520e6 (patch) | |
tree | 8228fb8b72994716f8bbf86d8ea543cbd6d0f484 /src/basic/xattr-util.c | |
parent | cgroup-util: laccess() returns negative errno already (diff) | |
download | systemd-ef470ffa234c8c824897488195fb2fc9a4a520e6.tar.xz systemd-ef470ffa234c8c824897488195fb2fc9a4a520e6.zip |
macro: add new helper RET_NERRNO()
This new helper converts libc style syscall return values into
systemd-kernel (actually: kernel style) negative errno values.
It's implemented as macro-like inline function, and propagates return
values >= 0 as themselves and returns -errno for negative error returns.
THis is supposed to be little more than syntactic sugar so that we can
reduce a lot of (short, but still) boilerplate code whever we convert
libc style error handling into our own.
As discussed here:
https://github.com/systemd/systemd/pull/21326#discussion_r748413537
Diffstat (limited to 'src/basic/xattr-util.c')
0 files changed, 0 insertions, 0 deletions