Thread (7 messages) flat view 7 messages, 3 authors, 2012-09-15

Re: [PATCH] ipconfig: Inform user if carrier is not ready

From: Francois Romieu <romieu@fr.zoreil.com>
Date: 2012-09-14 05:54:28

Erwan Velu [off-list ref] :
[...]
This patch is just adding a simple message every second telling we are
waiting the carrier to come up.
---
 net/ipv4/ipconfig.c |    8 ++++++++
 1 file changed, 8 insertions(+)
The Signed-off-by: line is missing.
quoted hunk ↗ jump to hunk
diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c
index 67e8a6b..d9f34b7 100644
--- a/net/ipv4/ipconfig.c
+++ b/net/ipv4/ipconfig.c
@@ -205,6 +205,7 @@ static int __init ic_open_devs(void)
     struct net_device *dev;
     unsigned short oflags;
     unsigned long start;
+    unsigned int loops=0;
(nit)
	unsigned int loops = 0;
quoted hunk ↗ jump to hunk
     last = &ic_first_dev;
     rtnl_lock();
@@ -266,6 +267,13 @@ static int __init ic_open_devs(void)
             if (ic_is_init_dev(dev) && netif_carrier_ok(dev))
                 goto have_carrier;

+        loops++;
+        /* This loop is blocking the boot process until we get the
carrier or reach the timeout.
Please split it into 80 cols max lines.

[...]
+         * Every second, we display a short message indicating we
wait the carrier */
(you can remove this part of the comment)

-- 
Ueimor
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help