函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\kobject.c Create Date:2022-07-27 07:13:30
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:移动对象

函数原型:int kobject_move(struct kobject *kobj, struct kobject *new_parent)

返回类型:int

参数:

类型参数名称
struct kobject *kobj
struct kobject *new_parent
558  const char * devpath = NULL
559  char * devpath_string = NULL
562  kobj等于增加引用计数对象
563  如果非kobj则返回:负EINVAL
565  new_parent等于增加引用计数对象
566  如果非new_parent
567  如果设备组指针new_parent等于增加引用计数对象
572  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().
573  如果非devpath
574  error等于负ENOMEM
575  转到:out
577  devpath_string等于开辟内存
578  如果非devpath_string
579  error等于负ENOMEM
580  转到:out
582  输出格式化串
583  envp[0]等于devpath_string
584  envp[1] = NULL
585  error等于sysfs_move_dir_ns(kobj, new_parent, 返回kobj命名空间标签)
586  如果error则转到:out
588  old_parent等于父设备指针
589  父设备指针等于new_parent
590  new_parent = NULL
591  递减引用计数对象
592  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
593  out :
594  递减引用计数对象
595  递减引用计数对象
596  释放内存
597  释放内存
598  返回:error