Searched refs:childless (Results 1 - 2 of 2) sorted by relevance

/linux-4.1.27/Documentation/filesystems/configfs/
H A Dconfigfs_example_explicit.c39 * 01-childless
41 * This first example is a childless subsystem. It cannot create
50 struct childless { struct
58 ssize_t (*show)(struct childless *, char *);
59 ssize_t (*store)(struct childless *, const char *, size_t);
62 static inline struct childless *to_childless(struct config_item *item) to_childless()
64 return item ? container_of(to_configfs_subsystem(to_config_group(item)), struct childless, subsys) : NULL; to_childless()
67 static ssize_t childless_showme_read(struct childless *childless, childless_showme_read() argument
72 pos = sprintf(page, "%d\n", childless->showme); childless_showme_read()
73 childless->showme++; childless_showme_read()
78 static ssize_t childless_storeme_read(struct childless *childless, childless_storeme_read() argument
81 return sprintf(page, "%d\n", childless->storeme); childless_storeme_read()
84 static ssize_t childless_storeme_write(struct childless *childless, childless_storeme_write() argument
98 childless->storeme = tmp; childless_storeme_write()
103 static ssize_t childless_description_read(struct childless *childless, childless_description_read() argument
107 "[01-childless]\n" childless_description_read()
109 "The childless subsystem is the simplest possible subsystem in\n" childless_description_read()
140 struct childless *childless = to_childless(item); childless_attr_show() local
146 ret = childless_attr->show(childless, page); childless_attr_show()
154 struct childless *childless = to_childless(item); childless_attr_store() local
160 ret = childless_attr->store(childless, page, count); childless_attr_store()
175 static struct childless childless_subsys = {
179 .ci_namebuf = "01-childless",
H A Dconfigfs_example_macros.c38 * 01-childless
40 * This first example is a childless subsystem. It cannot create
49 struct childless { struct
55 static inline struct childless *to_childless(struct config_item *item) to_childless()
57 return item ? container_of(to_configfs_subsystem(to_config_group(item)), struct childless, subsys) : NULL; to_childless()
60 CONFIGFS_ATTR_STRUCT(childless); variable
66 static ssize_t childless_showme_read(struct childless *childless, childless_showme_read() argument
71 pos = sprintf(page, "%d\n", childless->showme); childless_showme_read()
72 childless->showme++; childless_showme_read()
77 static ssize_t childless_storeme_read(struct childless *childless, childless_storeme_read() argument
80 return sprintf(page, "%d\n", childless->storeme); childless_storeme_read()
83 static ssize_t childless_storeme_write(struct childless *childless, childless_storeme_write() argument
97 childless->storeme = tmp; childless_storeme_write()
102 static ssize_t childless_description_read(struct childless *childless, childless_description_read() argument
106 "[01-childless]\n" childless_description_read()
108 "The childless subsystem is the simplest possible subsystem in\n" childless_description_read()
126 CONFIGFS_ATTR_OPS(childless); variable
138 static struct childless childless_subsys = {
142 .ci_namebuf = "01-childless",

Completed in 100 milliseconds