}
return NULL;
}
-
-/**
- * Register and select an image
- *
- * @v image Executable image
- * @ret rc Return status code
- */
-int register_and_select_image ( struct image *image ) {
- int rc;
-
- if ( ( rc = register_image ( image ) ) != 0 )
- return rc;
-
- if ( ( rc = image_probe ( image ) ) != 0 )
- return rc;
-
- if ( ( rc = image_select ( image ) ) != 0 )
- return rc;
-
- return 0;
-}
-
-/**
- * Register and boot an image
- *
- * @v image Image
- * @ret rc Return status code
- */
-int register_and_boot_image ( struct image *image ) {
- int rc;
-
- if ( ( rc = register_and_select_image ( image ) ) != 0 )
- return rc;
-
- if ( ( rc = image_exec ( image ) ) != 0 )
- return rc;
-
- return 0;
-}
extern int image_exec ( struct image *image );
extern int image_select ( struct image *image );
extern struct image * image_find_selected ( void );
-extern int register_and_select_image ( struct image *image );
-extern int register_and_boot_image ( struct image *image );
/**
* Increment reference count on an image
#include <ipxe/image.h>
+extern int register_and_select_image ( struct image *image );
+extern int register_and_boot_image ( struct image *image );
extern int imgdownload ( struct image *image, struct uri *uri,
int ( * action ) ( struct image *image ) );
extern int imgfetch ( struct image *image, const char *uri_string,
*
*/
+/**
+ * Register and select an image
+ *
+ * @v image Executable image
+ * @ret rc Return status code
+ */
+int register_and_select_image ( struct image *image ) {
+ int rc;
+
+ if ( ( rc = register_image ( image ) ) != 0 )
+ return rc;
+
+ if ( ( rc = image_probe ( image ) ) != 0 )
+ return rc;
+
+ if ( ( rc = image_select ( image ) ) != 0 )
+ return rc;
+
+ return 0;
+}
+
+/**
+ * Register and boot an image
+ *
+ * @v image Image
+ * @ret rc Return status code
+ */
+int register_and_boot_image ( struct image *image ) {
+ int rc;
+
+ if ( ( rc = register_and_select_image ( image ) ) != 0 )
+ return rc;
+
+ if ( ( rc = image_exec ( image ) ) != 0 )
+ return rc;
+
+ return 0;
+}
+
/**
* Download an image
*