1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-07 17:17:44 +03:00

sd-event: change error code -EINVAL -> -EIO

EINVAL should be used when a function is called with an invalid
argument. Here, the signal is not a function argument.

Follow-up for 7a64c5f23efbb51fe4f1229c1a8aed6dd858a0a9.

(cherry picked from commit ab9af70edb23f2a66e93e2e16f87cd98873885b7)
(cherry picked from commit 84f0eda3781f49ff7f3035861b02fe247b89d65e)
(cherry picked from commit da81ee2f78)
This commit is contained in:
Yu Watanabe 2024-08-04 11:29:03 +09:00 committed by Luca Boccassi
parent 74fa56ebc3
commit 42885ab017

View File

@ -3831,7 +3831,7 @@ static int process_signal(sd_event *e, struct signal_data *d, uint32_t events, i
return -EIO;
if (_unlikely_(!SIGNAL_VALID(si.ssi_signo)))
return -EINVAL;
return -EIO;
if (e->signal_sources)
s = e->signal_sources[si.ssi_signo];