mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 16:52:14 +02:00
env: Don't show "Failed" error message
"Failed" error message from env_load() only clutters the log with unnecessary details, as we already have all needed warnings by that time. Example: Loading Environment from FAT... MMC: no card present ** Bad device mmc 0 ** Failed (-5) Let's only print it in case when DEBUG is defined to keep log clear. Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
This commit is contained in:
14
env/env.c
vendored
14
env/env.c
vendored
@@ -186,15 +186,19 @@ int env_load(void)
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
printf("Loading Environment from %s... ", drv->name);
|
printf("Loading Environment from %s... ", drv->name);
|
||||||
|
/*
|
||||||
|
* In error case, the error message must be printed during
|
||||||
|
* drv->load() in some underlying API, and it must be exactly
|
||||||
|
* one message.
|
||||||
|
*/
|
||||||
ret = drv->load();
|
ret = drv->load();
|
||||||
if (ret)
|
if (ret) {
|
||||||
printf("Failed (%d)\n", ret);
|
debug("Failed (%d)\n", ret);
|
||||||
else
|
} else {
|
||||||
printf("OK\n");
|
printf("OK\n");
|
||||||
|
|
||||||
if (!ret)
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* In case of invalid environment, we set the 'default' env location
|
* In case of invalid environment, we set the 'default' env location
|
||||||
|
Reference in New Issue
Block a user