[PATCH master v2 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,
we shouldn't bring up the network interfaces automatically either.

Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>
---
v1 -> v2:
  - commit message adjusted: DHCP isn't attempted in eth_open_all by
    default, just network links are brought up.
---
 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