Richard Henderson <richard.hender...@linaro.org> wrote:
> On 5/30/23 05:28, Juan Quintela wrote:
>> This was the only caller for read only files.  So change the test for
>> an assert in qemu_fflush().
>
>
> Not a fan, as fflush(stdin) is well-defined.

I guess you mean this:

       For input streams associated with seekable files (e.g., disk files, but
       not pipes or terminals), fflush() discards any buffered data  that  has
       been fetched from the underlying file, but has not been consumed by the
       application.

Two things:
- Current code just do nothing for imput streams
- We only call it from qemu_fclose()
- If we drop anything from the input stream, migration get broken.

If it makes you feel better, I can rename the function to
qemu_file_write_buffer() or whatever name your preffer.

Later, Juan.


Reply via email to