1PMEM2_SOURCE_GET_FD(3)     PMDK Programmer's Manual     PMEM2_SOURCE_GET_FD(3)
2
3
4

NAME

6       pmem2_source_get_fd() - reads file descriptor of the data source
7

SYNOPSIS

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

DESCRIPTION

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

RETURN VALUE

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

ERRORS

25       The pmem2_source_get_fd() can fail with the following errors:
26
27PMEM2_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

SEE ALSO

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)
Impressum