Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\printk\printk.c Create Date:2022-07-28 10:06:02
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:devkmsg_open

Proto:static int devkmsg_open(struct inode *inode, struct file *file)

Type:int

Parameter:

TypeParameterName
struct inode *inode
struct file *file
1000  If devkmsg_log & DEVKMSG_LOG_MASK_OFF Then Return -EPERM
1004  If (f_flags & O_ACCMODE) != O_WRONLY Then
1005  err = check_syslog_permissions(Read all messages remaining in the ring buffer. , SYSLOG_FROM_READER)
1007  If err Then Return err
1011  user = Allocation memory
1012  If Not user Then Return -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  Return 0