函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\dma\debug.c Create Date:2022-07-27 11:34:42
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:filter_write

函数原型:static ssize_t filter_write(struct file *file, const char __user *userbuf, size_t count, loff_t *ppos)

返回类型:ssize_t

参数:

类型参数名称
struct file *file
const char __user *userbuf
size_tcount
loff_t *ppos
761  len等于两数取小(count, (size_t)(per-driver filter related state - 1))
762  如果copy_from_user(buf, userbuf, len)则返回:负EFAULT
765  buf[len]等于0
767  write_lock_irqsave( & driver_name_lock, flags)
777  如果非isalnum(buf[0])则
783  如果current_driver_name[0]则打印信息("switching off dma-debug driver filter\n")
785  current_driver_name[0]等于0
786  current_driver = NULL
787  转到:out_unlock
794 i小于per-driver filter related state 减1循环
795  current_driver_name[i]等于buf[i]
796  如果Note: isspace() must return false for %NUL-terminator (buf[i])或buf[i]恒等于' '或buf[i]恒等于0则退出
799  current_driver_name[i]等于0
800  current_driver = NULL
802  打印信息("enable driver filter for driver [%s]\n", current_driver_name)
805  out_unlock :
806  write_unlock_irqrestore( & driver_name_lock, flags)
808  返回:count