函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:字符串转换为整数

函数原型:static int kobject_action_type(const char *buf, size_t count, enum kobject_action *type, const char **args)

返回类型:int

参数:

类型参数名称
const char *buf
size_tcount
enum kobject_action *type
const char **args
69  ret等于负EINVAL
71  如果countbuf[count - 1]恒等于'\n'或buf[count - 1]恒等于'\0'的值则count自减
74  如果非count则转到:out
77  args_start等于在字符串中查找字符
78  如果args_start
79  count_first等于args_startbuf
80  args_start等于args_start加1
81  否则count_first等于count
84 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 )循环
85  如果字符串指定长度比较不等于0则继续下一循环
87  如果he strings here must match the enum in include/linux/kobject.h [action][count_first]不等于'\0'则继续下一循环
89  如果argsargs等于args_start
91  type等于action
92  ret等于0
93  退出
95  out :
96  返回:ret
调用者
名称描述
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