mirror of
https://github.com/Dasharo/systemd.git
synced 2026-03-06 15:02:31 -08:00
fd-util: beef up ERRNO_IS_xyz() macros a bit
Let's implicit drop the negation if there is one, to simplify things a bit, similar how we do it in log_xyz()...
This commit is contained in:
@@ -81,13 +81,13 @@ int fd_duplicate_data_fd(int fd);
|
||||
/* The kernel sends e.g., EHOSTUNREACH or ENONET to userspace in some ICMP error cases.
|
||||
* See the icmp_err_convert[] in net/ipv4/icmp.c in the kernel sources */
|
||||
#define ERRNO_IS_DISCONNECT(r) \
|
||||
IN_SET(r, \
|
||||
IN_SET(abs(r), \
|
||||
ENOTCONN, ECONNRESET, ECONNREFUSED, ECONNABORTED, EPIPE, \
|
||||
ENETUNREACH, EHOSTUNREACH, ENOPROTOOPT, EHOSTDOWN, ENONET)
|
||||
|
||||
/* Resource exhaustion, could be our fault or general system trouble */
|
||||
#define ERRNO_IS_RESOURCE(r) \
|
||||
IN_SET(r, ENOMEM, EMFILE, ENFILE)
|
||||
IN_SET(abs(r), ENOMEM, EMFILE, ENFILE)
|
||||
|
||||
int fd_move_above_stdio(int fd);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user