search for: e21a0e9

Displaying 3 results from an estimated 3 matches for "e21a0e9".

2019 Aug 13
0
[PATCH libnbd 2/4] api: Add free function and remove valid_flag parameter.
...msg); + h->debug_callback.callback (h->debug_callback.user_data, context, msg); else fprintf (stderr, "libnbd: debug: %s: %s: %s\n", h->hname, context ? : "unknown", msg); diff --git a/tests/closure-lifetimes.c b/tests/closure-lifetimes.c index e21a0e9..41c7f65 100644 --- a/tests/closure-lifetimes.c +++ b/tests/closure-lifetimes.c @@ -38,50 +38,58 @@ static char *nbdkit_delay[] = "delay-read=10", NULL }; -static unsigned debug_fn_valid; -static unsigned debug_fn_free; -static unsigned read_cb_valid; -static unsigned read_cb_...
2019 Aug 13
0
[PATCH libnbd 1/4] api: Combine callback and user_data into a single struct.
...+ cookie = nbd_aio_pread (nbd, buf, BUFFERSIZE, offset, + NBD_NULL_CALLBACK(completion), 0); status->bytes_received += BUFFERSIZE; } if (cookie == -1) { diff --git a/tests/closure-lifetimes.c b/tests/closure-lifetimes.c index 60809d4..e21a0e9 100644 --- a/tests/closure-lifetimes.c +++ b/tests/closure-lifetimes.c @@ -101,10 +101,10 @@ main (int argc, char *argv[]) nbd = nbd_create (); if (nbd == NULL) NBD_ERROR; - nbd_set_debug_callback (nbd, debug_fn, NULL); + nbd_set_debug_callback (nbd, (nbd_debug_callback) { .callback = deb...
2019 Aug 13
8
[PATCH libnbd 0/4] Add free function to callbacks.
Patches 1 & 2 are rather complex, but the end result is that we pass closures + user_data + free function in single struct parameters as I described previously in this email: https://www.redhat.com/archives/libguestfs/2019-August/msg00210.html Patch 3 adds a convenient FREE_CALLBACK macro which seems a worthwhile simplification if you buy into 1 & 2. Patch 4 adds another macro which is