summaryrefslogtreecommitdiffstats
path: root/include/linux/seq_file.h
diff options
context:
space:
mode:
authorFlorent Revest <revest@chromium.org>2021-04-27 19:43:12 +0200
committerAlexei Starovoitov <ast@kernel.org>2021-04-27 15:50:15 -0700
commit76d6a13383b8e3ff20a9cf52aa9c3de39e485632 (patch)
treea514ff10079e19e036815347ddca67d30771300e /include/linux/seq_file.h
parent2551c2d19c04cd1c7b6c99ec04a8ff08193b0ccc (diff)
downloadlinux-76d6a13383b8e3ff20a9cf52aa9c3de39e485632.tar.gz
linux-76d6a13383b8e3ff20a9cf52aa9c3de39e485632.tar.bz2
linux-76d6a13383b8e3ff20a9cf52aa9c3de39e485632.zip
seq_file: Add a seq_bprintf function
Similarly to seq_buf_bprintf in lib/seq_buf.c, this function writes a printf formatted string with arguments provided in a "binary representation" built by functions such as vbin_printf. Signed-off-by: Florent Revest <revest@chromium.org> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://lore.kernel.org/bpf/20210427174313.860948-2-revest@chromium.org
Diffstat (limited to 'include/linux/seq_file.h')
-rw-r--r--include/linux/seq_file.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/seq_file.h b/include/linux/seq_file.h
index b83b3ae3c877..723b1fa1177e 100644
--- a/include/linux/seq_file.h
+++ b/include/linux/seq_file.h
@@ -146,6 +146,10 @@ void *__seq_open_private(struct file *, const struct seq_operations *, int);
int seq_open_private(struct file *, const struct seq_operations *, int);
int seq_release_private(struct inode *, struct file *);
+#ifdef CONFIG_BINARY_PRINTF
+void seq_bprintf(struct seq_file *m, const char *f, const u32 *binary);
+#endif
+
#define DEFINE_SEQ_ATTRIBUTE(__name) \
static int __name ## _open(struct inode *inode, struct file *file) \
{ \