david/ipxe
david
/
ipxe
Archived
1
0
Fork 0

Allow for named images.

This commit is contained in:
Michael Brown 2007-01-11 23:45:18 +00:00
parent f59ad50504
commit 7bf94b5ad6
1 changed files with 5 additions and 3 deletions

View File

@ -49,9 +49,11 @@ static struct image_type image_types_end[0]
int register_image ( struct image *image ) {
static unsigned int imgindex = 0;
/* Create image name */
snprintf ( image->name, sizeof ( image->name ), "img%d",
imgindex++ );
/* Create image name if it doesn't already have one */
if ( ! image->name[0] ) {
snprintf ( image->name, sizeof ( image->name ), "img%d",
imgindex++ );
}
/* Add to image list */
list_add_tail ( &image->list, &images );