Displaying 3 results from an estimated 3 matches for "undefined_pread".
2020 Mar 26
0
[PATCH nbdkit 6/9] tests: Add a regression test that we can still compile with -undefined.
....h>
+#include <string.h>
+
+#include <nbdkit-plugin.h>
+
+static void *
+undefined_open (int readonly)
+{
+ return NBDKIT_HANDLE_NOT_NEEDED;
+}
+
+static int64_t
+undefined_get_size (void *handle)
+{
+ return 0;
+}
+
+#define THREAD_MODEL NBDKIT_THREAD_MODEL_PARALLEL
+
+static int
+undefined_pread (void *handle, void *buf, uint32_t count, uint64_t offset)
+{
+ memset (buf, 0, count);
+ return 0;
+}
+
+static struct nbdkit_plugin plugin = {
+ .name = "testundefined",
+ .version = PACKAGE_VERSION,
+ .open = undefined_open,
+ .get_size...
2020 Mar 26
1
Re: [PATCH nbdkit 6/9] tests: Add a regression test that we can still compile with -undefined.
...ry dlopen()ing this plugin.
> +static struct nbdkit_plugin plugin = {
> + .name = "testundefined",
> + .version = PACKAGE_VERSION,
> + .open = undefined_open,
> + .get_size = undefined_get_size,
> + .pread = undefined_pread,
> +};
Easiest might be adding a .config callback to test an nbdkit_parse_*
function.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
2020 Mar 26
15
[PATCH nbdkit 0/9] Create libnbdkit.so
This creates libnbdkit.so as discussed in the following thread:
https://www.redhat.com/archives/libguestfs/2020-March/thread.html#00203
test-delay-shutdown.sh fails for unclear reasons.
This series starts by reverting "tests: Don't strand hung nbdkit
processes" which is because several other tests fail randomly unless I
revert this patch. I didn't investigate this yet so it