Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:kobject_action_type

Proto:static int kobject_action_type(const char *buf, size_t count, enum kobject_action *type, const char **args)

Type:int

Parameter:

TypeParameterName
const char *buf
size_tcount
enum kobject_action *type
const char **args
69  ret = -EINVAL
71  If count && ( buf[count - 1] == '\n' || buf[count - 1] == '\0' ) Then count--
74  If Not count Then Go to out
77  args_start = strnchr - Find a character in a length limited string*@s: The string to be searched*@count: The number of characters to be searched*@c: The character to search for* Note that the %NUL-terminator is considered part of the string, and can* be searched for.
78  If args_start Then
79  count_first = args_start - buf
80  args_start = args_start + 1
81  Else count_first = count
84  When action < ARRAY_SIZE - get the number of elements in array @arr*@arr: array to be sized(he strings here must match the enum in include/linux/kobject.h ) cycle
85  If strncmp(he strings here must match the enum in include/linux/kobject.h [action], buf, count_first) != 0 Then Continue
87  If he strings here must match the enum in include/linux/kobject.h [action][count_first] != '\0' Then Continue
89  If args Then args = args_start
91  type = action
92  ret = 0
93  Break
95  out :
96  Return ret
Caller
NameDescribe
kobject_synth_ueventkobject_synth_uevent - send synthetic uevent with arguments*@kobj: struct kobject for which synthetic uevent is to be generated*@buf: buffer containing action type and action args, newline is ignored*@count: length of buffer* Returns 0 if