getutmp(3)

getutmp3

Copy utmp structure to utmpx, and vice versa

Usage

#define _GNU_SOURCE             /* See feature_test_macros(7) */
#include <utmpx.h>

void getutmp(const struct utmpx *ux, struct utmp *u); void getutmpx(const struct utmp *u, struct utmpx *ux);

Library

Standard C library (libc, -lc)

Overview

The getutmp() function copies the fields of the utmpx structure pointed to by ux to the corresponding fields of the utmp structure pointed to by u. The getutmpx() function performs the converse operation.

Return value

These functions do not return a value.

Attributes

For an explanation of the terms used in this section, see attributes(7).

InterfaceAttributeValue
getutmp(), getutmpx()Thread safetyMT-Safe

Notes

These functions exist primarily for compatibility with other systems where the utmp and utmpx structures contain different fields, or the size of corresponding fields differs. On Linux, the two structures contain the same fields, and the fields have the same sizes.

Releases

10 releases since Debian 5.0 (Lenny); the text changed 9 times.

  1. 5.0
  2. 6.0
  3. 7
  4. 8
  5. 9
  6. 10
  7. 11
  8. 12
  9. 13
  10. Arch

Standards

None.

History

glibc 2.1.1. Solaris, NetBSD.

From man-pages 6.19-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.