| 1 |
'\" t |
| 2 |
.\" Copyright, the authors of the Linux man-pages project |
| 3 |
.\" |
| 4 |
.\" SPDX-License-Identifier: Linux-man-pages-copyleft |
| 5 |
.\" |
| 6 |
.TH getutmp 3 2025-05-17 "Linux man-pages 6.18" |
| 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 |
.P |
| 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 ATTRIBUTES |
| 37 |
For an explanation of the terms used in this section, see |
| 38 |
.BR attributes (7). |
| 39 |
.TS |
| 40 |
allbox; |
| 41 |
lbx lb lb |
| 42 |
l l l. |
| 43 |
Interface Attribute Value |
| 44 |
T{ |
| 45 |
.na |
| 46 |
.nh |
| 47 |
.BR getutmp (), |
| 48 |
.BR getutmpx () |
| 49 |
T} Thread safety MT-Safe |
| 50 |
.TE |
| 51 |
.SH STANDARDS |
| 52 |
None. |
| 53 |
.SH HISTORY |
| 54 |
glibc 2.1.1. |
| 55 |
Solaris, 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 utmpdump (1), |
| 69 |
.BR getutent (3), |
| 70 |
.BR utmp (5) |