1 //po4a: entry man manual
2 = ll2_update_login_time(3)
4 :man manual: Programmer's Manual
5 :man source: util-linux {release-version}
12 ll2_update_login_time - Writes an *new* entry with updated login time.
16 *#include <lastlog2.h>*
18 *int ll2_update_login_time (struct ll2_context *__context__,
19 const char *__user__, int64_t __ll_time__,
24 Writes an *new* entry to database, defined in _context_, for user _user_.
25 Time is set by _ll_time_ whereas the other values are taken from
26 an already existing entry.
27 If _context_ is NULL, the default database, defined in _LL2_DEFAULT_DATABASE_,
30 --------------------------------------
32 const char *user = "root";
33 int64_t login_time = time(0); // Get the system time;
35 int ret = ll2_update_login_time (NULL, user, login_time, &error);
36 --------------------------------------
40 Returns 0 on success, -ENOMEM or -1 on other failure.
41 _error_ contains an error string if the return value is -1.
42 _error_ is not guaranteed to contain an error string. It could also be NULL if the return value is -1.
43 _error_ should be freed by the caller.
47 Thorsten Kukuk (kukuk@suse.de)
53 *ll2_unref_context(3),
57 *ll2_remove_entry*(3),
59 *ll2_import_lastlog*(3)
61 include::man-common/bugreports.adoc[]
63 include::man-common/footer-lib.adoc[]
66 include::man-common/translation.adoc[]