[Libguestfs] [PATCH nbdkit v2 7/7] New filter: nbdkit-block-size-constraint-filter
Richard W.M. Jones
rjones at redhat.com
Thu Feb 17 16:02:25 UTC 2022
On Thu, Feb 17, 2022 at 02:36:48PM +0000, Richard W.M. Jones wrote:
> +static int
> +policy_pread (nbdkit_next *next,
> + void *handle, void *buf, uint32_t count, uint64_t offset,
> + uint32_t flags, int *err)
> +{
> + if (check_policy (next, "pread", count, offset, err) == -1)
> + return -1;
> +
> + return next->pread (next, buf, count, offset, flags, err);
> +}
> +
> +static int
> +policy_pwrite (nbdkit_next *next,
> + void *handle, const void *buf, uint32_t count, uint64_t offset,
> + uint32_t flags, int *err)
> +{
> + if (check_policy (next, "write", count, offset, err) == -1)
Typo, should be "pwrite" here. Fixed in my copy.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-top is 'top' for virtual machines. Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top
More information about the Libguestfs
mailing list