summaryrefslogtreecommitdiffstats
path: root/src/core/image.c
diff options
context:
space:
mode:
authorMichael Brown2011-03-09 18:21:10 +0100
committerMichael Brown2011-03-09 18:21:34 +0100
commit4562223420c983864b2335b0a9bfe8d70993e123 (patch)
treee2db33999351fdc3bee2a8d4cd6ee3f64d990611 /src/core/image.c
parent[image] Simplify use of imgdownload() (diff)
downloadipxe-4562223420c983864b2335b0a9bfe8d70993e123.tar.gz
ipxe-4562223420c983864b2335b0a9bfe8d70993e123.tar.xz
ipxe-4562223420c983864b2335b0a9bfe8d70993e123.zip
[image] Avoid ending up with multiple selected images on re-registration
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/core/image.c')
-rw-r--r--src/core/image.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/image.c b/src/core/image.c
index 01091f1b..86c264c2 100644
--- a/src/core/image.c
+++ b/src/core/image.c
@@ -128,6 +128,12 @@ int register_image ( struct image *image ) {
imgindex++ );
}
+ /* Avoid ending up with multiple "selected" images on
+ * re-registration
+ */
+ if ( image_find_selected() )
+ image->flags &= ~IMAGE_SELECTED;
+
/* Add to image list */
image_get ( image );
image->flags |= IMAGE_REGISTERED;