summaryrefslogtreecommitdiffstats
path: root/src/image/zlib.c
Commit message (Collapse)AuthorAgeFilesLines
* [image] Use image name rather than pointer value in all debug messagesMichael Brown2025-05-261-8/+8
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [image] Make image data read-only to most consumersMichael Brown2025-04-301-1/+2
| | | | | | | | | | | | | | | | | | | | Almost all image consumers do not need to modify the content of the image. Now that the image data is a pointer type (rather than the opaque userptr_t type), we can rely on the compiler to enforce this at build time. Change the .data field to be a const pointer, so that the compiler can verify that image consumers do not modify the image content. Provide a transparent .rwdata field for consumers who have a legitimate (and now explicit) reason to modify the image content. We do not attempt to impose any runtime restriction on checking whether or not an image is writable. The only existing instances of genuinely read-only images are the various unit test images, and it is acceptable for defective test cases to result in a segfault rather than a runtime error. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [deflate] Remove userptr_t from decompression codeMichael Brown2025-04-221-16/+11Star
| | | | | | | Simplify the deflate, zlib, and gzip decompression code by assuming that all content is fully accessible via pointer dereferences. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [image] Allow single-member archive images to be executed transparentlyMichael Brown2021-05-121-0/+1
| | | | | | | | 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>
* [zlib] Add support for zlib archive imagesMichael Brown2021-05-081-0/+162
Signed-off-by: Michael Brown <mcb30@ipxe.org>