aboutsummaryrefslogtreecommitdiff
path: root/sys/compat/linuxkpi/common/include/linux/kmsg_dump.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/compat/linuxkpi/common/include/linux/kmsg_dump.h')
-rw-r--r--sys/compat/linuxkpi/common/include/linux/kmsg_dump.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/sys/compat/linuxkpi/common/include/linux/kmsg_dump.h b/sys/compat/linuxkpi/common/include/linux/kmsg_dump.h
index 25f96b304f59..e7f95ced3047 100644
--- a/sys/compat/linuxkpi/common/include/linux/kmsg_dump.h
+++ b/sys/compat/linuxkpi/common/include/linux/kmsg_dump.h
@@ -25,13 +25,57 @@ enum kmsg_dump_reason {
KMSG_DUMP_MAX
};
+struct kmsg_dump_iter {
+ uint64_t cur_seq;
+ uint64_t next_seq;
+};
+
+struct kmsg_dump_detail {
+ enum kmsg_dump_reason reason;
+ const char *description;
+};
+
struct kmsg_dumper {
struct list_head list;
+#if defined(LINUXKPI_VERSION) && LINUXKPI_VERSION < 61200
void (*dump)(struct kmsg_dumper *dumper, enum kmsg_dump_reason reason);
+#else
+ void (*dump)(struct kmsg_dumper *dumper, struct kmsg_dump_detail *detail);
+#endif
enum kmsg_dump_reason max_reason;
bool registered;
};
+static inline void
+kmsg_dump(enum kmsg_dump_reason reason)
+{
+ pr_debug("TODO");
+}
+
+static inline bool
+kmsg_dump_get_line(struct kmsg_dump_iter *iter, bool syslog,
+ const char *line, size_t size, size_t *len)
+{
+ pr_debug("TODO");
+
+ return (false);
+}
+
+static inline bool
+kmsg_dump_get_buffer(struct kmsg_dump_iter *iter, bool syslog,
+ char *buf, size_t size, size_t *len)
+{
+ pr_debug("TODO");
+
+ return (false);
+}
+
+static inline void
+kmsg_dump_rewind(struct kmsg_dump_iter *iter)
+{
+ pr_debug("TODO");
+}
+
static inline int
kmsg_dump_register(struct kmsg_dumper *dumper)
{
@@ -48,4 +92,11 @@ kmsg_dump_unregister(struct kmsg_dumper *dumper)
return (-EINVAL);
}
+static inline const char *
+kmsg_dump_reason_str(enum kmsg_dump_reason reason)
+{
+ pr_debug("TODO");
+
+ return ("Unknown");
+}
#endif