From b3b939c6ff67eb108a331d48320ea1720a291937 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Fri, 20 Jul 2012 12:37:16 +0100 Subject: [PATCH] [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 --- src/usr/autoboot.c | 1 + 1 file changed, 1 insertion(+) 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 ) );