logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

pmem2_source_get_fd() - reads file descriptor of the data source

Description

The pmem2_source_get_fd() function reads the file descriptor of *struct pmem2_source** object describing the data source and returns it by fd parameter. This function is Linux only, on Windows use pmem2_source_get_handle(3).

Errors

The pmem2_source_get_fd() can fail with the following errors: • PMEM2_E_FILE_DESCRIPTOR_NOT_SET - in case of an instance of structpmem2_source that does not come from source type that support file descriptors, eg. anonymous data source.

Name

pmem2_source_get_fd() - reads file descriptor of the data source

Return Value

The pmem2_source_get_fd() function returns 0 on success or a negative error code on failure.

See Also

pmem2_source_get_handle(3), libpmem2(7) and <https://pmem.io>

Synopsis

#include <libpmem2.h> int pmem2_source_get_fd(const struct pmem2_source *src, int *fd);

See Also