summaryrefslogtreecommitdiff
path: root/src/login/test-login.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-02-11 03:45:23 +0100
committerLennart Poettering <lennart@poettering.net>2012-02-13 23:50:02 +0100
commit50b1678aaba9d3c2be5115db34a822911d791b8c (patch)
tree19c891bcebda0d73b22f2a527cc3b5303010b59a /src/login/test-login.c
parent3d88c0a7d1b3acafdf5311a6081256bd90cc1103 (diff)
sd-login: if NULL or 0 is passed as first parameter of the sd_xxx functions, work on objects of the calling process
Diffstat (limited to 'src/login/test-login.c')
-rw-r--r--src/login/test-login.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/login/test-login.c b/src/login/test-login.c
index ae041b6a59..4596721060 100644
--- a/src/login/test-login.c
+++ b/src/login/test-login.c
@@ -125,6 +125,11 @@ int main(int argc, char* argv[]) {
printf("seats = %s\n", t);
free(t);
+ r = sd_seat_get_active(NULL, &t, NULL);
+ assert_se(r >= 0);
+ printf("active session on current seat = %s\n", t);
+ free(t);
+
assert_se(sd_get_seats(NULL) == r);
r = sd_get_sessions(&sessions);