Allow "imgexec" with no arguments to boot the file that was loaded with

"kernel".
This commit is contained in:
Michael Brown
2007-01-12 07:32:46 +00:00
parent f135a37f30
commit 2876197306
3 changed files with 35 additions and 9 deletions

View File

@@ -90,6 +90,22 @@ int imgexec ( struct image *image ) {
return image_exec ( image );
}
/**
* Identify the first loaded image
*
* @ret image Image, or NULL
*/
struct image * imgautoselect ( void ) {
struct image *image;
for_each_image ( image ) {
if ( image->flags & IMAGE_LOADED )
return image;
}
return NULL;
}
/**
* Display status of an image
*