Function report |
Source Code:lib\kobject_uevent.c |
Create Date:2022-07-28 06:14:43 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name: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
Proto:int kobject_uevent_env(struct kobject *kobj, enum kobject_action action, char *envp_ext[])
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct kobject * | kobj | |
| enum kobject_action | action | |
| char * | envp_ext |
| 461 | const char * devpath = NULL |
| 466 | i = 0 |
| 467 | retval = 0 |
| 473 | If action == KOBJ_REMOVE Then state_remove_uevent_sent = 1 |
| 476 | pr_debug("kobject: '%s' (%p): %s\n", kobject_name(kobj), kobj, __func__) |
| 484 | If Not kset Then |
| 485 | pr_debug("kobject: '%s' (%p): %s: attempted to send uevent without kset!\n", kobject_name(kobj), kobj, __func__) |
| 488 | Return -EINVAL |
| 492 | uevent_ops = uevent_ops |
| 495 | If uevent_suppress Then |
| 496 | pr_debug("kobject: '%s' (%p): %s: uevent_suppress caused the event to drop!\n", kobject_name(kobj), kobj, __func__) |
| 499 | Return 0 |
| 502 | If uevent_ops && filter Then If Not filter(kset, kobj) Then |
| 504 | pr_debug("kobject: '%s' (%p): %s: filter function caused the event to drop!\n", kobject_name(kobj), kobj, __func__) |
| 507 | Return 0 |
| 513 | Else subsystem = kobject_name( & kobj) |
| 515 | If Not subsystem Then |
| 516 | pr_debug("kobject: '%s' (%p): %s: unset subsystem caused the event to drop!\n", kobject_name(kobj), kobj, __func__) |
| 519 | Return 0 |
| 523 | env = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc). |
| 529 | If Not devpath Then |
| 546 | If envp_ext Then |
| 555 | If uevent_ops && uevent Then |
| 557 | If retval Then |
| 558 | pr_debug("kobject: '%s' (%p): %s: uevent() returned %d\n", kobject_name(kobj), kobj, __func__, retval) |
| 561 | Go to exit |
| 574 | state_add_uevent_sent = 1 |
| 575 | Break |
| 577 | Case action == KOBJ_UNBIND |
| 578 | zap_modalias_env(env) |
| 579 | Break |
| 581 | Default |
| 582 | Break |
| 588 | If retval Then |
| 590 | Go to exit |
| 623 | exit : |
| 626 | Return retval |
| Name | Describe |
|---|---|
| kobject_synth_uevent | 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 |
| kobject_uevent | kobject_uevent - notify userspace by sending an uevent*@kobj: struct kobject that the action is happening to*@action: action that is happening* Returns 0 if kobject_uevent() is completed with success or the* corresponding error when it fails. |
| kobject_rename | kobject_rename() - Change the name of an object |
| kobject_move | kobject_move() - Move object to another parent.*@kobj: object in question.*@new_parent: object's new parent (can be NULL) |
| disk_check_events |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |