[U-Boot] [RFC v2] env: Fix errors printing on env loading

Wolfgang Denk wd at denx.de
Thu Jul 19 19:53:36 UTC 2018


Dear Sam Protsenko,

In message <20180719193028.814-1-semen.protsenko at linaro.org> you wrote:
> This is just a draft to discuss ideas related to "Make U-Boot log great
> again" thread.
>
> With this patch we will have something like this:
>
>     Attempting to load environment from FAT:
>       -> MMC: no card present
>       -> ** Bad device mmc 0 **
>       -> Failed (-5)
>     Attempting to load environment from MMC: OK
>
> instead of this:
>
>     Loading Environment from FAT... MMC: no card present
>     ** Bad device mmc 0 **
>     Failed (-5)
>     Loading Environment from MMC... OK
>
> Two things were done in this patch:
>  - print messages from drivers in nested style (with "->" prefix); to do
>    so, add GD_FLG_PR_PREFIX flag and check it in puts()
>  - make "OK" to be printed on the same line as main message; to do so,
>    issue ASCII escape codes [1] to move cursor back to main message line

Naked-by: Wolfgang Denk <wd at denx.de>

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The IQ of the group is the lowest IQ of a member of the group divided
by the number of people in the group.


More information about the U-Boot mailing list