[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220924000454.3319186-16-john.ogness@linutronix.de>
Date: Sat, 24 Sep 2022 02:10:51 +0206
From: John Ogness <john.ogness@...utronix.de>
To: Petr Mladek <pmladek@...e.com>
Cc: Sergey Senozhatsky <senozhatsky@...omium.org>,
Steven Rostedt <rostedt@...dmis.org>,
Thomas Gleixner <tglx@...utronix.de>,
linux-kernel@...r.kernel.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: [PATCH printk 15/18] printk: Add struct cons_text_buf
From: Thomas Gleixner <tglx@...utronix.de>
Create a data structure to replace the open coded separate buffers for
regular and extended formatting.
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Signed-off-by: John Ogness <john.ogness@...utronix.de>
---
include/linux/console.h | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/include/linux/console.h b/include/linux/console.h
index 8ec24fe097d3..05c7325e98f9 100644
--- a/include/linux/console.h
+++ b/include/linux/console.h
@@ -173,6 +173,20 @@ enum cons_flags {
CON_EXTENDED = BIT(6),
};
+/**
+ * struct cons_text_buf - console output text buffer
+ * @ext_text: Buffer for extended log format text
+ * @dropped_text: Buffer for dropped text
+ * @text: Buffer for ringbuffer text
+ */
+struct cons_text_buf {
+ union {
+ char ext_text[CONSOLE_EXT_LOG_MAX];
+ char dropped_text[DROPPED_TEXT_MAX];
+ };
+ char text[CONSOLE_LOG_MAX];
+};
+
/**
* struct console - The console descriptor structure
* @name: The name of the console driver
--
2.30.2
Powered by blists - more mailing lists