Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\inode.c Create Date:2022-07-28 20:07:59
Last Modify:2020-03-18 19:19:59 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:init_special_inode

Proto:void init_special_inode(struct inode *inode, umode_t mode, dev_t rdev)

Type:void

Parameter:

TypeParameterName
struct inode *inode
umode_tmode
dev_trdev
2027  i_mode = mode
2028  If S_ISCHR(mode) Then
2029  rmer ->i_op->default_file_ops = Dummy default file-operations: the only thing this does* is contain the open that then fills in the correct operations* depending on the special file...
2030  i_rdev = rdev
2031  Else if S_ISBLK(mode) Then
2032  rmer ->i_op->default_file_ops = def_blk_fops
2033  i_rdev = rdev
2034  Else if S_ISFIFO(mode) Then rmer ->i_op->default_file_ops = pipefifo_fops
2036  Else if S_ISSOCK(mode) Then Else
2039  printk - print a kernel message*@fmt: format string* This is printk(). It can be called from any context. We want it to work.* We try to grab the console_lock. If we succeed, it's easy - we log the* output and call the console drivers
Caller
NameDescribe
aa_mk_null_file
mknod_ptmx
devpts_pty_newdevpts_pty_new -- create a new inode in /dev/pts/*@ptmx_inode: inode of the master*@device: major+minor of the node to be created*@index: used as a name of the node*@priv: what's given back by devpts_get_priv* The created inode is returned
ramfs_get_inode