LL2_READ_ALL(3) LL2_READ_ALL(3) ll2_read_all - (callback) . #include int ll2_read_all (struct ll2_context *context, int (*callback)(const char *user, int64_t ll_time, const char *tty, const char *rhost, const char *pam_service, const char *cb_error), char **error); context callback . context NULL LL2_DEFAULT_DATABASE. char *error = NULL; const char *user = "root"; static int callback (const char *res_user, int64_t ll_time, const char *res_tty, const char *res_rhost, const char *res_service, const char *cb_error) { /* != 0 */ return 0; } int ret = ll2_read_all (NULL, callback, &error); 0 -ENOMEM -1 . error -1. error NULL . error . lastlog2 errno ENOENT . Thorsten Kukuk lastlog2(3) ll2_new_context(3) ll2_unref_context(3) ll2_write_entry(3) ll2_read_entry(3) ll2_update_login_time(3) ll2_remove_entry(3) ll2_rename_user(3) ll2_import_lastlog(3) . liblastlog2 util-linux 2.40. . util-linux 2.42.1 2026-05-18 LL2_READ_ALL(3)