.\" Automatically generated by Pandoc 2.9.2.1 .\" .TH "" "" "2023-05-26" "PMDK - " "PMDK Programmer's Manual" .hy .\" SPDX-License-Identifier: BSD-3-Clause .\" Copyright 2020, Intel Corporation .SH NAME .PP \f[B]pmem2_config_set_offset\f[R]() - set offset in the pmem2_config structure .SH SYNOPSIS .IP .nf \f[C] #include struct pmem2_config; int pmem2_config_set_offset(struct pmem2_config *config, size_t offset); \f[R] .fi .SH DESCRIPTION .PP The \f[B]pmem2_config_set_offset\f[R]() function configures the offset which will be used to map the contents from the specified location of the source. \f[I]*config\f[R] should be already initialized, please see \f[B]pmem2_config_new\f[R](3) for details. The \f[I]must be a multiple of the alignment required for the config. The alignment requirements are specific to a data source. To retrieve the alignment required for specific instance of \f[R]pmem2_source** use \f[B]pmem2_source_alignment\f[R](3). By default, the offset is 0. .SH RETURN VALUE .PP The \f[B]pmem2_config_set_offset\f[R]() function returns 0 on success or a negative error code on failure. .SH ERRORS .PP The \f[B]pmem2_config_set_offset\f[R]() can fail with the following errors: .IP \[bu] 2 \f[B]PMEM2_E_OFFSET_OUT_OF_RANGE\f[R] - argument out of range, offset is greater than \f[B]INT64_MAX\f[R] .SH SEE ALSO .PP \f[B]libpmem2\f[R](7), \f[B]pmem2_source_alignment\f[R](3), \f[B]pmem2_config_new\f[R](3), \f[B]pmem2_map_new\f[R](3), \f[B]sysconf\f[R](3) and \f[B]\f[R]