|
ginnOS
The reference: libc, the libraries and the kernel
|
librat: the queries. More...
#include "internal.h"#include <dirent.h>#include <errno.h>#include <stdlib.h>#include <string.h>#include <sys/stat.h>#include <unistd.h>Functions | |
| int | rat_info (rat_t *rat, const char *name, rat_info_t *info_out, rat_error_t *err) |
| the fields of an installed package. | |
| int | rat_files (rat_t *rat, const char *name, rat_entry_t **entries_out, int *count_out, rat_error_t *err) |
| the folders, files and links of an installed package, sorted by path. | |
| int | rat_list (rat_t *rat, rat_info_t **infos_out, int *count_out, rat_error_t *err) |
| the installed packages, sorted by name. | |
| int | rat_owner (rat_t *rat, const char *path, char name_out[RAT_NAME_MAX+1], rat_error_t *err) |
| which package owns a path. | |
| int | rat_verify (rat_t *rat, const char *name, rat_note_t note, void *context, int *problems_out, rat_error_t *err) |
| compare the files of an installed package with the record: a missing file, another type, other permissions, other data. | |
librat: the queries.
the installed packages, their fields and files, the owner of a path, and the check of installed files.
| int rat_info | ( | rat_t * | rat, |
| const char * | name, | ||
| rat_info_t * | info_out, | ||
| rat_error_t * | err ) |
the fields of an installed package.
| int rat_files | ( | rat_t * | rat, |
| const char * | name, | ||
| rat_entry_t ** | entries_out, | ||
| int * | count_out, | ||
| rat_error_t * | err ) |
the folders, files and links of an installed package, sorted by path.
| entries_out | gets an array to free with rat_entries_free. |
| int rat_list | ( | rat_t * | rat, |
| rat_info_t ** | infos_out, | ||
| int * | count_out, | ||
| rat_error_t * | err ) |
the installed packages, sorted by name.
| infos_out | gets an array to free with rat_infos_free. |
| int rat_owner | ( | rat_t * | rat, |
| const char * | path, | ||
| char | name_out[RAT_NAME_MAX+1], | ||
| rat_error_t * | err ) |
which package owns a path.
| path | an absolute path on the root, as "/usr/bin/lua". |
| name_out | gets the package name, or "" when the base image owns the path. |
| int rat_verify | ( | rat_t * | rat, |
| const char * | name, | ||
| rat_note_t | note, | ||
| void * | context, | ||
| int * | problems_out, | ||
| rat_error_t * | err ) |
compare the files of an installed package with the record: a missing file, another type, other permissions, other data.
| note | gets one line for each difference. |
| problems_out | gets the number of differences. |