LIBHAMMER(3)

NAME
libhammer_get_fsinfo, libhammer_get_next_pfs, libhammer_get_prev_pfs, libhammer_get_first_pfs, libhammer_get_last_pfs, libhammer_free_fsinfo - libhammer information functions

LIBRARY
libhammer

SYNOPSIS
#include <libhammer.h>
libhammer_fsinfo_t
libhammer_get_fsinfo(const char *path);
libhammer_pfsinfo_t
libhammer_get_first_pfs(libhammer_fsinfo_t fsinfo);
libhammer_pfsinfo_t
libhammer_get_last_pfs(libhammer_fsinfo_t fsinfo);
libhammer_pfsinfo_t
libhammer_get_next_pfs(libhammer_pfsinfo_t pfsinfo);
libhammer_pfsinfo_t
libhammer_get_prev_pfs(libhammer_pfsinfo_t pfsinfo);
void
libhammer_free_fsinfo(libhammer_fsinfo_t fsinfo);

DESCRIPTION
The libhammer_get_fsinfo() iterates all the PFSs from a given path belonging to a HAMMER file system and returns libhammer_fsinfo_t fsinfo which holds a TAILQ of libhammer_pfsinfo structs, one per PFS found.

The list of found PFSs can be iterated with libhammer_get_first_pfs(), libhammer_get_last_pfs(), libhammer_get_next_pfs() and libhammer_get_prev_pfs().

Note that to use the next and previous functions described above you need to store the returning libhammer_pfsinfo_t value from the first and last functions.

libhammer_free_fsinfo() frees up all the resources allocated previously by libhammer_get_fsinfo().

RETURN VALUES
libhammer_get_fsinfo() returns a libhammer_fsinfo_t in any case where path is in a HAMMER file system or NULL if there was any other problem. You can check errno in the error cases.

libhammer_get_first_pfs() and libhammer_get_last_pfs() must return a libhammer_pfs_t if the fsinfo passed in is valid. libhammer_get_next_pfs() and libhammer_get_prev_pfs() return a libhammer_pfsinfo_t or NULL in case there are no more elements.

SEE ALSO
libhammer(3), libhammer_snapshot(3), libhammer_stats(3), HAMMER(5), hammer(8)

AUTHORS
This man page was written by Antonio Huete Jimenez <tuxillo@quantumachine.net>.