aboutsummaryrefslogtreecommitdiffstats
path: root/gpxe/src/usr/autoboot.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-06-04 18:52:18 -0700
committerH. Peter Anvin <hpa@zytor.com>2008-06-04 18:52:18 -0700
commite63132bf03140d91ec74eca663f7bc2f16429fb0 (patch)
treeea5af9895146e85d3912584e699799863e0f8a29 /gpxe/src/usr/autoboot.c
parentbce8e1595ab30c828254038523e1e25c9fd9445f (diff)
downloadsyslinux.git-e63132bf03140d91ec74eca663f7bc2f16429fb0.tar.gz
syslinux.git-e63132bf03140d91ec74eca663f7bc2f16429fb0.tar.xz
syslinux.git-e63132bf03140d91ec74eca663f7bc2f16429fb0.zip
Update gPXE from gPXE git
Diffstat (limited to 'gpxe/src/usr/autoboot.c')
-rw-r--r--gpxe/src/usr/autoboot.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gpxe/src/usr/autoboot.c b/gpxe/src/usr/autoboot.c
index c1a61ec0..cff6e95d 100644
--- a/gpxe/src/usr/autoboot.c
+++ b/gpxe/src/usr/autoboot.c
@@ -38,6 +38,9 @@
*
*/
+/** Time to wait for link-up */
+#define LINK_WAIT_MS 15000
+
/**
* Identify the boot network device
*
@@ -136,6 +139,14 @@ static int netboot ( struct net_device *netdev ) {
return rc;
ifstat ( netdev );
+ /* Wait for link-up */
+ printf ( "Waiting for link-up on %s...", netdev->name );
+ if ( ( rc = iflinkwait ( netdev, LINK_WAIT_MS ) ) != 0 ) {
+ printf ( " no link detected\n" );
+ return rc;
+ }
+ printf ( " ok\n" );
+
/* Configure device via DHCP */
if ( ( rc = dhcp ( netdev ) ) != 0 )
return rc;