pmem2 API version 1.0

The PMDK repository on GitHub is the ultimate source of information on PMDK from release 2.0! For all questions and to submit eventual issues please follow to that repository. The PMDK documentation collected here should be valid up to the 1.13.1 release but is maintained only on a best-effort basis and may not reflect the latest state of the art.

comment: <> (pmem2_source_get_fd.3 – man page for pmem2_source_get_fd

NAME
SYNOPSIS
DESCRIPTION
RETURN VALUE
ERRORS
SEE ALSO

NAME

pmem2_source_get_fd() - reads file descriptor of the data source

SYNOPSIS

#include <libpmem2.h>

int pmem2_source_get_fd(const struct pmem2_source *src, int *fd);

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

RETURN VALUE

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

ERRORS

The pmem2_source_get_fd() can fail with the following errors:

  • PMEM2_E_FILE_DESCRIPTOR_NOT_SET - in case of an instance of struct pmem2_source that does not come from source type that support file descriptors, eg. anonymous data source.

SEE ALSO

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

The contents of this web site and the associated GitHub repositories are BSD-licensed open source.