Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:kobject_set_name_vargs() - Set the name of a kobject.*@kobj: struct kobject to set the name of*@fmt: format string used to build the name*@vargs: vargs to format the string.

Proto:int kobject_set_name_vargs(struct kobject *kobj, const char *fmt, va_list vargs)

Type:int

Parameter:

TypeParameterName
struct kobject *kobj
const char *fmt
va_listvargs
286  If name && Not fmt Then Return 0
289  s = kvasprintf_const(GFP_KERNEL, fmt, vargs)
290  If Not s Then Return -ENOMEM
299  If strchr(s, '/') Then
302  t = kstrdup(s, GFP_KERNEL)
303  kfree_const - conditionally free memory*@x: pointer to the memory* Function calls kfree only if @x is not in .rodata section.
304  If Not t Then Return -ENOMEM
306  strreplace - Replace all occurrences of character in string.*@s: The string to operate on.*@old: The character being replaced.*@new: The character @old is replaced with.* Returns pointer to the nul byte at the end of @s.
307  s = t
309  kfree_const - conditionally free memory*@x: pointer to the memory* Function calls kfree only if @x is not in .rodata section.
310  name = s
312  Return 0
Caller
NameDescribe
kobject_set_namekobject_set_name() - Set the name of a kobject
kobject_add_varg