diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2022-06-14 14:37:21 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2022-06-30 10:35:27 +0200 |
commit | 71193c0b629c76ec511dd222d6b68a52c4df132d (patch) | |
tree | b8104d1c11755d28c8bc421043877854042f433b /man/sd_event_source_set_enabled.xml | |
parent | 7d9337ed77b08ee691568172e7c074d2b5d8e15e (diff) | |
download | systemd-71193c0b629c76ec511dd222d6b68a52c4df132d.tar.gz |
sd-event: allow sd_event_source_is_enabled() to return false for NULL
This is a natural use case, and instead of defining a wrapper to do this
for us, let's just make this part of the API. Calling with NULL was not
allowed, so this is not a breaking change to the interface.
(After sd_event_source_is_enabled was originally added, we introduced
sd_event_source_disable_unref() and other similar functions which accept
NULL. So not accepting NULL here is likely to confuse people. Let's just
make the API usable with minimal fuss.)
Diffstat (limited to 'man/sd_event_source_set_enabled.xml')
-rw-r--r-- | man/sd_event_source_set_enabled.xml | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/man/sd_event_source_set_enabled.xml b/man/sd_event_source_set_enabled.xml index c8ae169c17..d6cdf85eda 100644 --- a/man/sd_event_source_set_enabled.xml +++ b/man/sd_event_source_set_enabled.xml @@ -68,13 +68,15 @@ loop wakeups and will not be dispatched, until they are enabled again.</para> - <para><function>sd_event_source_get_enabled()</function> may be - used to query whether the event source object - <parameter>source</parameter> is currently enabled or not. It - returns the enablement state (one of <constant>SD_EVENT_ON</constant>, - <constant>SD_EVENT_OFF</constant>, <constant>SD_EVENT_ONESHOT</constant>) - in <parameter>enabled</parameter>, if it is not <constant>NULL</constant>. - It also returns true if the event source is not disabled.</para> + <para><function>sd_event_source_get_enabled()</function> may be used to query whether the event source + object <parameter>source</parameter> is currently enabled or not. If both the + <parameter>source</parameter> and the output parameter <parameter>enabled</parameter> are + <constant>NULL</constant>, this function returns false. Otherwise, <parameter>source</parameter> must be + a valid pointer to an <structname>sd_event_source</structname> object. If the output parameter + <parameter>enabled</parameter> is not <constant>NULL</constant>, it is set to the enablement state (one + of <constant>SD_EVENT_ON</constant>, <constant>SD_EVENT_OFF</constant>, + <constant>SD_EVENT_ONESHOT</constant>). The function also returns true if the event source is not + disabled.</para> <para>Event source objects are enabled when they are first created with calls such as |