]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[image] Automatically free autobooted images
authorMichael Brown <mcb30@ipxe.org>
Fri, 20 Jul 2012 11:37:16 +0000 (12:37 +0100)
committerMichael Brown <mcb30@ipxe.org>
Fri, 20 Jul 2012 11:46:42 +0000 (12:46 +0100)
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>
src/usr/autoboot.c

index da82f5e853722be7674e350ea480e1f0f15bd954..53f246ae5b6cd632639d7e8696afa22591d9dd87 100644 (file)
@@ -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 ) );