aboutsummaryrefslogtreecommitdiffstats
path: root/src/usr
diff options
context:
space:
mode:
authorJoe Groocock <jgroocock@cloudflare.com>2019-09-20 13:41:29 +0100
committerMichael Brown <mcb30@ipxe.org>2020-07-22 12:44:51 +0100
commita08ee6e7221ea50d9096579d57674a07f3409da3 (patch)
treeffad4a137e5e0f9375bf17e92691b1040198b2aa /src/usr
parent145311c62e46feae1703e4b5da353603a99c21f5 (diff)
downloadipxe-a08ee6e7221ea50d9096579d57674a07f3409da3.tar.gz
[cmdline] Add "--timeout" parameter to "ifconf" command
Modified-by: Michael Brown <mcb30@ipxe.org> Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/usr')
-rw-r--r--src/usr/autoboot.c2
-rw-r--r--src/usr/ifmgmt.c6
2 files changed, 5 insertions, 3 deletions
diff --git a/src/usr/autoboot.c b/src/usr/autoboot.c
index 106e0f879..51b07e125 100644
--- a/src/usr/autoboot.c
+++ b/src/usr/autoboot.c
@@ -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();
diff --git a/src/usr/ifmgmt.c b/src/usr/ifmgmt.c
index f367149f7..f1172bafb 100644
--- a/src/usr/ifmgmt.c
+++ b/src/usr/ifmgmt.c
@@ -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 );
}