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

2022-11-16 Thread Francisco Iglesias
On [2022 Nov 15] Tue 16:10:00, 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 for the user

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

2022-11-16 Thread Cédric Le Goater
On 11/16/22 09:28, Markus Armbruster wrote: Cédric Le Goater writes: On 11/16/22 07:56, Markus Armbruster wrote: Cédric Le Goater writes: 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 erro

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

2022-11-16 Thread Markus Armbruster
Cédric Le Goater writes: > On 11/16/22 07:56, Markus Armbruster wrote: >> Cédric Le Goater writes: >> >>> 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

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

2022-11-15 Thread Cédric Le Goater
On 11/16/22 07:56, Markus Armbruster wrote: Cédric Le Goater writes: 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

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

2022-11-15 Thread Markus Armbruster
Cédric Le Goater writes: > 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

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

2022-11-15 Thread Alistair Francis
On Wed, Nov 16, 2022 at 1:13 AM 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 for the

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

2022-11-15 Thread Peter Delevoryas
On Tue, Nov 15, 2022 at 04:50:11PM +0100, Philippe Mathieu-Daudé wrote: > On 15/11/22 16:10, 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

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

2022-11-15 Thread Philippe Mathieu-Daudé
On 15/11/22 16:10, 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 for the user. Use blk_check_s

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

2022-11-15 Thread Peter Maydell
On Tue, 15 Nov 2022 at 15:10, 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 for the us

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

2022-11-15 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