summaryrefslogtreecommitdiff
path: root/man/sd_seat_get_active.xml
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-07-30 12:43:07 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-09-09 09:34:54 +0200
commitaa3b40c3f98f28312967b3f9ba1f353efd9c9873 (patch)
tree35b94ce77cee8306399346ee27011cf51a8c18e1 /man/sd_seat_get_active.xml
parent87a4d416e5126b6fb2528ae192a6a6a8033539ce (diff)
downloadsystemd-aa3b40c3f98f28312967b3f9ba1f353efd9c9873.tar.gz
Fix output value of sd_seat_get_sessions() and drop FOREACH_WORD use
sd_seat_get_sessions() would return 0 in the 'n_uids' (now 'ret_n_uids') output parameter when 'uid' (now 'ret_uids') was passed as NULL. While at it, drop FOREACH_WORD() use. Also use any whitespace as separator. In practice this shouldn't matter, since logind always uses spaces, but it seems nicer to not specify this explicitly, and the default is more flexible.
Diffstat (limited to 'man/sd_seat_get_active.xml')
-rw-r--r--man/sd_seat_get_active.xml31
1 files changed, 13 insertions, 18 deletions
diff --git a/man/sd_seat_get_active.xml b/man/sd_seat_get_active.xml
index cf70b35785..94401caa72 100644
--- a/man/sd_seat_get_active.xml
+++ b/man/sd_seat_get_active.xml
@@ -38,9 +38,9 @@
<funcprototype>
<funcdef>int <function>sd_seat_get_sessions</function></funcdef>
<paramdef>const char *<parameter>seat</parameter></paramdef>
- <paramdef>char ***<parameter>sessions</parameter></paramdef>
- <paramdef>uid_t **<parameter>uid</parameter></paramdef>
- <paramdef>unsigned int *<parameter>n_uids</parameter></paramdef>
+ <paramdef>char ***<parameter>ret_sessions</parameter></paramdef>
+ <paramdef>uid_t **<parameter>ret_uids</parameter></paramdef>
+ <paramdef>unsigned int *<parameter>ret_n_uids</parameter></paramdef>
</funcprototype>
<funcprototype>
@@ -68,21 +68,16 @@
<citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
call after use.</para>
- <para><function>sd_seat_get_sessions()</function> may be used to
- determine all sessions on the specified seat. Returns two arrays,
- one (<constant>NULL</constant> terminated) with the session
- identifiers of the sessions and one with the user identifiers of
- the Unix users the sessions belong to. An additional parameter may
- be used to return the number of entries in the latter array. This
- value is the same the return value, if the latter is nonnegative.
- The two arrays and the last parameter may be passed as
- <constant>NULL</constant> in case these values need not to be
- determined. The arrays and the strings referenced by them need to
- be freed with the libc
- <citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
- call after use. Note that instead of an empty array
- <constant>NULL</constant> may be returned and should be considered
- equivalent to an empty array.</para>
+ <para><function>sd_seat_get_sessions()</function> may be used to determine all sessions on the specified
+ seat. Returns two arrays, one (<constant>NULL</constant> terminated) with the session identifiers of the
+ sessions and one with the user identifiers of the Unix users the sessions belong to. An additional
+ parameter may be used to return the number of entries in the latter array. This value is the same as the
+ return value if the return value is nonnegative. The output parameters may be passed as
+ <constant>NULL</constant> in case these output values are not needed. The arrays and the strings
+ referenced by them need to be freed with the libc <citerefentry
+ project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry> call after
+ use. Note that instead of an empty array <constant>NULL</constant> may be returned and should be
+ considered equivalent to an empty array.</para>
<para><function>sd_seat_can_tty()</function> may be used to
determine whether a specific seat provides TTY functionality, i.e.