aboutsummaryrefslogtreecommitdiff
path: root/src/usr
diff options
context:
space:
mode:
authorMichael Brown <mcb30@etherboot.org>2007-08-03 12:49:21 +0100
committerMichael Brown <mcb30@etherboot.org>2007-08-03 12:49:21 +0100
commit218651e1259da924a19db66e7cb9ae885075892f (patch)
treede255dec650ac21b552c04d9ce83578ef7cd4cdc /src/usr
parent6e46dddc2c7521a076a4d274e4a89a69e9c1981d (diff)
downloadipxe-218651e1259da924a19db66e7cb9ae885075892f.zip
ipxe-218651e1259da924a19db66e7cb9ae885075892f.tar.gz
ipxe-218651e1259da924a19db66e7cb9ae885075892f.tar.bz2
Display name and status of each file as it is downloaded.
Diffstat (limited to 'src/usr')
-rw-r--r--src/usr/autoboot.c13
-rw-r--r--src/usr/dhcpmgmt.c10
-rw-r--r--src/usr/imgmgmt.c2
3 files changed, 12 insertions, 13 deletions
diff --git a/src/usr/autoboot.c b/src/usr/autoboot.c
index 2afe596..9183697 100644
--- a/src/usr/autoboot.c
+++ b/src/usr/autoboot.c
@@ -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;
}
/**
diff --git a/src/usr/dhcpmgmt.c b/src/usr/dhcpmgmt.c
index f1eb2d6..bd05c5e 100644
--- a/src/usr/dhcpmgmt.c
+++ b/src/usr/dhcpmgmt.c
@@ -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;
}
diff --git a/src/usr/imgmgmt.c b/src/usr/imgmgmt.c
index 0a77469..bead486 100644
--- a/src/usr/imgmgmt.c
+++ b/src/usr/imgmgmt.c
@@ -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;