Index: trunk/i386/boot2/drivers.c =================================================================== --- trunk/i386/boot2/drivers.c (revision 2476) +++ trunk/i386/boot2/drivers.c (revision 2477) @@ -905,6 +905,19 @@ error("ERROR: kernel compression is bad!\n"); return -1; } + + if (kernel_header->compress_type == OSSwapBigToHostConstInt32('lzss')) + { + verbose ("Decompressing Kernel Using lzss\n"); + } + else + { + if (kernel_header->compress_type == OSSwapBigToHostConstInt32('lzvn')) + { + verbose ("Decompressing Kernel Using lzvn\n"); + } + } + #if NOTDEF if (kernel_header->platform_name[0] && strcmp(gPlatformName, kernel_header->platform_name)) { @@ -924,7 +937,7 @@ switch (kernel_header->compress_type) { case OSSwapBigToHostConstInt32('lzvn'): - size = decompress_lzvn( binary, uncompressed_size, &kernel_header->data[0], OSSwapBigToHostInt32(kernel_header->compressed_size)); + size = lzvn_decode( binary, uncompressed_size, &kernel_header->data[0], OSSwapBigToHostInt32(kernel_header->compressed_size)); break; case OSSwapBigToHostConstInt32('lzss'): Index: trunk/i386/boot2/lzvn.c =================================================================== --- trunk/i386/boot2/lzvn.c (revision 2476) +++ trunk/i386/boot2/lzvn.c (revision 2477) @@ -57,18 +57,17 @@ } while (0) -size_t -decompress_lzvn(void * _dest, - size_t _dest_size, - void * _src, - size_t _src_size) +size_t lzvn_decode(void * dst, + size_t dst_size, + const void * src, + size_t src_size) { size_t rax = 0; - const uint64_t rdi = (const uint64_t)_dest; - uint64_t rsi = _dest_size; - uint64_t rcx = _src_size; - uint64_t rdx = (uint64_t)_src; + const uint64_t rdi = (const uint64_t)dst; + uint64_t rsi = dst_size; + uint64_t rcx = src_size; + uint64_t rdx = (uint64_t)src; uint64_t r8 = 0; uint64_t r9 = 0; Index: trunk/i386/boot2/boot.h =================================================================== --- trunk/i386/boot2/boot.h (revision 2476) +++ trunk/i386/boot2/boot.h (revision 2477) @@ -307,8 +307,17 @@ /* * lzvn.c */ -extern size_t decompress_lzvn(void * _dest, size_t _dest_size, void * _src, size_t _src_size); -// extern u_int8_t *compress_lzvn(u_int8_t *dst, u_int32_t dstlen, u_int8_t *src, u_int32_t srcLen); +extern size_t lzvn_decode(void * dst, + size_t dst_size, + const void * src, + size_t src_size); +/* +extern size_t lzvn_encode(void * dst, + size_t dst_size, + const void * src, + size_t src_size, + void * work); +*/ struct compressed_kernel_header { u_int32_t signature; Index: trunk/CHANGES =================================================================== --- trunk/CHANGES (revision 2476) +++ trunk/CHANGES (revision 2477) @@ -1,3 +1,4 @@ +- ErmaC : Rename decompress_lzvn function to lzvn_decode follow Apple source name. - bitshoveler : Make some constant arrays static; other minor fixes (acpi_patcher.c) - bitshoveler : Make 'buffer' arg to aml_add_buffer 'const char *', was just 'char *' (aml_generator) - bitshoveler : Various fixes to problems exposed by Clang static analyzer (picopng.c)