Anthony Liguori wrote:
<snip>
> void qemu_fflush(QEMUFile *f)
> {
> - if (!f->is_writable)
> + if (!f->put_buffer)
> return;
> +
> if (f->buf_index > 0) {
> - if (f->is_file) {
> - fseek(f->outfile, f->buf_offset, SEEK_SET);
> - fwrite(f->buf, 1, f->buf_index, f->outfile);
> - } else {
> - bdrv_pwrite(f->bs, f->base_offset + f->buf_offset,
> - f->buf, f->buf_index);
> - }
> + f->put_buffer(f->opaque, f->buf, f->buf_offset, f->buf_index);
Nit...whitespace damage.
...
Overall, seems to be a good refactoring, and seems to keep the original
semantics of qemu_fopen_bdrv() and qemu_fopen().
Chris Lalancette
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html