mirror of
https://github.com/morgan9e/systemd
synced 2026-04-15 08:56:15 +09:00
sd-login: rename sd_seat_get_active arguments
Follow the argument comment naming.
This commit is contained in:
@@ -888,11 +888,11 @@ _public_ int sd_session_get_leader(const char *session, pid_t *leader) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
_public_ int sd_seat_get_active(const char *seat, char **session, uid_t *uid) {
|
||||
_public_ int sd_seat_get_active(const char *seat, char **ret_session, uid_t *ret_uid) {
|
||||
_cleanup_free_ char *p = NULL, *s = NULL, *t = NULL;
|
||||
int r;
|
||||
|
||||
assert_return(session || uid, -EINVAL);
|
||||
assert_return(ret_session || ret_uid, -EINVAL);
|
||||
|
||||
r = file_of_seat(seat, &p);
|
||||
if (r < 0)
|
||||
@@ -906,20 +906,20 @@ _public_ int sd_seat_get_active(const char *seat, char **session, uid_t *uid) {
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
if (session && !s)
|
||||
if (ret_session && !s)
|
||||
return -ENODATA;
|
||||
|
||||
if (uid && !t)
|
||||
if (ret_uid && !t)
|
||||
return -ENODATA;
|
||||
|
||||
if (uid && t) {
|
||||
r = parse_uid(t, uid);
|
||||
if (ret_uid && t) {
|
||||
r = parse_uid(t, ret_uid);
|
||||
if (r < 0)
|
||||
return r;
|
||||
}
|
||||
|
||||
if (session && s)
|
||||
*session = TAKE_PTR(s);
|
||||
if (ret_session && s)
|
||||
*ret_session = TAKE_PTR(s);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -200,7 +200,7 @@ int sd_session_get_tty(const char *session, char **display);
|
||||
int sd_session_get_vt(const char *session, unsigned *vtnr);
|
||||
|
||||
/* Return active session and user of seat */
|
||||
int sd_seat_get_active(const char *seat, char **session, uid_t *uid);
|
||||
int sd_seat_get_active(const char *seat, char **ret_session, uid_t *ret_uid);
|
||||
|
||||
/* Return sessions and users on seat. Returns number of sessions.
|
||||
* If sessions is NULL, this returns only the number of sessions. */
|
||||
|
||||
Reference in New Issue
Block a user