diff options
author | John Levon <john.levon@nutanix.com> | 2021-04-13 10:35:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-13 10:35:59 +0100 |
commit | 451b4180c18722b11047ba6c7554e24dde0004f9 (patch) | |
tree | b4c14a5bc834701f5fff7fc7fc498c7b023d9c7b /include | |
parent | 944da3686dc5e70e104fadf0d3acd616312d1388 (diff) | |
download | libvfio-user-451b4180c18722b11047ba6c7554e24dde0004f9.zip libvfio-user-451b4180c18722b11047ba6c7554e24dde0004f9.tar.gz libvfio-user-451b4180c18722b11047ba6c7554e24dde0004f9.tar.bz2 |
dma: use ERROR_INT()
The first in a series excising the use of the "return -errno" idiom. This is a
non-standard usage, and in userspace, we have "errno" for delivering side-band
error values. As there have been multiple bugs from not using standard error
return methods like -1+errno or NULL+errno, let's do that.
Signed-off-by: John Levon <john.levon@nutanix.com>
Reviewed-by: Thanos Makatos <thanos.makatos@nutanix.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/libvfio-user.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/libvfio-user.h b/include/libvfio-user.h index a43f38a..f2876a1 100644 --- a/include/libvfio-user.h +++ b/include/libvfio-user.h @@ -404,9 +404,9 @@ typedef void (vfu_dma_register_cb_t)(vfu_ctx_t *vfu_ctx, vfu_dma_info_t *info); * This is required if you want to be able to access guest memory directly via * a mapping. * - * The callback should return 0 on success, errno on failure (although - * unregister should not fail: this will not stop a guest from unregistering the - * region). + * The callback should return 0 on success, -1 with errno set on failure + * (although unregister should not fail: this will not stop a guest from + * unregistering the region). * * @vfu_ctx: the libvfio-user context * @info: the DMA info |