mirror of
https://github.com/ipxe/ipxe
synced 2025-12-28 02:28:57 +03:00
Display name and status of each file as it is downloaded.
This commit is contained in:
@@ -61,15 +61,20 @@ static int boot_filename ( const char *filename ) {
|
||||
return -ENOMEM;
|
||||
}
|
||||
if ( ( rc = imgfetch ( image, filename,
|
||||
register_and_autoexec_image ) ) != 0 ) {
|
||||
register_and_autoload_image ) ) != 0 ) {
|
||||
printf ( "Could not load %s: %s\n",
|
||||
filename, strerror ( rc ) );
|
||||
goto done;
|
||||
}
|
||||
if ( ( rc = imgexec ( image ) ) != 0 ) {
|
||||
printf ( "Could not boot %s: %s\n",
|
||||
filename, strerror ( rc ) );
|
||||
image_put ( image );
|
||||
return rc;
|
||||
goto done;
|
||||
}
|
||||
|
||||
done:
|
||||
image_put ( image );
|
||||
return 0;
|
||||
return rc;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -56,15 +56,9 @@ int dhcp ( struct net_device *netdev ) {
|
||||
}
|
||||
|
||||
/* Perform DHCP */
|
||||
printf ( "DHCP (%s %s)...", netdev->name, netdev_hwaddr ( netdev ) );
|
||||
printf ( "DHCP (%s %s)", netdev->name, netdev_hwaddr ( netdev ) );
|
||||
if ( ( rc = start_dhcp ( &monojob, netdev, dhcp_success ) ) == 0 )
|
||||
rc = monojob_wait();
|
||||
|
||||
if ( rc == 0 ) {
|
||||
printf ( "done\n" );
|
||||
} else {
|
||||
printf ( "failed (%s)\n", strerror ( rc ) );
|
||||
}
|
||||
rc = monojob_wait ( "" );
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ int imgfetch ( struct image *image, const char *uri_string,
|
||||
|
||||
if ( ( rc = create_downloader ( &monojob, image, image_register,
|
||||
LOCATION_URI, uri ) ) == 0 )
|
||||
rc = monojob_wait();
|
||||
rc = monojob_wait ( uri_string );
|
||||
|
||||
uri_put ( uri );
|
||||
return rc;
|
||||
|
||||
Reference in New Issue
Block a user