| 1 |
//po4a: entry man manual |
| 2 |
= ll2_new_context(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_new_context - Allocates context which defines the lastlog2 environment. |
| 13 |
|
| 14 |
== SYNOPSIS |
| 15 |
|
| 16 |
*#include <lastlog2.h>* |
| 17 |
|
| 18 |
*ll2_context * ll2_new_context(const char *__db_path__); |
| 19 |
|
| 20 |
== DESCRIPTION |
| 21 |
|
| 22 |
Defines lastlog2 context e.g. database file, which will be used for |
| 23 |
any other lastlog2 call. If _db_path_ is NULL, the default path defined |
| 24 |
in _LL2_DEFAULT_DATABASE_ will be taken. |
| 25 |
|
| 26 |
-------------------------------------- |
| 27 |
|
| 28 |
const char *db_path = "/var/lib/lastlog/lastlog2.db"; |
| 29 |
ll2_context *context = ll2_new_context(db_path); |
| 30 |
|
| 31 |
-------------------------------------- |
| 32 |
|
| 33 |
== RETURN VALUE |
| 34 |
|
| 35 |
Returns context which will be used for all other lastlog2 library calls. |
| 36 |
This context should be released with _ll2_unref_context_ when it is not |
| 37 |
needed anymore. |
| 38 |
Returns NULL on an error. |
| 39 |
|
| 40 |
== AUTHORS |
| 41 |
|
| 42 |
mailto:[email protected][Thorsten Kukuk] |
| 43 |
|
| 44 |
== SEE ALSO |
| 45 |
|
| 46 |
*lastlog2*(3), |
| 47 |
*ll2_unref_context*(3), |
| 48 |
*ll2_read_all*(3), |
| 49 |
*ll2_write_entry*(3), |
| 50 |
*ll2_read_entry*(3), |
| 51 |
*ll2_remove_entry*(3), |
| 52 |
*ll2_update_login_time*(3), |
| 53 |
*ll2_import_lastlog*(3) |
| 54 |
|
| 55 |
include::man-common/bugreports.adoc[] |
| 56 |
|
| 57 |
include::man-common/footer-lib.adoc[] |
| 58 |
|
| 59 |
ifdef::translation[] |
| 60 |
include::man-common/translation.adoc[] |
| 61 |
endif::[] |