Function report |
Source Code:lib\kobject.c |
Create Date:2022-07-28 06:16:08 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:kobject_add_internal
Proto:static int kobject_add_internal(struct kobject *kobj)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct kobject * | kobj |
| 227 | error = 0 |
| 237 | Return -EINVAL |
| 243 | If kset Then |
| 244 | If Not parent Then parent = kobject_get() - Increment refcount for object.*@kobj: object. |
| 250 | pr_debug("kobject: '%s' (%p): %s: parent: '%s', set: '%s'\n", kobject_name(kobj), kobj, __func__, parent ? kobject_name(parent) : "<NULL>", kset ? kobject_name( & kobj) : "<NULL>") |
| 255 | error = create_dir(kobj) |
| 256 | If error Then |
| 259 | parent = NULL |
| 262 | If error == -EEXIST Then pr_err("%s failed for %s with -EEXIST, don't try to register things with the same name in the same directory.\n", __func__, kobject_name(kobj)) |
| 265 | Else pr_err("%s failed for %s (error: %d parent: %s)\n", __func__, kobject_name(kobj), error, parent ? kobject_name(parent) : "'none'") |
| 269 | Else state_in_sysfs = 1 |
| 272 | Return error |
| Name | Describe |
|---|---|
| kobject_add_varg | |
| kset_register | kset_register() - Initialize and add a kset.*@k: kset. |
| 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 |