From: Wolfgang Denk Date: Thu, 19 Jul 2018 21:53:36 +0200 Subject: [U-Boot] [RFC v2] env: Fix errors printing on env loading In-Reply-To: <20180719193028.814-1-semen.protsenko@linaro.org> References: <20180719193028.814-1-semen.protsenko@linaro.org> Message-ID: <20180719195336.3A595240175@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Sam Protsenko, In message <20180719193028.814-1-semen.protsenko@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 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.