Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:create_dir

Proto:static int create_dir(struct kobject *kobj)

Type:int

Parameter:

TypeParameterName
struct kobject *kobj
85  ktype = get_ktype(kobj)
89  error = sysfs_create_dir_ns(kobj, kobject_namespace() - Return @kobj's namespace tag.*@kobj: kobject in question* Returns namespace tag of @kobj if its parent has namespace ops enabled* and thus @kobj should have a namespace tag associated with it. Returns* %NULL otherwise.)
90  If error Then Return error
93  error = populate_dir - populate directory with attributes
94  If error Then
95  sysfs_remove_dir(kobj)
96  Return error
99  If ktype Then
100  error = sysfs_create_groups(kobj, default_groups)
101  If error Then
103  Return error
111  sysfs_get( sysfs directory entry )
117  ops = kobj_child_ns_ops(kobj)
118  If ops Then
119  BUG_ON(type <= KOBJ_NS_TYPE_NONE)
120  BUG_ON(type >= KOBJ_NS_TYPES)
121  BUG_ON(!kobj_ns_type_registered(type))
123  sysfs_enable_ns( sysfs directory entry )
126  Return 0
Caller
NameDescribe
kobject_add_internal