From 13f1cd8893fad76359c0f1b5232827ad095d1987 Mon Sep 17 00:00:00 2001 From: John Levon Date: Mon, 4 Jan 2021 16:22:48 +0000 Subject: 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 Reviewed-by: Thanos Makatos --- samples/gpio-pci-idio-16.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'samples/gpio-pci-idio-16.c') 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; -- cgit v1.1