Commit a85da21f7527e70a2b81d71aa73d318fb354e912

Authored by Hans de Goede
Committed by Tom Rini
1 parent 972ea53390

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>

Showing 1 changed file with 3 additions and 3 deletions Side-by-side Diff

... ... @@ -93,13 +93,13 @@
93 93 static const char *init_mmc_for_env(struct mmc *mmc)
94 94 {
95 95 if (!mmc)
96   - return "No MMC card found";
  96 + return "!No MMC card found";
97 97  
98 98 if (mmc_init(mmc))
99   - return "MMC init failed";
  99 + return "!MMC init failed";
100 100  
101 101 if (mmc_set_env_part(mmc))
102   - return "MMC partition switch failed";
  102 + return "!MMC partition switch failed";
103 103  
104 104 return NULL;
105 105 }