aboutsummaryrefslogtreecommitdiff
path: root/net/eth-uclass.c
diff options
context:
space:
mode:
authorHeinrich Schuchardt2020-09-14 11:00:18 +0200
committerTom Rini2020-09-30 16:48:18 -0400
commitad8959138fbca64d7999c79a8a73dff77f2deb98 (patch)
tree9211cf4a5ce1a81cdd3c844a626fa0f57ad51de9 /net/eth-uclass.c
parentf6a158b996b3abee4e6315b29a488398cb3946df (diff)
net: use log_err() for 'No ethernet found' message
Write the 'No ethernet found' message via the log drivers. This allows suppressing it during output via the syslog driver. This fixes the problem reported in: [PATCH 0/4] log: Fix the syslog spam when running tests https://lists.denx.de/pipermail/u-boot/2020-September/426343.html Reported-by: Simon Glass <sjg@chromium.org> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'net/eth-uclass.c')
-rw-r--r--net/eth-uclass.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/eth-uclass.c b/net/eth-uclass.c
index 0d9b75a9a20..396418eb390 100644
--- a/net/eth-uclass.c
+++ b/net/eth-uclass.c
@@ -273,7 +273,7 @@ int eth_init(void)
if (!current) {
current = eth_get_dev();
if (!current) {
- printf("No ethernet found.\n");
+ log_err("No ethernet found.\n");
return -ENODEV;
}
}
@@ -414,7 +414,7 @@ int eth_initialize(void)
*/
uclass_first_device_check(UCLASS_ETH, &dev);
if (!dev) {
- printf("No ethernet found.\n");
+ log_err("No ethernet found.\n");
bootstage_error(BOOTSTAGE_ID_NET_ETH_START);
} else {
char *ethprime = env_get("ethprime");
@@ -449,7 +449,7 @@ int eth_initialize(void)
} while (dev);
if (!num_devices)
- printf("No ethernet found.\n");
+ log_err("No ethernet found.\n");
putc('\n');
}