mirror of
https://github.com/ipxe/ipxe
synced 2025-12-14 16:01:38 +03:00
Allow for named images.
This commit is contained in:
@@ -49,9 +49,11 @@ static struct image_type image_types_end[0]
|
|||||||
int register_image ( struct image *image ) {
|
int register_image ( struct image *image ) {
|
||||||
static unsigned int imgindex = 0;
|
static unsigned int imgindex = 0;
|
||||||
|
|
||||||
/* Create image name */
|
/* Create image name if it doesn't already have one */
|
||||||
snprintf ( image->name, sizeof ( image->name ), "img%d",
|
if ( ! image->name[0] ) {
|
||||||
imgindex++ );
|
snprintf ( image->name, sizeof ( image->name ), "img%d",
|
||||||
|
imgindex++ );
|
||||||
|
}
|
||||||
|
|
||||||
/* Add to image list */
|
/* Add to image list */
|
||||||
list_add_tail ( &image->list, &images );
|
list_add_tail ( &image->list, &images );
|
||||||
|
|||||||
Reference in New Issue
Block a user