Paolo Bonzini <pbonz...@redhat.com> wrote: > Il 09/04/2013 13:42, Juan Quintela ha scritto: >>> > @@ -556,11 +557,7 @@ static void qemu_fill_buffer(QEMUFile *f) >>> > int len; >>> > int pending; >>> > >>> > - if (!f->ops->get_buffer) >>> > - return; >> Why are we removing this test? this has nothing to do with the is_write >> removal? > > This test assumes that it makes sense to call qemu_get_byte on a > write-opened QEMUFile. This is not true anymore after this patch. > After eliminating is_write, the right thing to do is abort.
But this would not abort, it would do a segmenation fault! I would not complain to a: assert(!f->ops->get_buffer); It would told us from where we got the "invalid" call, but this removal will change a "silent fail" (that I don't like either) to a segmentation fault (that is even worse). Later, Juan.