public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 0/1] env_mmc: Properly prefix mmc errors with '!'
@ 2015-08-15 18:05 Hans de Goede
  2015-08-15 18:05 ` [U-Boot] [PATCH] " Hans de Goede
  0 siblings, 1 reply; 3+ messages in thread
From: Hans de Goede @ 2015-08-15 18:05 UTC (permalink / raw)
  To: u-boot

Hi Tom,

Just a small cosmetic patch. I'm not sure whom to send this to,
so I'm sending it directly to you.

Regards,

Hans

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] [PATCH] env_mmc: Properly prefix mmc errors with '!'
  2015-08-15 18:05 [U-Boot] [PATCH 0/1] env_mmc: Properly prefix mmc errors with '!' Hans de Goede
@ 2015-08-15 18:05 ` Hans de Goede
  2015-08-28 21:02   ` [U-Boot] " Tom Rini
  0 siblings, 1 reply; 3+ messages in thread
From: Hans de Goede @ 2015-08-15 18:05 UTC (permalink / raw)
  To: u-boot

The set_default_env() function from env_common.c expects either
a fully formatted error msg, e.g.: "## Resetting to default environment\n"
or an error msg prefixed with an !, in which case it will format it.

Fix the init_mmc_for_env() error messages to be prefixed with a !
this changes the bootup-log on sunxi when no mmc card is found from:

MMC:   SUNXI SD/MMC: 0
No MMC card foundIn:    serial
Out:   serial

To:

MMC:   SUNXI SD/MMC: 0
*** Warning - No MMC card found, using default environment

In:    serial
Out:   serial

Which clearly is how things should look.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 common/env_mmc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/common/env_mmc.c b/common/env_mmc.c
index 6c4ce2f..51e7707 100644
--- a/common/env_mmc.c
+++ b/common/env_mmc.c
@@ -93,13 +93,13 @@ static inline int mmc_set_env_part(struct mmc *mmc) {return 0; };
 static const char *init_mmc_for_env(struct mmc *mmc)
 {
 	if (!mmc)
-		return "No MMC card found";
+		return "!No MMC card found";
 
 	if (mmc_init(mmc))
-		return "MMC init failed";
+		return "!MMC init failed";
 
 	if (mmc_set_env_part(mmc))
-		return "MMC partition switch failed";
+		return "!MMC partition switch failed";
 
 	return NULL;
 }
-- 
2.4.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [U-Boot] env_mmc: Properly prefix mmc errors with '!'
  2015-08-15 18:05 ` [U-Boot] [PATCH] " Hans de Goede
@ 2015-08-28 21:02   ` Tom Rini
  0 siblings, 0 replies; 3+ messages in thread
From: Tom Rini @ 2015-08-28 21:02 UTC (permalink / raw)
  To: u-boot

On Sat, Aug 15, 2015 at 08:05:01PM +0200, Hans de Goede wrote:

> The set_default_env() function from env_common.c expects either
> a fully formatted error msg, e.g.: "## Resetting to default environment\n"
> or an error msg prefixed with an !, in which case it will format it.
> 
> Fix the init_mmc_for_env() error messages to be prefixed with a !
> this changes the bootup-log on sunxi when no mmc card is found from:
> 
> MMC:   SUNXI SD/MMC: 0
> No MMC card foundIn:    serial
> Out:   serial
> 
> To:
> 
> MMC:   SUNXI SD/MMC: 0
> *** Warning - No MMC card found, using default environment
> 
> In:    serial
> Out:   serial
> 
> Which clearly is how things should look.
> 
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150828/5da1e52e/attachment.sig>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-08-28 21:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-15 18:05 [U-Boot] [PATCH 0/1] env_mmc: Properly prefix mmc errors with '!' Hans de Goede
2015-08-15 18:05 ` [U-Boot] [PATCH] " Hans de Goede
2015-08-28 21:02   ` [U-Boot] " Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox