1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * Copyright (C) 2021 Huawei Technologies Co., Ltd. All rights reserved.
4  */
5 
6 #ifndef BLACKBOX_STORAGE_H
7 #define BLACKBOX_STORAGE_H
8 
9 #include <linux/kmsg_dump.h>
10 
11 struct reboot_crashlog_storage {
12 	int (*storage_log)(void *out, unsigned int outlen);
13 	int (*get_log)(void *in, unsigned int inlen);
14 	void (*blackbox_dump)(struct kmsg_dumper *dumper, enum kmsg_dump_reason reason);
15 	const char *material;
16 };
17 
18 extern char *storage_material;
19 extern const struct reboot_crashlog_storage *storage_lastword;
20 extern const struct reboot_crashlog_storage storage_lastwords[];
21 
22 #endif /* BLACKBOX_STORAGE_H */
23