aboutsummaryrefslogtreecommitdiffstats
path: root/src/include/gpxe/image.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/gpxe/image.h')
-rw-r--r--src/include/gpxe/image.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/include/gpxe/image.h b/src/include/gpxe/image.h
index 76dc3b8f..0163b082 100644
--- a/src/include/gpxe/image.h
+++ b/src/include/gpxe/image.h
@@ -46,6 +46,16 @@ struct image {
userptr_t user;
unsigned long ul;
} priv;
+
+ /** Replacement image
+ *
+ * An image wishing to replace itself with another image (in a
+ * style similar to a Unix exec() call) should return from its
+ * exec() method with the replacement image set to point to
+ * the new image. The new image must already be in a suitable
+ * state for execution.
+ */
+ struct image *replacement;
};
/** Image is loaded */
@@ -79,6 +89,10 @@ struct image_type {
*
* @v image Loaded image
* @ret rc Return status code
+ *
+ * Note that the image may be invalidated by the act of
+ * execution, i.e. an image is allowed to choose to unregister
+ * (and so potentially free) itself.
*/
int ( * exec ) ( struct image *image );
};