Debian Codegraph @

liblastlog2/man/ll2_import_lastlog.3.adoc

raw
1 //po4a: entry man manual
2 = ll2_import_lastlog(3)
3 :doctype: manpage
4 :man manual: Programmer's Manual
5 :man source: util-linux {release-version}
6 :page-layout: base
7 :lib: liblastlog2
8 :firstversion: 2.40
9
10 == NAME
11
12 ll2_import_lastlog - Imports old lastlog file.
13
14 == SYNOPSIS
15
16 *#include <lastlog2.h>*
17
18 *int ll2_import_lastlog (struct ll2_context *__context__,
19 const char *__lastlog_file__,
20 char **__error__);*
21
22 == DESCRIPTION
23
24 Imports all entries from _lastlog_file_ file (*lastlog*(8)) into
25 lastlog2 database defined with _context_.
26 If _context_ is NULL, the default database, defined in _LL2_DEFAULT_DATABASE_,
27 will be taken.
28
29 --------------------------------------
30 char *error = NULL;
31 const char *lastlog_path = "/var/log/lastlog";
32
33 int ret = ll2_import_lastlog (NULL, lastlog_path, &error);
34 --------------------------------------
35
36 == RETURN VALUE
37
38 Returns 0 on success, -ENOMEM or -1 on other failure.
39 _error_ contains an error string if the return value is -1.
40 _error_ is not guaranteed to contain an error string, could also be NULL.
41 _error_ should be freed by the caller.
42
43 == AUTHORS
44
45 mailto:[email protected][Thorsten Kukuk]
46
47 == SEE ALSO
48
49 *lastlog2*(3),
50 *ll2_new_context*(3),
51 *ll2_unref_context*(3),
52 *ll2_read_all*(3),
53 *ll2_write_entry*(3),
54 *ll2_read_entry*(3),
55 *ll2_update_login_time*(3),
56 *ll2_rename_user*(3),
57 *ll2_remove_entry*(3)
58
59 include::man-common/bugreports.adoc[]
60
61 include::man-common/footer-lib.adoc[]
62
63 ifdef::translation[]
64 include::man-common/translation.adoc[]
65 endif::[]