summaryrefslogtreecommitdiff
path: root/fs/pstore/internal.h
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2020-05-08 08:42:12 -0700
committerKees Cook <keescook@chromium.org>2020-05-30 10:34:02 -0700
commit16a583079e937f6f5e6274ef7fda6dbf7dcb669f (patch)
treed18206ff6cac569bbe70e9903110964222c34717 /fs/pstore/internal.h
parentdf9bf19d88965758c700f46ef75110336fea8654 (diff)
pstore/ftrace: Provide ftrace log merging routine
Move the ftrace log merging logic out of pstore/ram into pstore/ftrace so other backends can use it, like pstore/zone. Link: https://lore.kernel.org/lkml/20200510202436.63222-7-keescook@chromium.org/ Signed-off-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'fs/pstore/internal.h')
-rw-r--r--fs/pstore/internal.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/pstore/internal.h b/fs/pstore/internal.h
index 8efd72d93b10..7fb219042f13 100644
--- a/fs/pstore/internal.h
+++ b/fs/pstore/internal.h
@@ -12,9 +12,18 @@ extern unsigned long kmsg_bytes;
#ifdef CONFIG_PSTORE_FTRACE
extern void pstore_register_ftrace(void);
extern void pstore_unregister_ftrace(void);
+ssize_t pstore_ftrace_combine_log(char **dest_log, size_t *dest_log_size,
+ const char *src_log, size_t src_log_size);
#else
static inline void pstore_register_ftrace(void) {}
static inline void pstore_unregister_ftrace(void) {}
+static inline ssize_t
+pstore_ftrace_combine_log(char **dest_log, size_t *dest_log_size,
+ const char *src_log, size_t src_log_size)
+{
+ *dest_log_size = 0;
+ return 0;
+}
#endif
#ifdef CONFIG_PSTORE_PMSG