函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:kobject_action_args

函数原型:static int kobject_action_args(const char *buf, size_t count, struct kobj_uevent_env **ret_env)

返回类型:int

参数:

类型参数名称
const char *buf
size_tcount
struct kobj_uevent_env **ret_env
117  struct kobj_uevent_env * env = NULL
120  r等于负EINVAL
122  如果countbuf[count - 1]恒等于'\n'或buf[count - 1]恒等于'\0'的值则count自减
125  如果非count则返回:负EINVAL
128  env等于分配内存并置零
129  如果非env则返回:负ENOMEM
133  如果count小于The length of a UUID string ("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee")* not including trailing NUL.或非uuid_is_valid(buf)或 向环境缓冲区添加键值字符串则转到:out
141  next等于bufThe length of a UUID string ("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee")* not including trailing NUL.
142  buf_end等于bufcount减1
144 next小于等于buf_end循环
145  如果next不等于' '则转到:out
149  key等于next先自加
150  如果key大于buf_end则转到:out
153  buf等于next
154  next等于action_arg_word_end(buf, buf_end, '=')
155  如果非nextnext大于buf_endnext不等于'='则转到:out
157  key_len等于nextbuf
160  如果next先自加大于buf_end则转到:out
163  buf等于next
164  next等于action_arg_word_end(buf, buf_end, ' ')
165  如果非next则转到:out
168  如果 向环境缓冲区添加键值字符串则转到:out
173  r等于0
174  out :
175  如果r释放内存
177  否则ret_env等于env
179  返回:r
调用者
名称描述
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