mirror of https://github.com/ipxe/ipxe.git
[image] Automatically free autobooted images
Simplify the process of booting by ensuring that old images are not left registered after an unsuccessful autoboot attempt. Signed-off-by: Michael Brown <mcb30@ipxe.org>pull/598/head
parent
5d3c368efb
commit
b3b939c6ff
|
@ -160,6 +160,7 @@ int uriboot ( struct uri *filename, struct uri *root_path, int drive,
|
||||||
if ( filename ) {
|
if ( filename ) {
|
||||||
if ( ( rc = imgdownload ( filename, &image ) ) != 0 )
|
if ( ( rc = imgdownload ( filename, &image ) ) != 0 )
|
||||||
goto err_download;
|
goto err_download;
|
||||||
|
image->flags |= IMAGE_AUTO_UNREGISTER;
|
||||||
if ( ( rc = image_exec ( image ) ) != 0 ) {
|
if ( ( rc = image_exec ( image ) ) != 0 ) {
|
||||||
printf ( "Could not boot image: %s\n",
|
printf ( "Could not boot image: %s\n",
|
||||||
strerror ( rc ) );
|
strerror ( rc ) );
|
||||||
|
|
Loading…
Reference in New Issue