Re: [PATCH 1/8] m25p80: Improve error when the backend file size does not match the device

2023-02-16 Thread Philippe Mathieu-Daudé
On 15/2/23 20:52, Peter Delevoryas wrote: On Tue, Feb 14, 2023 at 06:18:23PM +0100, Cédric Le Goater wrote: Currently, when a block backend is attached to a m25p80 device and the associated file size does not match the flash model, QEMU complains with the error message "failed to read the initia

Re: [PATCH 1/8] m25p80: Improve error when the backend file size does not match the device

2023-02-15 Thread Peter Delevoryas
On Tue, Feb 14, 2023 at 06:18:23PM +0100, Cédric Le Goater wrote: > Currently, when a block backend is attached to a m25p80 device and the > associated file size does not match the flash model, QEMU complains > with the error message "failed to read the initial flash content". > This is confusing f

[PATCH 1/8] m25p80: Improve error when the backend file size does not match the device

2023-02-14 Thread Cédric Le Goater
Currently, when a block backend is attached to a m25p80 device and the associated file size does not match the flash model, QEMU complains with the error message "failed to read the initial flash content". This is confusing for the user. Use blk_check_size_and_read_all() instead of blk_pread() to