Browse Source

[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>
tags/v1.20.1
Michael Brown 12 years ago
parent
commit
b3b939c6ff
1 changed files with 1 additions and 0 deletions
  1. 1
    0
      src/usr/autoboot.c

+ 1
- 0
src/usr/autoboot.c View File

160
 	if ( filename ) {
160
 	if ( filename ) {
161
 		if ( ( rc = imgdownload ( filename, &image ) ) != 0 )
161
 		if ( ( rc = imgdownload ( filename, &image ) ) != 0 )
162
 			goto err_download;
162
 			goto err_download;
163
+		image->flags |= IMAGE_AUTO_UNREGISTER;
163
 		if ( ( rc = image_exec ( image ) ) != 0 ) {
164
 		if ( ( rc = image_exec ( image ) ) != 0 ) {
164
 			printf ( "Could not boot image: %s\n",
165
 			printf ( "Could not boot image: %s\n",
165
 				 strerror ( rc ) );
166
 				 strerror ( rc ) );

Loading…
Cancel
Save