search for: cxx_pread

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

Did you mean: cow_pread
2017 Feb 01
0
[PATCH] Really fix C++ support in the <nbdkit-plugin.h> header file (RHBZ#1418328).
...oad (void) +{ + memcpy (data, bootsector, sizeof bootsector); +} + +static void * +cxx_open (int readonly) +{ + return data; +} + +static int64_t +cxx_get_size (void *handle) +{ + return (int64_t) sizeof (data); +} + +#define THREAD_MODEL NBDKIT_THREAD_MODEL_SERIALIZE_ALL_REQUESTS + +static int +cxx_pread (void *handle, void *buf, uint32_t count, uint64_t offset) +{ + memcpy (buf, data+offset, count); + return 0; +} + +static struct nbdkit_plugin plugin = {}; +static void init_plugin_struct (void) __attribute__((constructor)); +static void +init_plugin_struct (void) +{ + plugin.name = "cxx&q...
2017 Feb 01
1
[PATCH nbdkit v2] Really fix C++ support in the <nbdkit-plugin.h>
This version uses Eric's subtype suggestion: https://bugzilla.redhat.com/show_bug.cgi?id=1418328#c6 Rich.
2017 Feb 01
1
[PATCH nbdkit v3] Really fix C++ support in the <nbdkit-plugin.h>
This version uses a static initializer function (https://bugzilla.redhat.com/show_bug.cgi?id=1418328#c9). Rich.