Patrick J. LoPresti
2004-Apr-24 19:41 UTC
[syslinux] [PATCH] Support WinImage compressed floppies
The following patch allows memdisk to support compressed floppy images created by WinImage. WinImage creates a PKZIP-style archive with a single member, the .img (or .ima) file containing the floppy image. WinImage names such archives with a .imz extension. This patch lifts the header/trailer checking code from gunzip() to a new function, check_zip(), which both checks for a valid ZIP image and returns the CRC, size, and offset of the actual compressed data. check_zip() supports both gzip and PKZIP archives. In addition, this patch adds some whitespace to init.S16 to prevent GCC 3.3 from bombing out. I have tested this patch thoroughly with different types of images on several different machines and they all seem to work. This is not too surprising since I was careful not to alter the original code's behavior except when presented with a file whose magic number indicates a PKZIP archive. (And even then, all it does is use a different offset and checksum for the ZIP data.) This patch applies cleanly against SYSLINUX 2.09-pre15. I propose it for inclusion in some future release. - Pat -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: memdisk-pkzip-patch URL: <http://www.zytor.com/pipermail/syslinux/attachments/20040424/513d78a1/attachment.ksh>