summaryrefslogtreecommitdiffstats
path: root/src/usr/autoboot.c
diff options
context:
space:
mode:
authorMichael Brown2012-07-20 13:37:16 +0200
committerMichael Brown2012-07-20 13:46:42 +0200
commitb3b939c6ff67eb108a331d48320ea1720a291937 (patch)
tree8206784e32734c065b22cb29cba877bd7e2f4cfb /src/usr/autoboot.c
parent[image] Add "--replace" option (diff)
downloadipxe-b3b939c6ff67eb108a331d48320ea1720a291937.tar.gz
ipxe-b3b939c6ff67eb108a331d48320ea1720a291937.tar.xz
ipxe-b3b939c6ff67eb108a331d48320ea1720a291937.zip
[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>
Diffstat (limited to 'src/usr/autoboot.c')
-rw-r--r--src/usr/autoboot.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/usr/autoboot.c b/src/usr/autoboot.c
index da82f5e8..53f246ae 100644
--- a/src/usr/autoboot.c
+++ b/src/usr/autoboot.c
@@ -160,6 +160,7 @@ int uriboot ( struct uri *filename, struct uri *root_path, int drive,
if ( filename ) {
if ( ( rc = imgdownload ( filename, &image ) ) != 0 )
goto err_download;
+ image->flags |= IMAGE_AUTO_UNREGISTER;
if ( ( rc = image_exec ( image ) ) != 0 ) {
printf ( "Could not boot image: %s\n",
strerror ( rc ) );