int uncompress_generic(void *src, void *dst, void *buf)
==>
int uncompress_generic(void *src, void *dst, uint32_t *ilen, void *op_buf)
YH
On 5/25/06, Ronald G Minnich rminnich@lanl.gov wrote:
Carl-Daniel Hailfinger wrote:
yhlu wrote:
just let the the uncompress take more parameter for the properties buf, and every cpu find the correct buffer in RAM in BSP should be OK...because the RAM on first node is ready at that time.
How about
int uncompress_generic(void *src, void *dst, void *buf, int bufsize);
and uncompress_generic can assume that buf can be treated like RAM. If bufsize is too small, it can return an error. An additional function
int needed_bufsize(void *src);
could be written to compute the minimum buffer size for a given compressed image.
What do you think?
Regards, Carl-Danie
int needed_bufsize(void *src);
good. And in most cases it is: size = *(unsigned long *)src;
int uncompress_generic(void *src, void *dst, void *buf)
if the programmer is too stupid to call needed_bufsize, they're probably too stupid to pass in a correct bufsize to this function, I think it is not needed.
ron