summaryrefslogtreecommitdiffstats
path: root/src/image
diff options
context:
space:
mode:
authorMichael Brown2021-05-12 14:54:59 +0200
committerMichael Brown2021-05-12 14:57:35 +0200
commit191f8825cbd17a6819545e5633287e3d934039b6 (patch)
tree0d4ec7ae17fb56a08975e3a5d9e6041128ae6af5 /src/image
parent[undi] Read TSC only when profiling (diff)
downloadipxe-191f8825cbd17a6819545e5633287e3d934039b6.tar.gz
ipxe-191f8825cbd17a6819545e5633287e3d934039b6.tar.xz
ipxe-191f8825cbd17a6819545e5633287e3d934039b6.zip
[image] Allow single-member archive images to be executed transparently
Provide image_extract_exec() as a helper method to allow single-member archive images (such as gzip compressed images) to be executed without an explicit "imgextract" step. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/image')
-rw-r--r--src/image/gzip.c1
-rw-r--r--src/image/zlib.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/image/gzip.c b/src/image/gzip.c
index 40728138b..98376e113 100644
--- a/src/image/gzip.c
+++ b/src/image/gzip.c
@@ -163,4 +163,5 @@ struct image_type gzip_image_type __image_type ( PROBE_NORMAL ) = {
.name = "gzip",
.probe = gzip_probe,
.extract = gzip_extract,
+ .exec = image_extract_exec,
};
diff --git a/src/image/zlib.c b/src/image/zlib.c
index bc27142d7..a42c47e1b 100644
--- a/src/image/zlib.c
+++ b/src/image/zlib.c
@@ -159,4 +159,5 @@ struct image_type zlib_image_type __image_type ( PROBE_NORMAL ) = {
.name = "zlib",
.probe = zlib_probe,
.extract = zlib_extract,
+ .exec = image_extract_exec,
};