mirror of
https://github.com/ipxe/ipxe
synced 2025-12-21 20:40:25 +03:00
[image] Avoid ending up with multiple selected images on re-registration
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user