[image] Simplify image management

Refactor the {load,exec} image operations as {probe,exec}.  This makes
the probe mechanism cleaner, eliminates some forward declarations,
avoids holding magic state in image->priv, eliminates the possibility
of screwing up between the "load" and "exec" stages, and makes the
documentation simpler since the concept of "loading" (as distinct from
"executing") no longer needs to be explained.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2011-03-07 00:37:50 +00:00
parent 530a01eff0
commit 34b6ecb2f1
20 changed files with 414 additions and 501 deletions

View File

@@ -76,10 +76,10 @@ static void embedded_init ( void ) {
}
}
/* Load the first image */
/* Select the first image */
image = &embedded_images[0];
if ( ( rc = image_autoload ( image ) ) != 0 ) {
DBG ( "Could not load embedded image \"%s\": %s\n",
if ( ( rc = image_select ( image ) ) != 0 ) {
DBG ( "Could not select embedded image \"%s\": %s\n",
image->name, strerror ( rc ) );
return;
}