函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\decompress_bunzip2.c Create Date:2022-07-27 07:14:10
Last Modify:2020-03-15 22:49:38 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Example usage: decompress src_fd to dst_fd. (Stops at end of bzip2 data,not end of file.)

函数原型:STATIC int __attribute__((__section__(".init.text"))) __attribute__((__cold__))bunzip2(unsigned char *buf, long len, long (*fill)(void *, unsigned long ), long (*flush)(void *, unsigned long ), unsigned char *outbuf, long *pos, void (*error)(char *x))

返回类型:int

参数:

类型参数名称
unsigned char *buf
longlen
long (*fill
long (*flush
unsigned char *outbuf
long *pos
void (*error
687  i等于负1
690  如果flushoutbuf等于Use defines rather than static inline in order to avoid spurious* warnings when not needed (indeed large_malloc / large_free are not* needed by inflate (Other housekeeping constants )
693  如果非outbuf
694  error("Could not allocate output buffer")
695  返回:RETVAL_OUT_OF_MEMORY
697  如果bufinbuf等于buf
699  否则inbuf等于Use defines rather than static inline in order to avoid spurious* warnings when not needed (indeed large_malloc / large_free are not* needed by inflate (Other housekeeping constants )
701  如果非inbuf
702  error("Could not allocate input buffer")
703  i等于RETVAL_OUT_OF_MEMORY
704  转到:exit_0
706  i等于Allocate the structure, read file header. If in_fd ==-1, inbuf must containa complete bunzip file (len bytes long). If in_fd!=-1, inbuf and len areignored, and data is read from file handle into temporary buffer.
707  如果非i
708  循环
710  如果i小于等于0则退出
712  如果非flushoutbuf加等于i
714  否则如果i不等于flush(outbuf, i)则
717  退出
722  如果i恒等于RETVAL_LAST_BLOCK
723  如果The CRC values stored in the block header and calculated from thedata 不等于The CRC values stored in the block header and calculated from thedata error("Data integrity error when decompressing.")
725  否则i等于Status return values
727  否则如果i恒等于RETVAL_UNEXPECTED_OUTPUT_EOF
728  error("Compressed file ends unexpectedly")
730  如果非bd则转到:exit_1
732  如果Intermediate buffer and its size (in bytes) large_free(Intermediate buffer and its size (in bytes) )
734  如果pospos等于, outbufPos
736  free(bd)
737  exit_1 :
738  如果非buffree(inbuf)
740  exit_0 :
741  如果flushfree(outbuf)
743  返回:i
调用者
名称描述
__decompress