summaryrefslogtreecommitdiff
path: root/src/systemd/sd-login.h
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 /src/systemd/sd-login.h
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 'src/systemd/sd-login.h')
-rw-r--r--src/systemd/sd-login.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/systemd/sd-login.h b/src/systemd/sd-login.h
index e18f01bb67..360f44d341 100644
--- a/src/systemd/sd-login.h
+++ b/src/systemd/sd-login.h
@@ -180,7 +180,11 @@ int sd_seat_get_active(const char *seat, char **session, uid_t *uid);
/* Return sessions and users on seat. Returns number of sessions.
* If sessions is NULL, this returns only the number of sessions. */
-int sd_seat_get_sessions(const char *seat, char ***sessions, uid_t **uid, unsigned *n_uids);
+int sd_seat_get_sessions(
+ const char *seat,
+ char ***ret_sessions,
+ uid_t **ret_uids,
+ unsigned *ret_n_uids);
/* Return whether the seat is multi-session capable */
int sd_seat_can_multi_session(const char *seat) _sd_deprecated_;