18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Copyright (C) 2021 Huawei Technologies Co., Ltd. All rights reserved. 48c2ecf20Sopenharmony_ci */ 58c2ecf20Sopenharmony_ci 68c2ecf20Sopenharmony_ci#ifndef BLACKBOX_STORAGE_H 78c2ecf20Sopenharmony_ci#define BLACKBOX_STORAGE_H 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_ci#include <linux/kmsg_dump.h> 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_cistruct reboot_crashlog_storage { 128c2ecf20Sopenharmony_ci int (*storage_log)(void *out, unsigned int outlen); 138c2ecf20Sopenharmony_ci int (*get_log)(void *in, unsigned int inlen); 148c2ecf20Sopenharmony_ci void (*blackbox_dump)(struct kmsg_dumper *dumper, enum kmsg_dump_reason reason); 158c2ecf20Sopenharmony_ci const char *material; 168c2ecf20Sopenharmony_ci}; 178c2ecf20Sopenharmony_ci 188c2ecf20Sopenharmony_ciextern char *storage_material; 198c2ecf20Sopenharmony_ciextern const struct reboot_crashlog_storage *storage_lastword; 208c2ecf20Sopenharmony_ciextern const struct reboot_crashlog_storage storage_lastwords[]; 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_ci#endif /* BLACKBOX_STORAGE_H */ 23