Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:kobject_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

Proto:int kobject_synth_uevent(struct kobject *kobj, const char *buf, size_t count)

Type:int

Parameter:

TypeParameterName
struct kobject *kobj
const char *buf
size_tcount
194  char * no_uuid_envp[] = {"SYNTH_UUID=0", NULL}
198  msg = NULL
201  r = kobject_action_type(buf, count, & action, & action_args)
202  If r Then
203  msg = "unknown uevent action string"
204  Go to out
207  If Not action_args Then
208  r = kobject_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
209  Go to out
212  r = kobject_action_args(action_args, count - (action_args - buf), & env)
214  If r == -EINVAL Then
215  msg = "incorrect uevent action arguments"
216  Go to out
219  If r Then Go to out
222  r = kobject_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
223  kfree(env)
224  out :
225  If r Then
226  devpath = kobject_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().
227  pr_warn("synth uevent: %s: %s\n", devpath ? : "unknown device", msg ? : "failed to send uevent")
230  kfree(devpath)
232  Return r