From: Lennart Poettering Date: Mon, 19 Dec 2011 13:42:59 +0000 (+0100) Subject: man: various updates X-Git-Tag: v38~144^2~30 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=595aae376fae21f885ec9af2cac1aaf3ff3e9bee;hp=01448ff92d9549785242ffab453bf5bcde348c61 man: various updates --- diff --git a/man/sd-login.xml b/man/sd-login.xml index 62ec6ffef..9926d2b85 100644 --- a/man/sd-login.xml +++ b/man/sd-login.xml @@ -75,7 +75,26 @@ actively make changes to the seat configuration, terminate login sessions, or switch session on a seat you need to utilize the D-Bus API of - systemd-logind. + systemd-logind, instead. + + These functions access data in + /proc, + /sys/fs/cgroup and + /run. All of these are virtual + file systems, hence the runtime cost of the accesses + is relatively cheap. + + If the functions return string arrays, these are + generally NULL terminated and need to be freed by the + caller with the libc + free3 + call after use, including the strings referenced + therein. Similar, individual strings returned need to + be freed, as well. + + As a special exception, instead of an empty + string array NULL may be returned, which should be + treated equivalent to an empty string array. See sd_pid_get_session3, diff --git a/man/sd_get_seats.xml b/man/sd_get_seats.xml index bbc396a09..2ac76500e 100644 --- a/man/sd_get_seats.xml +++ b/man/sd_get_seats.xml @@ -76,11 +76,13 @@ sd_get_seats() may be used to determine all currently available local - seats. Returns an array of seat identifiers. The - returned array and all strings it references need to - be freed with the libc + seats. Returns a NULL terminated array of seat + identifiers. The returned array and all strings it + references need to be freed with the libc free3 - call after use. + call after use. Note that instead of an empty array + NULL may be returned and should be considered + equivalent to an empty array. Similar, sd_get_sessions() may be used to determine all current login sessions. @@ -118,7 +120,7 @@ systemd1, sd-login7, - sd_session_get_seat3, + sd_session_get_seat3 diff --git a/man/sd_login_monitor_new.xml b/man/sd_login_monitor_new.xml index 2b37f00d3..de484329a 100644 --- a/man/sd_login_monitor_new.xml +++ b/man/sd_login_monitor_new.xml @@ -165,7 +165,7 @@ systemd1, sd-login7, - sd_get_seats3, + sd_get_seats3 diff --git a/man/sd_seat_get_active.xml b/man/sd_seat_get_active.xml index e729a653b..14cda60a5 100644 --- a/man/sd_seat_get_active.xml +++ b/man/sd_seat_get_active.xml @@ -101,7 +101,9 @@ determined. The arrays and the strings referenced by them need to be freed with the libc free3 - call after use. + call after use. Note that instead of an empty array + NULL may be returned and should be considered + equivalent to an empty array. sd_seat_can_multi_session() may be used to determine whether a specific seat is @@ -143,7 +145,7 @@ systemd1, sd-login7, - sd_session_get_seat3, + sd_session_get_seat3 diff --git a/man/sd_session_is_active.xml b/man/sd_session_is_active.xml index 82919f84f..88b22fd9f 100644 --- a/man/sd_session_is_active.xml +++ b/man/sd_session_is_active.xml @@ -127,7 +127,7 @@ systemd1, sd-login7, - sd_pid_get_session3, + sd_pid_get_session3 diff --git a/man/sd_uid_get_state.xml b/man/sd_uid_get_state.xml index a4e9e7308..67776257d 100644 --- a/man/sd_uid_get_state.xml +++ b/man/sd_uid_get_state.xml @@ -126,10 +126,13 @@ identifiers in sessions which needs to be freed by the caller with the libc free3 - call after use, including all the strings referenced. If - the string array parameter is passed as NULL the array - will not be filled in, but the return code still - indicates the number of current sessions. + call after use, including all the strings + referenced. If the string array parameter is passed as + NULL the array will not be filled in, but the return + code still indicates the number of current + sessions. Note that instead of an empty array NULL may + be returned and should be considered equivalent to an + empty array. Similar, sd_uid_get_seats() may be used to determine the list of seats on which @@ -175,7 +178,7 @@ systemd1, sd-login7, - sd_pid_get_owner_uid3, + sd_pid_get_owner_uid3