]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - man/sd_session_is_active.xml
travis: add more ASan options
[thirdparty/systemd.git] / man / sd_session_is_active.xml
index 4ca3a6c15057ae24b715c0de9fbf9316fbc57dd2..d4a12f533c04cfafe4a129a4d773ec1fb7f45184 100644 (file)
@@ -1,40 +1,14 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<!-- SPDX-License-Identifier: LGPL-2.1+ -->
 
-<!--
-  This file is part of systemd.
-
-  Copyright 2010 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/>.
--->
-
-<refentry id="sd_session_is_active" conditional='HAVE_PAM'>
+<refentry id="sd_session_is_active" conditional='HAVE_PAM'
+          xmlns:xi="http://www.w3.org/2001/XInclude">
 
   <refentryinfo>
     <title>sd_session_is_active</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_session_get_seat()</function> may be used to
     determine the seat identifier of the seat the session identified
     by the specified session identifier belongs to. Note that not all
-    sessions are attached to a seat, this call will fail for them. The
-    returned string needs to be freed with the libc
+    sessions are attached to a seat, this call will fail (returning
+    <constant>-ENODATA</constant>) for them. The returned string needs
+    to be freed with the libc
     <citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
     call after use.</para>
 
     <function>sd_session_get_tty()</function> return 0 or
     a positive integer. On failure, these calls return a
     negative errno-style error code.</para>
-  </refsect1>
 
-  <refsect1>
-    <title>Notes</title>
+    <refsect2>
+      <title>Errors</title>
 
-    <para>The <function>sd_session_is_active()</function>,
-    <function>sd_session_get_state()</function>,
-    <function>sd_session_get_uid()</function>,
-    <function>sd_session_get_seat()</function>,
-    <function>sd_session_get_service()</function>,
-    <function>sd_session_get_type()</function>,
-    <function>sd_session_get_class()</function>,
-    <function>sd_session_get_display()</function>,
-    <function>sd_session_get_remote_host()</function>,
-    <function>sd_session_get_remote_user()</function> and
-    <function>sd_session_get_tty()</function>
-    interfaces are available as a shared library, which can
-    be compiled and linked to with the
-    <constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
-    file.</para>
+      <para>Returned errors may indicate the following problems:</para>
+
+      <variablelist>
+
+        <varlistentry>
+          <term><constant>-ENXIO</constant></term>
+
+          <listitem><para>The specified session does not exist.</para>
+          </listitem>
+        </varlistentry>
+
+        <varlistentry>
+          <term><constant>-ENODATA</constant></term>
+
+          <listitem><para>The given field is not specified for the described session.</para>
+          </listitem>
+        </varlistentry>
+
+        <varlistentry>
+          <term><constant>-EINVAL</constant></term>
+
+          <listitem><para>An input parameter was invalid (out of range, or <constant>NULL</constant>, where
+          that is not accepted).</para></listitem>
+        </varlistentry>
+
+        <varlistentry>
+          <term><constant>-ENOMEM</constant></term>
+
+          <listitem><para>Memory allocation failed.</para></listitem>
+        </varlistentry>
+      </variablelist>
+    </refsect2>
   </refsect1>
 
+  <xi:include href="libsystemd-pkgconfig.xml" />
+
   <refsect1>
     <title>See Also</title>