mirror of
https://github.com/ipxe/ipxe
synced 2026-02-06 13:19:28 +03:00
[cmdline] Add "--timeout" parameter to "ifconf" command
Modified-by: Michael Brown <mcb30@ipxe.org> Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
committed by
Michael Brown
parent
145311c62e
commit
a08ee6e722
@@ -396,7 +396,7 @@ int netboot ( struct net_device *netdev ) {
|
||||
ifstat ( netdev );
|
||||
|
||||
/* Configure device */
|
||||
if ( ( rc = ifconf ( netdev, NULL ) ) != 0 )
|
||||
if ( ( rc = ifconf ( netdev, NULL, 0 ) ) != 0 )
|
||||
goto err_dhcp;
|
||||
route();
|
||||
|
||||
|
||||
@@ -264,10 +264,12 @@ static int ifconf_progress ( struct ifpoller *ifpoller ) {
|
||||
*
|
||||
* @v netdev Network device
|
||||
* @v configurator Network device configurator, or NULL to use all
|
||||
* @v timeout Timeout period, in ticks
|
||||
* @ret rc Return status code
|
||||
*/
|
||||
int ifconf ( struct net_device *netdev,
|
||||
struct net_device_configurator *configurator ) {
|
||||
struct net_device_configurator *configurator,
|
||||
unsigned long timeout ) {
|
||||
int rc;
|
||||
|
||||
/* Ensure device is open and link is up */
|
||||
@@ -296,5 +298,5 @@ int ifconf ( struct net_device *netdev,
|
||||
( configurator ? configurator->name : "" ),
|
||||
( configurator ? "] " : "" ),
|
||||
netdev->name, netdev->ll_protocol->ntoa ( netdev->ll_addr ) );
|
||||
return ifpoller_wait ( netdev, configurator, 0, ifconf_progress );
|
||||
return ifpoller_wait ( netdev, configurator, timeout, ifconf_progress );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user