Changeset View
Changeset View
Standalone View
Standalone View
sys/compat/linuxkpi/common/include/linux/kobject.h
| Show First 20 Lines • Show All 54 Lines • ▼ Show 20 Lines | |||||
| extern const struct kobj_type linux_kfree_type; | extern const struct kobj_type linux_kfree_type; | ||||
| struct kobject { | struct kobject { | ||||
| struct kobject *parent; | struct kobject *parent; | ||||
| char *name; | char *name; | ||||
| struct kref kref; | struct kref kref; | ||||
| const struct kobj_type *ktype; | const struct kobj_type *ktype; | ||||
| struct list_head entry; | struct list_head entry; | ||||
| union { | |||||
| struct sysctl_oid *oidp; | struct sysctl_oid *oidp; | ||||
| /* | |||||
| * On Linux, a `struct kernfs_node *` pointer, representing a | |||||
| * directory in sysfs, is kept in the `sd` struct field. | |||||
| * | |||||
| * We don't have that on FreeBSD because we use sysctls | |||||
bz: One day we should probably fix this -- would be a nice GSoC project next year? | |||||
Done Inline ActionsYes, I would love to have proper sysfs support. This would improve compatibility with Linux: all the libraries that expect sysfs and all the forum posts from people helping other users would be valid for FreeBSD as well. dumbbell: Yes, I would love to have proper sysfs support. This would improve compatibility with Linux… | |||||
| * instead. Let's alias the sysctl OID pointer to `sd`. This | |||||
| * pointer is checked by the DRM drivers using: | |||||
| * if (var->kobj.sd) { | |||||
| * ... | |||||
| * } | |||||
| */ | |||||
| void *sd; | |||||
| }; | |||||
| struct kset *kset; | struct kset *kset; | ||||
| }; | }; | ||||
| extern struct kobject *mm_kobj; | extern struct kobject *mm_kobj; | ||||
| struct attribute { | struct attribute { | ||||
| const char *name; | const char *name; | ||||
| struct module *owner; | struct module *owner; | ||||
| ▲ Show 20 Lines • Show All 141 Lines • Show Last 20 Lines | |||||
One day we should probably fix this -- would be a nice GSoC project next year?