search for: pread_data

Displaying 2 results from an estimated 2 matches for "pread_data".

Did you mean: read_data
2018 Jul 31
0
[PATCH nbdkit 3/4] Add map filter.
...+ +/* Get size. */ +static int64_t +map_get_size (struct nbdkit_next_ops *next_ops, void *nxdata, void *handle) +{ + struct handle *h = handle; + int64_t r; + + r = map_size (&h->map); + nbdkit_debug ("map: filter size: %" PRIi64, r); + return r; +} + +/* Read data. */ +struct pread_data { + struct nbdkit_next_ops *next_ops; + void *nxdata; + void *buf; + uint32_t flags; + int *err; +}; + +static int +do_pread (void *vp, uint32_t count, uint64_t offs) +{ + struct pread_data *data = vp; + + if (data->next_ops->pread (data->nxdata, data->buf, +...
2018 Jul 31
7
[PATCH nbdkit 0/4] Add truncate and map filters.
This patch series proposes two new filters. * truncate: This can truncate, extend, round up or round down the size of a plugin/device. A typical usage is to fix the qemu problem that it can only handle devices which are a multiple of 512-bytes: nbdkit --filter=truncate random size=500 round-up=512 This will serve a virtual device with size 512 bytes. Reading from the last 12 bytes will