[image] Eliminate the register_and_xxx_image() functions

All users of imgdownload() require registration of the image, so make
registration an integral part of imgdownload() itself and simplify the
"action" parameter to be one of image_select(), image_exec() et al.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2011-10-25 01:41:41 +01:00
parent 59e4c37741
commit 790035f78d
6 changed files with 36 additions and 126 deletions

View File

@@ -114,8 +114,7 @@ static int imgfetch_core_exec ( int argc, char **argv,
*/
static int imgfetch_exec ( int argc, char **argv ) {
return imgfetch_core_exec ( argc, argv, "fetch",
register_and_put_image );
return imgfetch_core_exec ( argc, argv, "fetch", NULL );
}
/**
@@ -127,8 +126,7 @@ static int imgfetch_exec ( int argc, char **argv ) {
*/
static int kernel_exec ( int argc, char **argv ) {
return imgfetch_core_exec ( argc, argv, "select",
register_and_select_image );
return imgfetch_core_exec ( argc, argv, "select", image_select );
}
/**
@@ -140,8 +138,7 @@ static int kernel_exec ( int argc, char **argv ) {
*/
static int chain_exec ( int argc, char **argv) {
return imgfetch_core_exec ( argc, argv, "boot",
register_and_boot_image );
return imgfetch_core_exec ( argc, argv, "boot", image_exec );
}
/** "imgselect" options */