Linux Kernel
3.7.1
|
#include <linux/kobject.h>
#include <linux/module.h>
#include <linux/dcache.h>
#include <linux/namei.h>
#include <linux/err.h>
#include "sysfs.h"
Go to the source code of this file.
Functions | |
int | sysfs_create_group (struct kobject *kobj, const struct attribute_group *grp) |
int | sysfs_update_group (struct kobject *kobj, const struct attribute_group *grp) |
void | sysfs_remove_group (struct kobject *kobj, const struct attribute_group *grp) |
int | sysfs_merge_group (struct kobject *kobj, const struct attribute_group *grp) |
EXPORT_SYMBOL_GPL (sysfs_merge_group) | |
void | sysfs_unmerge_group (struct kobject *kobj, const struct attribute_group *grp) |
EXPORT_SYMBOL_GPL (sysfs_unmerge_group) | |
EXPORT_SYMBOL_GPL (sysfs_create_group) | |
EXPORT_SYMBOL_GPL (sysfs_update_group) | |
EXPORT_SYMBOL_GPL (sysfs_remove_group) | |
EXPORT_SYMBOL_GPL | ( | sysfs_merge_group | ) |
EXPORT_SYMBOL_GPL | ( | sysfs_unmerge_group | ) |
EXPORT_SYMBOL_GPL | ( | sysfs_create_group | ) |
EXPORT_SYMBOL_GPL | ( | sysfs_update_group | ) |
EXPORT_SYMBOL_GPL | ( | sysfs_remove_group | ) |
sysfs_create_group - given a directory kobject, create an attribute group : The kobject to create the group on : The attribute group to create
This function creates a group for the first time. It will explicitly warn and error if any of the attribute files being created already exist.
Returns 0 on success or error.
sysfs_merge_group - merge files into a pre-existing attribute group. : The kobject containing the group. : The files to create and the attribute group they belong to.
This function returns an error if the group doesn't exist or any of the files already exist in that group, in which case none of the new files are created.
sysfs_update_group - given a directory kobject, update an attribute group : The kobject to update the group on : The attribute group to update
This function updates an attribute group. Unlike sysfs_create_group(), it will explicitly not warn or error if any of the attribute files being created already exist. Furthermore, if the visibility of the files has changed through the is_visible() callback, it will update the permissions and add or remove the relevant files.
The primary use for this function is to call it after making a change that affects group visibility.
Returns 0 on success or error.