qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Peter Delevoryas
Subject: Re: [PATCH v2] m25p80: Improve error when the backend file size does not match the device
Date: Tue, 15 Nov 2022 12:08:38 -0800

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 <clg@kaod.org>
> > ---
> >   hw/block/m25p80.c | 4 ++--
> >   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> 

Thanks Cedric!

Reviewed-by: Peter Delevoryas <peter@pjd.dev>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]