[Libguestfs] [PATCH libnbd v2 1/3] copy/file-ops.c: Fix copy for block device

Richard W.M. Jones rjones at redhat.com
Mon Feb 22 19:40:58 UTC 2021


On Mon, Feb 22, 2021 at 09:34:21PM +0200, Nir Soffer wrote:
> Initialize is_block so operations using it work correctly with block
> device.
> 
> Fixes: commit 48d1e2066c1f9ea73cbad19e86565960ef7fbebf
> Signed-off-by: Nir Soffer <nsoffer at redhat.com>
> ---
>  copy/file-ops.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/copy/file-ops.c b/copy/file-ops.c
> index 937620d..6d098c2 100644
> --- a/copy/file-ops.c
> +++ b/copy/file-ops.c
> @@ -66,6 +66,7 @@ file_create (const char *name, int fd, off_t st_size, bool is_block)
>    rwf->rw.ops = &file_ops;
>    rwf->rw.name = name;
>    rwf->fd = fd;
> +  rwf->is_block = is_block;

Aha! you spotted my, erm, deliberate mistake :-)

https://gitlab.com/nbdkit/libnbd/-/commit/24a5ba6e182235999065db34a33c42761114a1d0

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html




More information about the Libguestfs mailing list