diff options
author | H. Peter Anvin <hpa@zytor.com> | 2008-06-04 18:52:18 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2008-06-04 18:52:18 -0700 |
commit | e63132bf03140d91ec74eca663f7bc2f16429fb0 (patch) | |
tree | ea5af9895146e85d3912584e699799863e0f8a29 /gpxe/src/usr/autoboot.c | |
parent | bce8e1595ab30c828254038523e1e25c9fd9445f (diff) | |
download | syslinux.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.c | 11 |
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; |