LIBHAMMER(3)

NAME
libhammer_pfs_get_snapshots, libhammer_get_next_snap, libhammer_get_prev_snap, libhammer_get_first_snap, libhammer_get_last_snap, libhammer_pfs_free_snapshots - libhammer snapshot functions

LIBRARY
libhammer

SYNOPSIS
#include <libhammer.h>
int
libhammer_pfs_get_snapshots(libhammer_fsinfo_t fsinfo, libhammer_pfsinfo_t pip);
libhammer_snapinfo_t
libhammer_get_first_snap(libhammer_pfsinfo_t pip);
libhammer_snapinfo_t
libhammer_get_last_snap(libhammer_pfsinfo_t pip);
libhammer_snapinfo_t
libhammer_get_next_snap(libhammer_snapinfo_t sip);
libhammer_snapinfo_t
libhammer_get_prev_snap(libhammer_snapinfo_t sip);
void
libhammer_pfs_free_snapshots(libhammer_pfsinfo_t pip);

DESCRIPTION
The libhammer_pfs_get_snapshots() gathers all the snapshot information for the PFS specified in pip.

The list of snapshots can be iterated with libhammer_get_first_snap(), libhammer_get_last_snap(), libhammer_get_next_snap() and libhammer_get_prev_snap().

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

The libhammer_pfs_free_snapshots() function releases all the resources used to hold the information of the snapshots for a particular PFS.

RETURN VALUES
libhammer_pfs_get_snapshots() returns 0 when successful and -1 in the case of failure. The errno value indicating the error is stored within the passed libhammer_pfsinfo_t in the libhammer_head struct.

libhammer_get_first_snap() and libhammer_get_last_snap() must return a libhammer_snapinfo_t if the pip passed in is valid. libhammer_get_next_snap() and libhammer_get_prev_snap() return a libhammer_snapinfo_t or NULL in case there are no more elements.

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

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