Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:add_uevent_var - add key value string to the environment buffer*@env: environment buffer structure*@format: printf format for the key=value pair* Returns 0 if environment variable was added successfully or -ENOMEM* if no space was available.

Proto:int add_uevent_var(struct kobj_uevent_env *env, const char *format, ...)

Type:int

Parameter:

TypeParameterName
struct kobj_uevent_env *env
const char *format
658  If envp_idx >= ARRAY_SIZE - get the number of elements in array @arr*@arr: array to be sized(envp) Then
659  WARN(1, r conditions "add_uevent_var: too many keys\n")
660  Return -ENOMEM
663  va_start(args, format)
664  len = vsnprintf - Format a string and place it in a buffer*@buf: The buffer to place the result into*@size: The size of the buffer, including the trailing null space*@fmt: The format string to use*@args: Arguments for the format string* This function generally
667  va_end(args)
669  If len >= size of buf - buflen Then
670  WARN(1, r conditions "add_uevent_var: buffer size too small\n")
671  Return -ENOMEM
674  envp[envp_idx++] = buf[buflen]
675  buflen += len + 1
676  Return 0
Caller
NameDescribe
kobject_action_args
kobject_uevent_envkobject_uevent_env - send an uevent with environmental data*@kobj: struct kobject that the action is happening to*@action: action that is happening*@envp_ext: pointer to environmental data* Returns 0 if kobject_uevent_env() is completed with success or the
part_uevent