函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:fill_kobj_path

函数原型:static void fill_kobj_path(struct kobject *kobj, char *path, int length)

返回类型:void

参数:

类型参数名称
struct kobject *kobj
char *path
intlength
151  length先自减
152 parent循环
153  cur等于strlen(kobject_name(parent))
155  length减等于cur
156  内存复制(path + length, kobject_name(parent), cur)
157  *pathlength先自减的和等于'/'
160  pr_debug("kobject: '%s' (%p): %s: path = '%s'\n", kobject_name(kobj), kobj, __func__, path)
调用者
名称描述
kobject_get_pathkobject_get_path() - Allocate memory and fill in the path for @kobj.*@kobj: kobject in question, with which to build the path*@gfp_mask: the allocation type used to allocate the path* Return: The newly allocated memory, caller must free with kfree().