diff options
author | Michael Brown | 2011-03-09 17:55:51 +0100 |
---|---|---|
committer | Michael Brown | 2011-03-09 17:57:34 +0100 |
commit | 9fa4ac2e9a781861e36e618eb1d461d8dc53a27c (patch) | |
tree | 437a36ae53aa9361f33c3c435c7b0978a9de42f5 /src/usr/autoboot.c | |
parent | [image] Generalise "currently-running script" to "currently-running image" (diff) | |
download | ipxe-9fa4ac2e9a781861e36e618eb1d461d8dc53a27c.tar.gz ipxe-9fa4ac2e9a781861e36e618eb1d461d8dc53a27c.tar.xz ipxe-9fa4ac2e9a781861e36e618eb1d461d8dc53a27c.zip |
[image] Simplify use of imgdownload()
Allow imgdownload() to be called without first having to allocate (and
so keep track of) an image.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/usr/autoboot.c')
-rw-r--r-- | src/usr/autoboot.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/usr/autoboot.c b/src/usr/autoboot.c index 7b851b3b..f8eb71cd 100644 --- a/src/usr/autoboot.c +++ b/src/usr/autoboot.c @@ -122,18 +122,9 @@ struct setting skip_san_boot_setting __setting = { * @ret rc Return status code */ int uriboot ( struct uri *filename, struct uri *root_path ) { - struct image *image; int drive; int rc; - /* Allocate image */ - image = alloc_image(); - if ( ! image ) { - printf ( "Could not allocate image\n" ); - rc = -ENOMEM; - goto err_alloc_image; - } - /* Treat empty URIs as absent */ if ( filename && ( ! uri_has_path ( filename ) ) ) filename = NULL; @@ -183,7 +174,7 @@ int uriboot ( struct uri *filename, struct uri *root_path ) { /* Attempt filename boot if applicable */ if ( filename ) { - if ( ( rc = imgdownload ( image, filename, + if ( ( rc = imgdownload ( filename, NULL, NULL, register_and_boot_image ) ) != 0 ) { printf ( "\nCould not chain image: %s\n", strerror ( rc ) ); @@ -229,8 +220,6 @@ int uriboot ( struct uri *filename, struct uri *root_path ) { } err_san_hook: err_no_boot: - image_put ( image ); - err_alloc_image: return rc; } |