Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\notifier-error-inject.c Create Date:2022-07-28 07:11:40
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:notifier_err_inject_callback

Proto:static int notifier_err_inject_callback(struct notifier_block *nb, unsigned long val, void *p)

Type:int

Parameter:

TypeParameterName
struct notifier_block *nb
unsigned longval
void *p
30  err = 0
31  err_inject = container_of - cast a member of a structure out to the containing structure*@ptr: the pointer to the member.*@type: the type of the container struct this is embedded in.*@member: the name of the member within the struct.(nb, structnotifier_err_inject, nb)
35  When name cycle
36  If val == val Then
37  err = error
38  Break
41  If err Then pr_info("Injecting error (%d) to %s\n", err, name)
44  Return Encapsulate (negative) errno value (in particular, NOTIFY_BAD <=> EPERM).