函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Allocate the XZ decoder state and register the character device.

函数原型:static int __init xz_dec_test_init(void)

返回类型:int

参数:

178  static const struct file_operations fileops = {owner = THIS_MODULE, open = & xz_dec_test_open, release = & xz_dec_test_release, write = & 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 }
185  state等于xz_dec_init(XZ_PREALLOC, Maximum supported dictionary size )
186  如果(state == NULL)则返回:负ENOMEM
189  Dynamically allocated device major number 等于register_chrdev(0, Device name to pass to register_chrdev(). , & fileops)
190  如果Dynamically allocated device major number 小于0则
191  释放解码器分配的内存
192  返回:Dynamically allocated device major number
195  printk(formational Device name to pass to register_chrdev(). ": module loaded\n")
196  printk(formational Device name to pass to register_chrdev(). ": Create a device node with 'mknod "Device name to pass to register_chrdev(). " c %d 0' and write .xz files to it.\n", Dynamically allocated device major number )
199  返回:0