Veritas™ File System 5.0.1 Programmer's Reference Guide

*nentries specifies the number of entries that should be read into the buffer
in this call to vxfs_fcl_read. If *nentries is 0, vxfs_fcl_read reads as
many entries as well fit in the buffer.
Output
*buf contains *nentries FCL records of the struct fcl_record type if there is
no error.
If the requested number of entries cannot fit in a buffer of the passed size, an
FCL_ENOSPC error is returned. In this case, *bufsz is updated to contain the buffer
size required for the requested number of records. The application may use this
to reallocate a larger sized buffer and invoke vxfs_fcl_read again. *bufsz is not
changed if there is no error.
*nentries is updated to contain the number of entries read in the buffer when
vxfs_fcl_read is called and there is no error. *nentries and the returned value
are both zero when the application has reached the end of file and there are no
more records to be read.
Return values
A "0" indicates success; a non-zero indicates an error.
Note: FCL_ENOSPC is returned if there is not enough space in the buffer to store
the current record. The minimum size the buffer must be is returned in *bufsz.
After a successful call to vxfs_fcl_read, the current file position is advanced, so
that the next call to vxfs_fcl_read reads the next set of records.
vxfs_fcl_getcookie
The vxfs_fcl_getcookie and vxfs_fcl_seek functions are effective methods
for remembering a position in the FCL file that the application has processed
earlier. This then can be used as a restarting point. This is a highly useful tool for
applications.
See vxfs_fcl_seek on page 33.
The vxfs_fcl_getcookie function returns an opaque fcl_cookie structure which
embeds information comprising the current activation time of the FCL file and
an offset indicating the current position in the FCL file. This cookie can be passed
into vxfs_fcl_seek to seek to the position in the FCL file defined by the cookie.
A typical incremental backup or index-update program can read to the end of the
FCL file and perform actions based on the FCL records. The application can get
File Change Log
Application programming interface for File Change Log
32