1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-01 09:21:26 +03:00

basic/log: change error for unset errno to ESTRPIPE

EIO is used in other contexts, so change ot something otherwise unused.
ENOTRECOVERABLE was also suggested, but it's used in various other places
in the code.

https://github.com/systemd/systemd/pull/19317#discussion_r614887661
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2021-04-19 08:43:36 +02:00
parent 19cdcd5dca
commit 59e8042ecd

View File

@ -195,7 +195,7 @@ void log_assert_failed_return(
_e = (log_get_max_level() >= LOG_PRI(_level)) \ _e = (log_get_max_level() >= LOG_PRI(_level)) \
? log_internal(_level, _e, PROJECT_FILE, __LINE__, __func__, __VA_ARGS__) \ ? log_internal(_level, _e, PROJECT_FILE, __LINE__, __func__, __VA_ARGS__) \
: -ERRNO_VALUE(_e); \ : -ERRNO_VALUE(_e); \
_e < 0 ? _e : -EIO; \ _e < 0 ? _e : -ESTRPIPE; \
}) })
#if BUILD_MODE_DEVELOPER && !defined(TEST_CODE) #if BUILD_MODE_DEVELOPER && !defined(TEST_CODE)