[U-Boot] [RFC 2/2] env: Add prefix to error messages when loading env

Tom Rini
2018-07-18T14:28:08Z

On Wed, Jul 18, 2018 at 04:04:49PM +0300, Sam Protsenko wrote:
> On Wed, Jul 18, 2018 at 3:53 PM, Tom Rini <trini@konsulko.com> wrote:
> > On Wed, Jul 18, 2018 at 01:09:12AM +0300, Sam Protsenko wrote:
> >
> >> This is just a draft to discuss ideas related to "Make U-Boot log great
> >> again" thread.
> >>
> >> With this patch we will see something like:
> >>
> >> Loading Environment from FAT...
> >> --> MMC: no card present
> >> --> ** Bad device mmc 0 **
> >> --> Failed (-5)
> >> Loading Environment from MMC...
> >> --> OK
> >>
> >> instead of:
> >>
> >> Loading Environment from FAT... MMC: no card present
> >> ** Bad device mmc 0 **
> >> Failed (-5)
> >> Loading Environment from MMC... OK
> >
> > So, I think maybe (and given Wolfgang's comments) we should think about
> > how the output might want to look, and how to get there without GD
> > changes. Perhaps:
> > Attempting to load Environment from FAT (do we have more easily
> > available info at this point?):
>
> Which exactly info do you mean?

Do we easily know things like what device / partition we're trying? Or
only "env type is $X" ?

> > MMC: no card present
> > ** Bad device mmc 0 **
> > Failed (-5)
> > Loading Environment from MMC...
> > Attempting to load Environment from MMC:
> > Succeeded
> >
>
> What do you think if we add some prefix to first message, like:
>
> ---> Attempting to load Environment from FAT:
> MMC: no card present
> ** Bad device mmc 0 **
> Failed (-5)
> Loading Environment from MMC...
> ---> Attempting to load Environment from MMC:
> Succeeded
>
> just to emphasize that possible errors are belong to prefixed line?
> Does it seem better or more ugly to you?

I don't know. I'm not a fan, but I don't always have the best taste.

--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180718/1770e7be/attachment.sig>