]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - man/sd_event_source_set_enabled.xml
resolved: use structured initialization for DnsScope
[thirdparty/systemd.git] / man / sd_event_source_set_enabled.xml
index 6844f29a4959ab1b36ceeb1f81943cff1506b531..73f01848d5645e6d4d61e8147b243f34df1d09af 100644 (file)
@@ -1,24 +1,9 @@
-<?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
+<?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
 
 <!--
-  This file is part of systemd.
-
-  Copyright 2015 Lennart Poettering
-
-  systemd is free software; you can redistribute it and/or modify it
-  under the terms of the GNU Lesser General Public License as published by
-  the Free Software Foundation; either version 2.1 of the License, or
-  (at your option) any later version.
-
-  systemd is distributed in the hope that it will be useful, but
-  WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-  Lesser General Public License for more details.
-
-  You should have received a copy of the GNU Lesser General Public License
-  along with systemd; If not, see <http://www.gnu.org/licenses/>.
+  SPDX-License-Identifier: LGPL-2.1+
 -->
 
 <refentry id="sd_event_source_set_enabled" xmlns:xi="http://www.w3.org/2001/XInclude">
   <refentryinfo>
     <title>sd_event_source_set_enabled</title>
     <productname>systemd</productname>
-
-    <authorgroup>
-      <author>
-        <contrib>Developer</contrib>
-        <firstname>Lennart</firstname>
-        <surname>Poettering</surname>
-        <email>lennart@poettering.net</email>
-      </author>
-    </authorgroup>
   </refentryinfo>
 
   <refmeta>
     <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 in
-    <parameter>enabled</parameter>.</para>
+    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>Event source objects are enabled when they are first created
     with calls such as
   <refsect1>
     <title>Return Value</title>
 
-    <para>On success, <function>sd_event_source_set_enabled()</function> and
-    <function>sd_event_source_get_enabled()</function> return a
-    non-negative integer. On failure, they return a negative
-    errno-style error code.</para>
+    <para>On success, <function>sd_event_source_set_enabled()</function> returns a non-negative
+    integer. <function>sd_event_source_get_enabled()</function> returns zero if the source is
+    disabled (<constant>SD_EVENT_OFF</constant>) and a positive integer otherwise. On failure, they
+    return a negative errno-style error code.</para>
   </refsect1>
 
   <refsect1>
       <citerefentry><refentrytitle>sd-event</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd_event_add_io</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd_event_add_time</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
-      <citerefentry><refentrytitle>sd_event_add_child</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd_event_add_signal</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>sd_event_add_child</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>sd_event_add_inotify</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd_event_add_defer</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd_event_source_unref</refentrytitle><manvolnum>3</manvolnum></citerefentry>
     </para>