diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:49:45 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:49:45 +0000 |
commit | 2c3c1048746a4622d8c89a29670120dc8fab93c4 (patch) | |
tree | 848558de17fb3008cdf4d861b01ac7781903ce39 /fs/pstore/internal.h | |
parent | Initial commit. (diff) | |
download | linux-2c3c1048746a4622d8c89a29670120dc8fab93c4.tar.xz linux-2c3c1048746a4622d8c89a29670120dc8fab93c4.zip |
Adding upstream version 6.1.76.upstream/6.1.76
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'fs/pstore/internal.h')
-rw-r--r-- | fs/pstore/internal.h | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/fs/pstore/internal.h b/fs/pstore/internal.h new file mode 100644 index 000000000..801d6c0b1 --- /dev/null +++ b/fs/pstore/internal.h @@ -0,0 +1,52 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef __PSTORE_INTERNAL_H__ +#define __PSTORE_INTERNAL_H__ + +#include <linux/types.h> +#include <linux/time.h> +#include <linux/pstore.h> + +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 +extern void pstore_register_pmsg(void); +extern void pstore_unregister_pmsg(void); +#else +static inline void pstore_register_pmsg(void) {} +static inline void pstore_unregister_pmsg(void) {} +#endif + +extern struct pstore_info *psinfo; + +extern void pstore_set_kmsg_bytes(int); +extern void pstore_get_records(int); +extern void pstore_get_backend_records(struct pstore_info *psi, + struct dentry *root, int quiet); +extern int pstore_put_backend_records(struct pstore_info *psi); +extern int pstore_mkfile(struct dentry *root, + struct pstore_record *record); +extern void pstore_record_init(struct pstore_record *record, + struct pstore_info *psi); + +/* Called during pstore init/exit. */ +int __init pstore_init_fs(void); +void __exit pstore_exit_fs(void); + +#endif |