Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\xz\xz_dec_test.c Create Date:2022-07-28 07:08:59
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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

Proto:static ssize_t xz_dec_test_write(struct file *file, const char __user *buf, size_t size, loff_t *pos)

Type:ssize_t

Parameter:

TypeParameterName
struct file *file
const char __user *buf
size_tsize
loff_t *pos
107  If 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 Then
108  If size > 0 Then printk(formational Device name to pass to register_chrdev(). ": %zu bytes of garbage at the end of the file\n", size)
113  Return -ENOSPC
116  printk(formational Device name to pass to register_chrdev(). ": decoding %zu bytes of input\n", size)
119  remaining = size
120  When ( 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 cycle
122  If in_pos == in_size Then
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  Return size
145  Return size - remaining - in_size - in_pos
149  Break
153  Break
157  Break
161  Break
165  Break
167  Default
169  Break
172  Return -EIO