Merge tag 'trace-3.13' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux...
[linux-drm-fsl-dcu.git] / fs / seq_file.c
index a290157265ef5cfb52dbdb6a9e950e9733462d16..1cd2388ca5bd7c11cd504b3a65ba67969cd936b5 100644 (file)
@@ -766,6 +766,21 @@ int seq_write(struct seq_file *seq, const void *data, size_t len)
 }
 EXPORT_SYMBOL(seq_write);
 
+/**
+ * seq_pad - write padding spaces to buffer
+ * @m: seq_file identifying the buffer to which data should be written
+ * @c: the byte to append after padding if non-zero
+ */
+void seq_pad(struct seq_file *m, char c)
+{
+       int size = m->pad_until - m->count;
+       if (size > 0)
+               seq_printf(m, "%*s", size, "");
+       if (c)
+               seq_putc(m, c);
+}
+EXPORT_SYMBOL(seq_pad);
+
 struct list_head *seq_list_start(struct list_head *head, loff_t pos)
 {
        struct list_head *lh;