diff options
author | Michael Brown <mcb30@ipxe.org> | 2021-05-06 13:11:31 +0100 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2021-05-08 15:34:19 +0100 |
commit | 5c9c8d2b9b78cf4e1f256fe6874855c1aee458f2 (patch) | |
tree | 7990da7da1556de7ecd8dadbbb474dced6a67415 /src/include/ipxe/image.h | |
parent | de4f31cdcad7c4734c68da828351eeb7afd0360e (diff) | |
download | ipxe-5c9c8d2b9b78cf4e1f256fe6874855c1aee458f2.zip ipxe-5c9c8d2b9b78cf4e1f256fe6874855c1aee458f2.tar.gz ipxe-5c9c8d2b9b78cf4e1f256fe6874855c1aee458f2.tar.bz2 |
[image] Add "imgextract" command for extracting archive images
Add the concept of extracting an image from an archive (which could be
a single-file archive such as a gzip-compressed file), along with an
"imgextract" command to expose this functionality to scripts.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe/image.h')
-rw-r--r-- | src/include/ipxe/image.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/include/ipxe/image.h b/src/include/ipxe/image.h index 046edf9..c6e723d 100644 --- a/src/include/ipxe/image.h +++ b/src/include/ipxe/image.h @@ -113,6 +113,14 @@ struct image_type { */ int ( * asn1 ) ( struct image *image, size_t offset, struct asn1_cursor **cursor ); + /** + * Extract archive image + * + * @v image Image + * @v extracted Extracted image + * @ret rc Return status code + */ + int ( * extract ) ( struct image *image, struct image *extracted ); }; /** @@ -190,6 +198,8 @@ extern struct image * image_memory ( const char *name, userptr_t data, extern int image_pixbuf ( struct image *image, struct pixel_buffer **pixbuf ); extern int image_asn1 ( struct image *image, size_t offset, struct asn1_cursor **cursor ); +extern int image_extract ( struct image *image, const char *name, + struct image **extracted ); /** * Increment reference count on an image |