http://git.etherboot.org
/
people
/
xl0
/
gpxe.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f59ad50
)
Allow for named images.
author
Michael Brown
<mcb30@etherboot.org>
Thu, 11 Jan 2007 23:45:18 +0000
(23:45 +0000)
committer
Michael Brown
<mcb30@etherboot.org>
Thu, 11 Jan 2007 23:45:18 +0000
(23:45 +0000)
src/core/image.c
patch
|
blob
|
history
diff --git
a/src/core/image.c
b/src/core/image.c
index
bfa91df
..
d093e3a
100644
(file)
--- a/
src/core/image.c
+++ b/
src/core/image.c
@@
-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 );