aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/filesystems/configfs/configfs.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/filesystems/configfs/configfs.txt')
-rw-r--r--Documentation/filesystems/configfs/configfs.txt27
1 files changed, 18 insertions, 9 deletions
diff --git a/Documentation/filesystems/configfs/configfs.txt b/Documentation/filesystems/configfs/configfs.txt
index 15838d706ea2..fabcb0e00f25 100644
--- a/Documentation/filesystems/configfs/configfs.txt
+++ b/Documentation/filesystems/configfs/configfs.txt
@@ -233,12 +233,10 @@ accomplished via the group operations specified on the group's
233config_item_type. 233config_item_type.
234 234
235 struct configfs_group_operations { 235 struct configfs_group_operations {
236 int (*make_item)(struct config_group *group, 236 struct config_item *(*make_item)(struct config_group *group,
237 const char *name, 237 const char *name);
238 struct config_item **new_item); 238 struct config_group *(*make_group)(struct config_group *group,
239 int (*make_group)(struct config_group *group, 239 const char *name);
240 const char *name,
241 struct config_group **new_group);
242 int (*commit_item)(struct config_item *item); 240 int (*commit_item)(struct config_item *item);
243 void (*disconnect_notify)(struct config_group *group, 241 void (*disconnect_notify)(struct config_group *group,
244 struct config_item *item); 242 struct config_item *item);
@@ -313,9 +311,20 @@ the subsystem must be ready for it.
313[An Example] 311[An Example]
314 312
315The best example of these basic concepts is the simple_children 313The best example of these basic concepts is the simple_children
316subsystem/group and the simple_child item in configfs_example.c It 314subsystem/group and the simple_child item in configfs_example_explicit.c
317shows a trivial object displaying and storing an attribute, and a simple 315and configfs_example_macros.c. It shows a trivial object displaying and
318group creating and destroying these children. 316storing an attribute, and a simple group creating and destroying these
317children.
318
319The only difference between configfs_example_explicit.c and
320configfs_example_macros.c is how the attributes of the childless item
321are defined. The childless item has extended attributes, each with
322their own show()/store() operation. This follows a convention commonly
323used in sysfs. configfs_example_explicit.c creates these attributes
324by explicitly defining the structures involved. Conversely
325configfs_example_macros.c uses some convenience macros from configfs.h
326to define the attributes. These macros are similar to their sysfs
327counterparts.
319 328
320[Hierarchy Navigation and the Subsystem Mutex] 329[Hierarchy Navigation and the Subsystem Mutex]
321 330