DOKK / manpages / debian 11 / libcxl-dev / cxl_get_cr_device.3.en
CXL_GET_CR_DEVICE(3) CXL Programmer's Manual CXL_GET_CR_DEVICE(3)

cxl_get_cr_device - get the device ID out of an AFU configuration record

#include <libcxl.h>

int cxl_get_cr_device(struct cxl_afu_h *afu, long cr_num, long *valp);

cxl_get_cr_device() copies the device ID found in the afu configuration record number cr_num, to the long integer pointed to by valp.

On success, 0 is returned. On error, -1 is returned and errno is set appropriately.

Invalid argument value.
Configuration record does not exist.
Insufficient memory.

cxl(3), cxl_adapter_afu_next(3), cxl_afu_fd_to_h(3), cxl_afu_next(3), cxl_afu_open_dev(3), cxl_afu_open_h(3), cxl_get_cr_class(3), cxl_get_cr_vendor(3)

2017-05-24 LIBCXL 1.5