.\" Automatically generated by Pandoc 2.0.6 .\" .TH "PMEM2_CONFIG_SET_OFFSET" "3" "2022-08-25" "PMDK - pmem2 API version 1.0" "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[]() \- 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[] .fi .SH DESCRIPTION .PP The \f[B]pmem2_config_set_offset\f[]() function configures the offset which will be used to map the contents from the specified location of the source. \f[I]*config\f[] should be already initialized, please see \f[B]pmem2_config_new\f[](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[]pmem2_source** use \f[B]pmem2_source_alignment\f[](3). By default, the offset is 0. .SH RETURN VALUE .PP The \f[B]pmem2_config_set_offset\f[]() function returns 0 on success or a negative error code on failure. .SH ERRORS .PP The \f[B]pmem2_config_set_offset\f[]() can fail with the following errors: .IP \[bu] 2 \f[B]PMEM2_E_OFFSET_OUT_OF_RANGE\f[] \- argument out of range, offset is greater than \f[B]INT64_MAX\f[] .SH SEE ALSO .PP \f[B]libpmem2\f[](7), \f[B]pmem2_source_alignment\f[](3), \f[B]pmem2_config_new\f[](3), \f[B]pmem2_map_new\f[](3), \f[B]sysconf\f[](3) and \f[B]\f[]