Daniel P. Berrangé <[email protected]> wrote: > With this change, all QEMUFile usage is backed by QIOChannel at > last. > > Reviewed-by: Dr. David Alan Gilbert <[email protected]> > Signed-off-by: Daniel P. Berrangé <[email protected]>
Reviewed-by: Juan Quintela <[email protected]> > { > if (is_writable) { > - return qemu_fopen_ops(bs, &bdrv_write_ops, false); > + return > qemu_fopen_channel_output(QIO_CHANNEL(qio_channel_block_new(bs))); > + } else { > + return > qemu_fopen_channel_input(QIO_CHANNEL(qio_channel_block_new(bs))); > } > - return qemu_fopen_ops(bs, &bdrv_read_ops, false); > } I really preffer the original syntax: if (is_writable) { return qemu_fopen_channel_output(QIO_CHANNEL(qio_channel_block_new(bs))); } return qemu_fopen_channel_input(QIO_CHANNEL(qio_channel_block_new(bs))); But as you wrote the patch, and it is a big cleanup, I will not complain. Later, Juan.
