internal.h 1.2 KB
Newer Older
1
/* SPDX-License-Identifier: GPL-2.0 */
2 3 4
#ifndef __PSTORE_INTERNAL_H__
#define __PSTORE_INTERNAL_H__

5 6
#include <linux/types.h>
#include <linux/time.h>
7 8
#include <linux/pstore.h>

D
David Howells 已提交
9 10 11
#define PSTORE_DEFAULT_KMSG_BYTES 10240
extern unsigned long kmsg_bytes;

12 13
#ifdef CONFIG_PSTORE_FTRACE
extern void pstore_register_ftrace(void);
G
Geliang Tang 已提交
14
extern void pstore_unregister_ftrace(void);
15 16
#else
static inline void pstore_register_ftrace(void) {}
G
Geliang Tang 已提交
17
static inline void pstore_unregister_ftrace(void) {}
18 19
#endif

20 21
#ifdef CONFIG_PSTORE_PMSG
extern void pstore_register_pmsg(void);
G
Geliang Tang 已提交
22
extern void pstore_unregister_pmsg(void);
23 24
#else
static inline void pstore_register_pmsg(void) {}
G
Geliang Tang 已提交
25
static inline void pstore_unregister_pmsg(void) {}
26 27
#endif

28 29
extern struct pstore_info *psinfo;

30
extern void	pstore_set_kmsg_bytes(int);
31
extern void	pstore_get_records(int);
32 33 34 35
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);
36
extern bool	pstore_is_mounted(void);
37 38
extern void	pstore_record_init(struct pstore_record *record,
				   struct pstore_info *psi);
39

40 41 42
/* Called during pstore init/exit. */
int __init	pstore_init_fs(void);
void __exit	pstore_exit_fs(void);
43

44
#endif