]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/getutmp.3
All pages: Replace the 4th argument to .TH by "Linux man-pages (unreleased)"
[thirdparty/man-pages.git] / man3 / getutmp.3
1 .\" Copyright (c) 2008, Linux Foundation, written by Michael Kerrisk
2 .\" <mtk.manpages@gmail.com>
3 .\"
4 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
5 .\"
6 .TH GETUTMP 3 2021-03-22 "Linux man-pages (unreleased)" "Linux Programmer's Manual"
7 .SH NAME
8 getutmp, getutmpx \- copy utmp structure to utmpx, and vice versa
9 .SH LIBRARY
10 Standard C library
11 .RI ( libc ", " \-lc )
12 .SH SYNOPSIS
13 .nf
14 .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
15 .B #include <utmpx.h>
16 .PP
17 .BI "void getutmp(const struct utmpx *" ux ", struct utmp *" u );
18 .BI "void getutmpx(const struct utmp *" u ", struct utmpx *" ux );
19 .fi
20 .SH DESCRIPTION
21 The
22 .BR getutmp ()
23 function copies the fields of the
24 .I utmpx
25 structure pointed to by
26 .I ux
27 to the corresponding fields of the
28 .I utmp
29 structure pointed to by
30 .IR u .
31 The
32 .BR getutmpx ()
33 function performs the converse operation.
34 .SH RETURN VALUE
35 These functions do not return a value.
36 .SH VERSIONS
37 These functions first appeared in glibc in version 2.1.1.
38 .SH ATTRIBUTES
39 For an explanation of the terms used in this section, see
40 .BR attributes (7).
41 .ad l
42 .nh
43 .TS
44 allbox;
45 lbx lb lb
46 l l l.
47 Interface Attribute Value
48 T{
49 .BR getutmp (),
50 .BR getutmpx ()
51 T} Thread safety MT-Safe
52 .TE
53 .hy
54 .ad
55 .sp 1
56 .SH STANDARDS
57 These functions are nonstandard, but appear on a few other systems,
58 such as Solaris and NetBSD.
59 .SH NOTES
60 These functions exist primarily for compatibility with other
61 systems where the
62 .I utmp
63 and
64 .I utmpx
65 structures contain different fields,
66 or the size of corresponding fields differs.
67 .\" e.g., on Solaris, the utmpx structure is rather larger than utmp.
68 On Linux, the two structures contain the same fields,
69 and the fields have the same sizes.
70 .SH SEE ALSO
71 .BR utmpdump (1),
72 .BR getutent (3),
73 .BR utmp (5)