函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:devkmsg_open

函数原型:static int devkmsg_open(struct inode *inode, struct file *file)

返回类型:int

参数:

类型参数名称
struct inode *inode
struct file *file
1000  如果devkmsg_log按位与DEVKMSG_LOG_MASK_OFF则返回:负EPERM
1004  如果f_flags按位与O_ACCMODE的值不等于O_WRONLY
1005  err等于check_syslog_permissions(Read all messages remaining in the ring buffer. , SYSLOG_FROM_READER)
1007  如果err则返回:err
1011  user等于开辟内存
1012  如果非user则返回:负ENOMEM
1015  ratelimit_default_init( & rs)
1016  ratelimit_set_flags( & rs, ssue num suppressed message on exit )
1018  mutex_init - initialize the mutex*@mutex: the mutex to be initialized* Initialize the mutex to unlocked state.* It is not allowed to initialize an already locked mutex.( & lock)
1020  Helper macros to lock/unlock logbuf_lock and switch between* printk-safe/unsafe modes.()
1021  idx等于log_first_idx
1022  seq等于dex and sequence number of the first record stored in the buffer
1023  logbuf_unlock_irq()
1025  needed for tty driver, and maybe others 等于user
1026  返回:0