search for: cxx_get_siz

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

Did you mean: cxx_get_size
2017 Feb 01
0
[PATCH] Really fix C++ support in the <nbdkit-plugin.h> header file (RHBZ#1418328).
...0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0xaa +}; +static unsigned char data[104857600]; + +static void +cxx_load (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 plug...
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.