diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-11-16 08:43:43 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-11-16 09:03:41 +0100 |
commit | 08c1eb0e3099b785b20b6a433f2b876e03c26bb9 (patch) | |
tree | 931d3ce2e853805293cac4c98b0e6d239c72077e /src | |
parent | 7d92a1a49080206983a0ea1884d9a2287e696bb7 (diff) | |
download | systemd-08c1eb0e3099b785b20b6a433f2b876e03c26bb9.tar.gz systemd-08c1eb0e3099b785b20b6a433f2b876e03c26bb9.tar.bz2 systemd-08c1eb0e3099b785b20b6a433f2b876e03c26bb9.zip |
sd-event: make sd_event_source_get_enabled return more info
Diffstat (limited to 'src')
-rw-r--r-- | src/libsystemd/sd-event/sd-event.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c index 8762b7b89d..66824c6c78 100644 --- a/src/libsystemd/sd-event/sd-event.c +++ b/src/libsystemd/sd-event/sd-event.c @@ -2143,11 +2143,11 @@ fail: _public_ int sd_event_source_get_enabled(sd_event_source *s, int *m) { assert_return(s, -EINVAL); - assert_return(m, -EINVAL); assert_return(!event_pid_changed(s->event), -ECHILD); - *m = s->enabled; - return 0; + if (m) + *m = s->enabled; + return s->enabled != SD_EVENT_OFF; } _public_ int sd_event_source_set_enabled(sd_event_source *s, int m) { |