Changeset View
Changeset View
Standalone View
Standalone View
sys/compat/linuxkpi/common/include/linux/kmsg_dump.h
- This file was added.
| /* | |||||
| * SPDX-License-Identifier: BSD-2-Clause | |||||
bz: Not needed anymore | |||||
| * | |||||
| * Copyright (c) 2025-2026 The FreeBSD Foundation | |||||
| * Copyright (c) 2025-2026 Jean-Sébastien Pédron <dumbbell@FreeBSD.org> | |||||
| * | |||||
| * This software was developed by Jean-Sébastien Pédron under sponsorship | |||||
| * from the FreeBSD Foundation. | |||||
| */ | |||||
| #ifndef _LINUXKPI_LINUX_KMSG_DUMP_H_ | |||||
| #define _LINUXKPI_LINUX_KMSG_DUMP_H_ | |||||
| #include <linux/errno.h> | |||||
| #include <linux/list.h> | |||||
| #include <linux/kernel.h> /* For pr_debug() */ | |||||
| enum kmsg_dump_reason { | |||||
| KMSG_DUMP_UNDEF, | |||||
| KMSG_DUMP_PANIC, | |||||
| KMSG_DUMP_OOPS, | |||||
| KMSG_DUMP_EMERG, | |||||
| KMSG_DUMP_SHUTDOWN, | |||||
| KMSG_DUMP_MAX | |||||
| }; | |||||
| struct kmsg_dumper { | |||||
| struct list_head list; | |||||
| void (*dump)(struct kmsg_dumper *dumper, enum kmsg_dump_reason reason); | |||||
| enum kmsg_dump_reason max_reason; | |||||
| bool registered; | |||||
| }; | |||||
| static inline int | |||||
| kmsg_dump_register(struct kmsg_dumper *dumper) | |||||
| { | |||||
| pr_debug("TODO"); | |||||
| return (-EINVAL); | |||||
| } | |||||
| static inline int | |||||
| kmsg_dump_unregister(struct kmsg_dumper *dumper) | |||||
| { | |||||
| pr_debug("TODO"); | |||||
| return (-EINVAL); | |||||
| } | |||||
| #endif | |||||
Done Inline Actionsno defined() bz: no defined() | |||||
Done Inline ActionsCan we add pr_debug("TODO") to these two functions? bz: Can we add pr_debug("TODO") to these two functions? | |||||
Done Inline ActionsDone. dumbbell: Done. | |||||
Not needed anymore