mirror of
https://github.com/torvalds/linux.git
synced 2024-11-30 16:11:38 +00:00
fe1d475888
To allow for easier build test coverage and run-time testing, this allows multiple compression algorithms to be built into pstore. Still only one is supported to operate at a time (which can be selected at build time or at boot time, similar to how LSMs are selected). Signed-off-by: Kees Cook <keescook@chromium.org>
44 lines
1.2 KiB
C
44 lines
1.2 KiB
C
/* 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>
|
|
|
|
#define PSTORE_DEFAULT_KMSG_BYTES 10240
|
|
extern unsigned long kmsg_bytes;
|
|
|
|
#ifdef CONFIG_PSTORE_FTRACE
|
|
extern void pstore_register_ftrace(void);
|
|
extern void pstore_unregister_ftrace(void);
|
|
#else
|
|
static inline void pstore_register_ftrace(void) {}
|
|
static inline void pstore_unregister_ftrace(void) {}
|
|
#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_mkfile(struct dentry *root,
|
|
struct pstore_record *record);
|
|
extern bool pstore_is_mounted(void);
|
|
extern void pstore_record_init(struct pstore_record *record,
|
|
struct pstore_info *psi);
|
|
|
|
/* Called during module_init() */
|
|
extern void __init pstore_choose_compression(void);
|
|
|
|
#endif
|