summaryrefslogtreecommitdiff
path: root/man/sd_event_source_set_enabled.xml
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2022-06-14 14:40:30 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2022-06-30 10:35:27 +0200
commit7e922b05844fd3c4db51b565c1b946eb2f92f0fd (patch)
tree205492031c63e491c433faa6af0a12b08d5b592c /man/sd_event_source_set_enabled.xml
parent71193c0b629c76ec511dd222d6b68a52c4df132d (diff)
downloadsystemd-7e922b05844fd3c4db51b565c1b946eb2f92f0fd.tar.gz
sd-event: let sd_event_source_set_enabled accept NULL
Same story as before: disabling a non-existent event source shouldn't need to be guarded by an if. I retained the wrapper so that that we don't have to say SD_EVENT_OFF in the many places where this is called.
Diffstat (limited to 'man/sd_event_source_set_enabled.xml')
-rw-r--r--man/sd_event_source_set_enabled.xml19
1 files changed, 9 insertions, 10 deletions
diff --git a/man/sd_event_source_set_enabled.xml b/man/sd_event_source_set_enabled.xml
index d6cdf85eda..5f13fc101d 100644
--- a/man/sd_event_source_set_enabled.xml
+++ b/man/sd_event_source_set_enabled.xml
@@ -53,16 +53,15 @@
<refsect1>
<title>Description</title>
- <para><function>sd_event_source_set_enabled()</function> may be
- used to enable or disable the event source object specified as
- <parameter>source</parameter>. The <parameter>enabled</parameter>
- parameter takes one of <constant>SD_EVENT_ON</constant> (to
- enable), <constant>SD_EVENT_OFF</constant> (to disable) or
- <constant>SD_EVENT_ONESHOT</constant>. If invoked with
- <constant>SD_EVENT_ONESHOT</constant> the event source will be
- enabled but automatically reset to
- <constant>SD_EVENT_OFF</constant> after the event source was
- dispatched once.</para>
+ <para><function>sd_event_source_set_enabled()</function> may be used to enable or disable the event
+ source object specified as <parameter>source</parameter>. The <parameter>enabled</parameter> parameter
+ takes one of <constant>SD_EVENT_ON</constant> (to enable), <constant>SD_EVENT_OFF</constant> (to disable)
+ or <constant>SD_EVENT_ONESHOT</constant>. If invoked with <constant>SD_EVENT_ONESHOT</constant> the event
+ source will be enabled but automatically reset to <constant>SD_EVENT_OFF</constant> after one dispatch.
+ For <constant>SD_EVENT_OFF</constant>, the event source <parameter>source</parameter> may be
+ <constant>NULL</constant>, in which case the function does nothing. Otherwise,
+ <parameter>source</parameter> must be a valid pointer to an <structname>sd_event_source</structname>
+ object.</para>
<para>Event sources that are disabled will not result in event
loop wakeups and will not be dispatched, until they are enabled