[PATCH v5 04/15] bootstd: Fix listing boot devices

Michal Suchánek msuchanek at suse.de
Sun Oct 2 21:19:25 CEST 2022


On Thu, Sep 29, 2022 at 04:00:32AM -0600, Simon Glass wrote:
> Hi Michal,
> 
> On Tue, 27 Sept 2022 at 15:38, Michal Suchanek <msuchanek at suse.de> wrote:
> >
> > bootdev_list() uses uclass_*_device_err() to iterate devices.
> > However, the only value _err adds is returning an error when the device
> > pointer is null, and that's checked anyway.
> >
> > Also there is some intent to report errors, and that's what
> > uclass_*_device_check() is for, use it.
> >
> > Also print the symbolic error.
> 
> Please drop that. We are talking about using %dE in a printf() string
> to show that info (the error number as well as the error string if
> available), so you could do that if you like.

That sounds like a better solution.

Thanks

Michal

> 
> But without errno_str support, this change just drops the error code.
> 
> With that:
> 
> Reviewed-by: Simon Glass <sjg at chromium.org>
> 
> Regards,
> Simon


More information about the U-Boot mailing list