From a85da21f7527e70a2b81d71aa73d318fb354e912 Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede@redhat.com>
Date: Sat, 15 Aug 2015 20:05:01 +0200
Subject: [PATCH] env_mmc: Properly prefix mmc errors with '!'

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 6c4ce2f05d..51e7707cb0 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.39.5