OSDN Git Service

8e5016f95bd1e78102379385bbbfe58a17e01ead
[linuxjm/LDP_man-pages.git] / original / man3 / getutmp.3
1 .\" Copyright (c) 2008, Linux Foundation, written by Michael Kerrisk
2 .\"     <mtk.manpages@gmail.com>
3 .\"
4 .\" Permission is granted to make and distribute verbatim copies of this
5 .\" manual provided the copyright notice and this permission notice are
6 .\" preserved on all copies.
7 .\"
8 .\" Permission is granted to copy and distribute modified versions of this
9 .\" manual under the conditions for verbatim copying, provided that the
10 .\" entire resulting derived work is distributed under the terms of a
11 .\" permission notice identical to this one.
12 .\"
13 .\" Since the Linux kernel and libraries are constantly changing, this
14 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
15 .\" responsibility for errors or omissions, or for damages resulting from
16 .\" the use of the information contained herein.  The author(s) may not
17 .\" have taken the same level of care in the production of this manual,
18 .\" which is licensed free of charge, as they might when working
19 .\" professionally.
20 .\"
21 .\" Formatted or processed versions of this manual, if unaccompanied by
22 .\" the source, must acknowledge the copyright and authors of this work.
23 .\"
24 .TH GETUTMP 3 2010-09-10 "Linux" "Linux Programmer's Manual"
25 .SH NAME
26 getutmp, getutmpx \- copy utmp structure to utmpx, and vice versa
27 .SH SYNOPSIS
28 .nf
29 .BR "#define _GNU_SOURCE" "             /* See feature_test_macros(7) */"
30 .B #include <utmpx.h>
31
32 .BI " void getutmp(const struct utmpx *" ux ", struct utmp *" u );
33 .BI " void getutmpx(const struct utmp *" u ", struct utmpx *" ux );
34 .fi
35 .SH DESCRIPTION
36 The
37 .BR getutmp ()
38 function copies the fields of the
39 .I utmpx
40 structure pointed to by
41 .I ux
42 to the corresponding fields of the
43 .I utmp
44 structure pointed to by
45 .IR u .
46 The
47 .BR getutmpx ()
48 function performs the converse operation.
49 .SH RETURN VALUE
50 These functions do not return a value.
51 .SH VERSIONS
52 These functions first appeared in glibc in version 2.1.1.
53 .SH CONFORMING TO
54 These functions are nonstandard, but appear on a few other systems,
55 such as Solaris and NetBSD.
56 .SH NOTES
57 These functions exist primarily for compatibility with other
58 systems where the
59 .I utmp
60 and
61 .I utmpx
62 structures contain different fields,
63 or the size of corresponding fields differs.
64 .\" e.g., on Solaris, the utmpx structure is rather larger than utmp.
65 On Linux, the two structures contain the same fields,
66 and the fields have the same sizes.
67 .SH SEE ALSO
68 .BR getutent (3),
69 .BR utmp (5)