PMDK man page

pmemset_source_from_file

NAME
SYNOPSIS
DESCRIPTION
RETURN VALUE
ERRORS
SEE ALSO

NAME

pmemset_source_from_file()

SYNOPSIS

#include <libpmemset.h>

int pmemset_source_from_file(struct pmemset_source **src, const char *file);
int pmemset_xsource_from_file(struct pmemset_source **src, const char *file, unsigned flags);
int pmemset_source_delete(struct pmemset_source **src);

DESCRIPTION

pmemset_source_from_file() function instantiates a new struct pmemset_source** object describing the data source and sets a path to the file in it. pmemset_xsource_from_file() is equivalent to pmemset_source_from_file(), but with additional *flags argument that is a bitmask of the following values:

Obtained source is ready to be passed on to the pmemset_part_new() function. See pmemset_part_new(3) for details.

The pmemset_source_delete() function frees *src and sets *src to NULL. If *src is NULL, no operation is performed.

RETURN VALUE

The pmemset_source_from_file() and pmemset_xsource_from_file() functions return 0 on success or negative error code on failure.

The pmemset_source_delete() function always returns 0.

ERRORS

The pmemset_source_from_file() and pmemset_xsource_from_file() can fail with the following errors:

The pmemset_xsource_from_file() can also fail with the error:

SEE ALSO

pmemset_part_map(3), pmemset_part_new(3), libpmemset(7) and http://pmem.io