函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\zlib_inflate\infutil.c Create Date:2022-07-27 07:55:23
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Utility function: initialize zlib, unpack binary blob, clean up zlib,* return len or negative error code.

函数原型:int zlib_inflate_blob(void *gunzip_buf, unsigned int sz, const void *buf, unsigned int len)

返回类型:int

参数:

类型参数名称
void *gunzip_buf
unsigned intsz
const void *buf
unsigned intlen
12  zbuf等于buf
16  rc等于负ENOMEM
17  strm等于kmalloc(strm的长度, GFP_KERNEL)
18  如果(strm == NULL)则转到:gunzip_nomem1
20  memory allocated for this stream 等于kmalloc(zlib_inflate_workspacesize(), GFP_KERNEL)
21  如果( memory allocated for this stream == NULL)则转到:gunzip_nomem2
27  next input byte 等于zbuf
28  number of bytes available at next_in 等于len
29  next output byte should be put there 等于gunzip_buf
30  remaining free space at next_out 等于sz
32  rc等于zlib_inflateInit2(strm, - 32K LZ77 window )
33  如果rc恒等于Allowed flush values; see deflate() and inflate() below for details
34  rc等于late() uses a state machine to process as much input data and generate asmuch output data as possible before returning
36  如果rc恒等于Z_STREAM_ENDrc等于sz remaining free space at next_out
38  否则rc等于负EINVAL
40  zlib_inflateEnd(strm)
41  否则rc等于负EINVAL
44  kfree( memory allocated for this stream )
45  gunzip_nomem2 :
46  kfree(strm)
47  gunzip_nomem1 :
48  返回:rc