From: Trevor Bourget <tgb.kernel@gmail.com>
To: jslaby@suse.com, gregkh@linuxfoundation.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] vt: configurable number of console devices
Date: Mon, 27 May 2019 21:31:17 -0700 [thread overview]
Message-ID: <20190528043117.169987-1-tgb.kernel@gmail.com> (raw)
Having 63 vt devices for embedded systems might be overkill,
so provide a configuration MAX_NR_CONSOLES to allow this
consumption to be reduced.
Signed-off-by: Trevor Bourget <tgb.kernel@gmail.com>
---
drivers/tty/Kconfig | 9 +++++++++
include/uapi/linux/vt.h | 4 ++++
2 files changed, 13 insertions(+)
diff --git a/drivers/tty/Kconfig b/drivers/tty/Kconfig
index 3b1d312bb175..98e21589f4af 100644
--- a/drivers/tty/Kconfig
+++ b/drivers/tty/Kconfig
@@ -42,6 +42,15 @@ config VT
If unsure, say Y, or else you won't be able to do much with your new
shiny Linux system :-)
+config MAX_NR_CONSOLES
+ int "Maximum number of consoles to permit"
+ depends on VT
+ range 1 63
+ default "63"
+ ---help---
+ The maximum number of consoles that can be used.
+ The default is 63.
+
config CONSOLE_TRANSLATIONS
depends on VT
default y
diff --git a/include/uapi/linux/vt.h b/include/uapi/linux/vt.h
index e9d39c48520a..3567dd239758 100644
--- a/include/uapi/linux/vt.h
+++ b/include/uapi/linux/vt.h
@@ -8,9 +8,13 @@
* resizing).
*/
#define MIN_NR_CONSOLES 1 /* must be at least 1 */
+#ifdef CONFIG_MAX_NR_CONSOLES
+#define MAX_NR_CONSOLES CONFIG_MAX_NR_CONSOLES
+#else
#define MAX_NR_CONSOLES 63 /* serial lines start at 64 */
/* Note: the ioctl VT_GETSTATE does not work for
consoles 16 and higher (since it returns a short) */
+#endif
/* 0x56 is 'V', to avoid collision with termios and kd */
--
2.22.0.rc1.257.g3120a18244-goog
next reply other threads:[~2019-05-28 4:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-28 4:31 Trevor Bourget [this message]
2019-05-29 11:03 ` [PATCH] vt: configurable number of console devices Jiri Slaby
2019-05-29 22:09 ` Trevor Bourget
2019-05-29 23:31 ` Theodore Ts'o
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190528043117.169987-1-tgb.kernel@gmail.com \
--to=tgb.kernel@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.