Install serial-getty@ units under getty.target
[external/systemd.git] / man / sd_get_seats.3
1 '\" t
2 .\"     Title: sd_get_seats
3 .\"    Author: Lennart Poettering <lennart@poettering.net>
4 .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
5 .\"      Date: 02/15/2012
6 .\"    Manual: sd_get_seats
7 .\"    Source: systemd
8 .\"  Language: English
9 .\"
10 .TH "SD_GET_SEATS" "3" "02/15/2012" "systemd" "sd_get_seats"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 .ie \n(.g .ds Aq \(aq
19 .el       .ds Aq '
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
24 .nh
25 .\" disable justification (adjust text to left margin only)
26 .ad l
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
30 .SH "NAME"
31 sd_get_seats, sd_get_sessions, sd_get_uids \- Determine available seats, sessions and logged in users
32 .SH "SYNOPSIS"
33 .sp
34 .ft B
35 .nf
36 #include <systemd/sd\-login\&.h>
37 .fi
38 .ft
39 .HP \w'int\ sd_get_seats('u
40 .BI "int sd_get_seats(char***\ " "seats" ");"
41 .HP \w'int\ sd_get_sessions('u
42 .BI "int sd_get_sessions(char***\ " "sessions" ");"
43 .HP \w'int\ sd_get_uids('u
44 .BI "int sd_get_uids(char***\ " "sessions" ");"
45 .SH "DESCRIPTION"
46 .PP
47 \fBsd_get_seats()\fR
48 may be used to determine all currently available local seats\&. Returns a NULL terminated array of seat identifiers\&. The returned array and all strings it references need to be freed with the libc
49 \fBfree\fR(3)
50 call after use\&. Note that instead of an empty array NULL may be returned and should be considered equivalent to an empty array\&.
51 .PP
52 Similar,
53 \fBsd_get_sessions()\fR
54 may be used to determine all current login sessions\&.
55 .PP
56 Similar,
57 \fBsd_get_uids()\fR
58 may be used to determine all Unix users who currently have login sessions\&.
59 .SH "RETURN VALUE"
60 .PP
61 On success
62 \fBsd_get_seats()\fR,
63 \fBsd_get_sessions()\fR
64 and
65 \fBsd_get_uids()\fR
66 return the number of entries in the arrays\&. On failure, these calls return a negative errno\-style error code\&.
67 .SH "NOTES"
68 .PP
69 The
70 \fBsd_get_seats()\fR,
71 \fBsd_get_sessions()\fR
72 and
73 \fBsd_get_uids()\fR
74 interfaces are available as shared library, which can be compiled and linked to with the
75 libsystemd\-login
76 \fBpkg-config\fR(1)
77 file\&.
78 .SH "SEE ALSO"
79 .PP
80
81 \fBsystemd\fR(1),
82 \fBsd-login\fR(7),
83 \fBsd_session_get_seat\fR(3)
84 .SH "AUTHOR"
85 .PP
86 \fBLennart Poettering\fR <\&lennart@poettering\&.net\&>
87 .RS 4
88 Developer
89 .RE