June 2001
Intermediate to advanced
688 pages
19h 18m
English
#include <db.h> int db_env_set_func_ioinfo(int (*func_ioinfo)(const char *path, int fd, u_int32_t *mbytesp, u_int32_t *bytesp, u_int32_t *iosizep));
The Berkeley DB library requires the ability to determine the size and I/O characteristics of a file. The func_ioinfo argument must conform to the following interface:
int ioinfo(const char *path, int fd, u_int32_t *mbytesp, u_int32_t *bytesp, u_int32_t *iosizep);
The path argument is the pathname of the file to be checked, and the fd argument is an open file descriptor on the file.
If the mbytesp and bytesp arguments are non-NULL, the ioinfo function must return in them the size of the file: the number of megabytes in the file into the memory location referenced ...