diff options
author | John Levon <john.levon@nutanix.com> | 2021-01-04 16:22:48 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-04 16:22:48 +0000 |
commit | 13f1cd8893fad76359c0f1b5232827ad095d1987 (patch) | |
tree | fcc0cfb307d262a4f25df722a906971d62b7ba3f /samples/gpio-pci-idio-16.c | |
parent | dd8fb3c0b178e18d7cdbf23e213f9c2045d77a33 (diff) | |
download | libvfio-user-13f1cd8893fad76359c0f1b5232827ad095d1987.zip libvfio-user-13f1cd8893fad76359c0f1b5232827ad095d1987.tar.gz libvfio-user-13f1cd8893fad76359c0f1b5232827ad095d1987.tar.bz2 |
pass vfu_ctx_t to callbacks (#222)
It's easy (with the new vfu_get_private()) to go from a vfu_ctx to the private
pointer, but not the reverse; pass the ctx into all the callbacks.
Signed-off-by: John Levon <john.levon@nutanix.com>
Reviewed-by: Thanos Makatos <thanos.makatos@nutanix.com>
Diffstat (limited to 'samples/gpio-pci-idio-16.c')
-rw-r--r-- | samples/gpio-pci-idio-16.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/samples/gpio-pci-idio-16.c b/samples/gpio-pci-idio-16.c index e31db6d..08f2cca 100644 --- a/samples/gpio-pci-idio-16.c +++ b/samples/gpio-pci-idio-16.c @@ -46,14 +46,14 @@ #include "tran_sock.h" static void -_log(UNUSED void *pvt, UNUSED int level, char const *msg) +_log(vfu_ctx_t *vfu_ctx UNUSED, UNUSED int level, char const *msg) { fprintf(stderr, "gpio: %s\n", msg); } ssize_t -bar2_access(UNUSED void *pvt, char * const buf, size_t count, loff_t offset, - const bool is_write) +bar2_access(vfu_ctx_t *vfu_ctx UNUSED, char * const buf, + size_t count, loff_t offset, const bool is_write) { static char n; |