aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/seq_file.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2013-12-16 05:23:45 -0500
committerJohannes Berg <johannes.berg@intel.com>2013-12-16 05:23:45 -0500
commitc4de673b775e4db48cd2db6277e0c6714332ca0c (patch)
tree84f9e4728e6ccf257236d2ba063b6e784ec8b65d /include/linux/seq_file.h
parentbafdc614a1f4f8be8cde41b8ab10ac17e67c1837 (diff)
parent55957fb7a0b61d8ab6ff3f04e279b8fc22b738fa (diff)
Merge remote-tracking branch 'wireless-next/master' into mac80211-next
Diffstat (limited to 'include/linux/seq_file.h')
-rw-r--r--include/linux/seq_file.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/seq_file.h b/include/linux/seq_file.h
index 4e32edc8f506..52e0097f61f0 100644
--- a/include/linux/seq_file.h
+++ b/include/linux/seq_file.h
@@ -20,6 +20,7 @@ struct seq_file {
20 size_t size; 20 size_t size;
21 size_t from; 21 size_t from;
22 size_t count; 22 size_t count;
23 size_t pad_until;
23 loff_t index; 24 loff_t index;
24 loff_t read_pos; 25 loff_t read_pos;
25 u64 version; 26 u64 version;
@@ -79,6 +80,20 @@ static inline void seq_commit(struct seq_file *m, int num)
79 } 80 }
80} 81}
81 82
83/**
84 * seq_setwidth - set padding width
85 * @m: the seq_file handle
86 * @size: the max number of bytes to pad.
87 *
88 * Call seq_setwidth() for setting max width, then call seq_printf() etc. and
89 * finally call seq_pad() to pad the remaining bytes.
90 */
91static inline void seq_setwidth(struct seq_file *m, size_t size)
92{
93 m->pad_until = m->count + size;
94}
95void seq_pad(struct seq_file *m, char c);
96
82char *mangle_path(char *s, const char *p, const char *esc); 97char *mangle_path(char *s, const char *p, const char *esc);
83int seq_open(struct file *, const struct seq_operations *); 98int seq_open(struct file *, const struct seq_operations *);
84ssize_t seq_read(struct file *, char __user *, size_t, loff_t *); 99ssize_t seq_read(struct file *, char __user *, size_t, loff_t *);