[ifmgmt] Move link-up status messages from autoboot() to iflinkwait()
With the addition of link status codes, we can now display a detailed error indication if iflinkwait() fails. Putting the error output in iflinkwait avoids code duplication, and gains symmetry with the other interface management routines; ifopen() already prints an error directly if it cannot open its interface. Modified-by: Michael Brown <mcb30@etherboot.org> Signed-off-by: Michael Brown <mcb30@etherboot.org>
This commit is contained in:
committed by
Michael Brown
parent
a310d00d37
commit
4125216a2f
+1
-5
@@ -154,12 +154,8 @@ static int netboot ( struct net_device *netdev ) {
|
||||
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" );
|
||||
if ( ( rc = iflinkwait ( netdev, LINK_WAIT_MS ) ) != 0 )
|
||||
return rc;
|
||||
}
|
||||
printf ( " ok\n" );
|
||||
|
||||
/* Configure device via DHCP */
|
||||
if ( ( rc = dhcp ( netdev ) ) != 0 )
|
||||
|
||||
Reference in New Issue
Block a user