Chameleon

Chameleon Commit Details

Date:2014-11-14 20:38:00 (9 years 5 months ago)
Author:ErmaC
Commit:2477
Parents: 2476
Message:Rename decompress_lzvn function to lzvn_decode follow Apple source name.
Changes:
M/trunk/i386/boot2/drivers.c
M/trunk/i386/boot2/boot.h
M/trunk/CHANGES
M/trunk/i386/boot2/lzvn.c

File differences

trunk/i386/boot2/drivers.c
905905
906906
907907
908
909
910
911
912
913
914
915
916
917
918
919
920
908921
909922
910923
......
924937
925938
926939
927
940
928941
929942
930943
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))
{
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'):
trunk/i386/boot2/lzvn.c
5757
5858
5959
60
61
62
63
64
60
61
62
63
6564
6665
6766
68
69
70
71
67
68
69
70
7271
7372
7473
} 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;
trunk/i386/boot2/boot.h
307307
308308
309309
310
311
310
311
312
313
314
315
316
317
318
319
320
312321
313322
314323
/*
* 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;
trunk/CHANGES
1
12
23
34
- 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)

Archive Download the corresponding diff file

Revision: 2477