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 to read the initial flash content". > > This is confusing for the user. > > > > Use blk_check_size_and_read_all() instead of blk_pread() to improve > > the reported error. > > > > Signed-off-by: Cédric Le Goater <c...@kaod.org> > > --- > > hw/block/m25p80.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > Reviewed-by: Philippe Mathieu-Daudé <phi...@linaro.org> >
Thanks Cedric! Reviewed-by: Peter Delevoryas <pe...@pjd.dev>