1PMEM2_SOURCE_GET_FD(3) PMDK Programmer's Manual PMEM2_SOURCE_GET_FD(3)
2
3
4
6 pmem2_source_get_fd() - reads file descriptor of the data source
7
9 #include <libpmem2.h>
10
11 int pmem2_source_get_fd(const struct pmem2_source *src, int *fd);
12
14 The pmem2_source_get_fd() function reads the file descriptor of *struct
15 pmem2_source** object describing the data source and returns it by fd
16 parameter.
17
18 This function is Linux only, on Windows use pmem2_source_get_handle(3).
19
21 The pmem2_source_get_fd() function returns 0 on success or a negative
22 error code on failure.
23
25 The pmem2_source_get_fd() can fail with the following errors:
26
27 • PMEM2_E_FILE_DESCRIPTOR_NOT_SET - in case of an instance of struct
28 pmem2_source that does not come from source type that support file
29 descriptors, eg. anonymous data source.
30
32 pmem2_source_get_handle(3), libpmem2(7) and <http://pmem.io>
33
34
35
36PMDK - pmem2 API version 1.0 2020-10-28 PMEM2_SOURCE_GET_FD(3)