mirror of
https://github.com/ipxe/ipxe
synced 2026-04-04 03:00:20 +03:00
[monojob] Add timeout parameter to monojob_wait()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -52,7 +52,7 @@ int dhcp ( struct net_device *netdev ) {
|
||||
printf ( "DHCP (%s %s)", netdev->name,
|
||||
netdev->ll_protocol->ntoa ( netdev->ll_addr ) );
|
||||
if ( ( rc = start_dhcp ( &monojob, netdev ) ) == 0 )
|
||||
rc = monojob_wait ( "" );
|
||||
rc = monojob_wait ( "", 0 );
|
||||
|
||||
return rc;
|
||||
}
|
||||
@@ -63,7 +63,7 @@ int pxebs ( struct net_device *netdev, unsigned int pxe_type ) {
|
||||
/* Perform PXE Boot Server Discovery */
|
||||
printf ( "PXEBS (%s type %d)", netdev->name, pxe_type );
|
||||
if ( ( rc = start_pxebs ( &monojob, netdev, pxe_type ) ) == 0 )
|
||||
rc = monojob_wait ( "" );
|
||||
rc = monojob_wait ( "", 0 );
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -112,5 +112,5 @@ int fcels ( struct fc_port *port, struct fc_port_id *peer_port_id,
|
||||
}
|
||||
|
||||
/* Wait for ELS to complete */
|
||||
return monojob_wait ( "" );
|
||||
return monojob_wait ( "", 0 );
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ int imgdownload ( struct uri *uri, struct image **image ) {
|
||||
}
|
||||
|
||||
/* Wait for download to complete */
|
||||
if ( ( rc = monojob_wait ( uri_string_redacted ) ) != 0 )
|
||||
if ( ( rc = monojob_wait ( uri_string_redacted, 0 ) ) != 0 )
|
||||
goto err_monojob_wait;
|
||||
|
||||
/* Register image */
|
||||
|
||||
@@ -77,7 +77,7 @@ int imgverify ( struct image *image, struct image *signature,
|
||||
list_for_each_entry ( info, &sig->info, list ) {
|
||||
if ( ( rc = create_validator ( &monojob, info->chain ) ) != 0 )
|
||||
goto err_create_validator;
|
||||
if ( ( rc = monojob_wait ( NULL ) ) != 0 )
|
||||
if ( ( rc = monojob_wait ( NULL, 0 ) ) != 0 )
|
||||
goto err_validator_wait;
|
||||
}
|
||||
|
||||
|
||||
@@ -186,7 +186,7 @@ int nslookup ( const char *name, const char *setting_name ) {
|
||||
|
||||
/* Perform name resolution */
|
||||
if ( ( rc = resolv_setting ( &monojob, name, setting_name ) ) == 0 )
|
||||
rc = monojob_wait ( NULL );
|
||||
rc = monojob_wait ( NULL, 0 );
|
||||
if ( rc != 0 ) {
|
||||
printf ( "Could not resolve %s: %s\n", name, strerror ( rc ) );
|
||||
return rc;
|
||||
|
||||
@@ -71,7 +71,7 @@ int ping ( const char *hostname, unsigned long timeout, size_t len ) {
|
||||
}
|
||||
|
||||
/* Wait for ping to complete */
|
||||
if ( ( rc = monojob_wait ( NULL ) ) != 0 ) {
|
||||
if ( ( rc = monojob_wait ( NULL, 0 ) ) != 0 ) {
|
||||
printf ( "Finished: %s\n", strerror ( rc ) );
|
||||
return rc;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user