函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Decode the data given to us from the userspace. CRC32 of the uncompressed* data is calculated and is printed at the end of successful decoding. The* uncompressed data isn't stored anywhere for further use.* The

函数原型:static ssize_t xz_dec_test_write(struct file *file, const char __user *buf, size_t size, loff_t *pos)

返回类型:ssize_t

参数:

类型参数名称
struct file *file
const char __user *buf
size_tsize
loff_t *pos
107  如果Return value of xz_dec_run(). We need to avoid calling xz_dec_run() after* it has returned XZ_STREAM_END, so we make this static.不等于XZ_OK
108  如果size大于0则printk(formational Device name to pass to register_chrdev(). ": %zu bytes of garbage at the end of the file\n", size)
113  返回:负ENOSPC
116  printk(formational Device name to pass to register_chrdev(). ": decoding %zu bytes of input\n", size)
119  remaining等于size
120 remaining大于0或out_pos恒等于out_size的值且Return value of xz_dec_run(). We need to avoid calling xz_dec_run() after* it has returned XZ_STREAM_END, so we make this static.恒等于XZ_OK循环
122  如果in_pos恒等于in_size
123  in_pos等于0
128  buf加等于in_size
129  remaining减等于in_size
132  out_pos等于0
133  Return value of xz_dec_run(). We need to avoid calling xz_dec_run() after* it has returned XZ_STREAM_END, so we make this static.等于xz_dec_run() is a wrapper for dec_main() to handle some special cases in* multi-call and single-call decoding.* In multi-call mode, we must return XZ_BUF_ERROR when it seems clear that we* are not going to make any progress anymore
134  CRC32 of uncompressed data. This is used to give the user a simple way* to check that the decoder produces correct output.等于crc32(CRC32 of uncompressed data. This is used to give the user a simple way* to check that the decoder produces correct output., buffer_out, out_pos)
140  返回:size
145  返回:sizeremainingin_sizein_pos
149  退出
153  退出
157  退出
161  退出
165  退出
167  默认
169  退出
172  返回:负EIO