aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/cgroup.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
index 88a734edccbc..f5379455bb59 100644
--- a/include/linux/cgroup.h
+++ b/include/linux/cgroup.h
@@ -205,6 +205,13 @@ struct cftype {
205 * subsystem, followed by a period */ 205 * subsystem, followed by a period */
206 char name[MAX_CFTYPE_NAME]; 206 char name[MAX_CFTYPE_NAME];
207 int private; 207 int private;
208
209 /*
210 * If non-zero, defines the maximum length of string that can
211 * be passed to write_string; defaults to 64
212 */
213 size_t max_write_len;
214
208 int (*open)(struct inode *inode, struct file *file); 215 int (*open)(struct inode *inode, struct file *file);
209 ssize_t (*read)(struct cgroup *cgrp, struct cftype *cft, 216 ssize_t (*read)(struct cgroup *cgrp, struct cftype *cft,
210 struct file *file, 217 struct file *file,
@@ -249,6 +256,13 @@ struct cftype {
249 int (*write_s64)(struct cgroup *cgrp, struct cftype *cft, s64 val); 256 int (*write_s64)(struct cgroup *cgrp, struct cftype *cft, s64 val);
250 257
251 /* 258 /*
259 * write_string() is passed a nul-terminated kernelspace
260 * buffer of maximum length determined by max_write_len.
261 * Returns 0 or -ve error code.
262 */
263 int (*write_string)(struct cgroup *cgrp, struct cftype *cft,
264 const char *buffer);
265 /*
252 * trigger() callback can be used to get some kick from the 266 * trigger() callback can be used to get some kick from the
253 * userspace, when the actual string written is not important 267 * userspace, when the actual string written is not important
254 * at all. The private field can be used to determine the 268 * at all. The private field can be used to determine the