/* Append entry UTMP to the wtmp-like file WTMP_FILE. */ void updwtmp32 (const char *wtmp_file, const struct utmp32 *utmp) { struct utmp in32; utmp_convert32to64 (utmp, &in32); __updwtmp (wtmp_file, &in32); }
/* Copy the information in UTMP to UTMPX. */ void getutmpx32 (const struct utmp32 *utmp, struct utmpx32 *utmpx) { struct utmp in64; struct utmpx out64; utmp_convert32to64 (utmp, &in64); __getutmpx (&in64, &out64); utmpx_convert64to32 (&out64, utmpx); }
int getutid32_r (const struct utmp32 *id, struct utmp32 *buffer, struct utmp32 **result) { struct utmp in64; struct utmp out64; struct utmp *out64p; int ret; utmp_convert32to64 (id, &in64); ret = __getutid_r (&in64, &out64, &out64p); if (ret == -1) { *result = NULL; return -1; } utmp_convert64to32 (out64p, buffer); *result = buffer; return 0; }