http://git.etherboot.org
/
people
/
dverkamp
/
gpxe.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Quick hack to get image booting working again
[people/dverkamp/gpxe.git]
/
src
/
usr
/
autoboot.c
diff --git
a/src/usr/autoboot.c
b/src/usr/autoboot.c
index
5d01722
..
3936e4c
100644
(file)
--- a/
src/usr/autoboot.c
+++ b/
src/usr/autoboot.c
@@
-99,19
+99,27
@@
void netboot ( struct net_device *netdev ) {
return;
}
printf ( "Booting \"%s\"\n", filename );
return;
}
printf ( "Booting \"%s\"\n", filename );
- if ( ( rc = imgfetch ( filename, NULL, &image ) ) != 0 ) {
+ image = alloc_image();
+ if ( ! image ) {
+ printf ( "Out of memory\n" );
+ return;
+ }
+ if ( ( rc = imgfetch ( image, filename, 0 ) ) != 0 ) {
printf ( "Could not retrieve %s: %s\n",
filename, strerror ( rc ) );
printf ( "Could not retrieve %s: %s\n",
filename, strerror ( rc ) );
+ image_put ( image );
return;
}
if ( ( rc = imgload ( image ) ) != 0 ) {
printf ( "Could not load %s: %s\n", image->name,
strerror ( rc ) );
return;
}
if ( ( rc = imgload ( image ) ) != 0 ) {
printf ( "Could not load %s: %s\n", image->name,
strerror ( rc ) );
+ image_put ( image );
return;
}
if ( ( rc = imgexec ( image ) ) != 0 ) {
printf ( "Could not execute %s: %s\n", image->name,
strerror ( rc ) );
return;
}
if ( ( rc = imgexec ( image ) ) != 0 ) {
printf ( "Could not execute %s: %s\n", image->name,
strerror ( rc ) );
+ image_put ( image );
return;
}
}
return;
}
}