[PATCH master 2/2] startup: do not bring up networking if console input disabled

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Bringing up network interfaces is a development convenience.
If barebox is configured not to enable any console input by default,
it's reasonable to expect that the user wouldn't appreciate barebox
trying to get a DHCP lease when boot fails.

Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>
---
 common/startup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/startup.c b/common/startup.c
index 9510824a908a..d71d83c221dc 100644
--- a/common/startup.c
+++ b/common/startup.c
@@ -315,7 +315,7 @@ static int run_init(void)
 	if (autoboot == AUTOBOOT_BOOT)
 		run_command("boot");
 
-	if (IS_ENABLED(CONFIG_NET))
+	if (IS_ENABLED(CONFIG_NET) && !IS_ENABLED(CONFIG_CONSOLE_DISABLE_INPUT))
 		eth_open_all();
 
 	if (autoboot == AUTOBOOT_MENU)
-- 
2.39.5





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux