lkml.org 
[lkml]   [2020]   [Jun]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 09/38] vt: get rid of VT10.ID macros
Date
VT100ID is unused, but defined twice. Kill it.

VT102ID is used only in respond_ID. Define there a variable with proper
type and use that instead. Then drop both defines of VT102ID too.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
drivers/tty/vt/vt.c | 11 ++++-------
include/linux/console.h | 6 ------
2 files changed, 4 insertions(+), 13 deletions(-)

diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
index 49c9d1e4067c..8d9e532f050a 100644
--- a/drivers/tty/vt/vt.c
+++ b/drivers/tty/vt/vt.c
@@ -1397,12 +1397,6 @@ enum { EPecma = 0, EPdec, EPeq, EPgt, EPlt};
#define kbdapplic VC_APPLIC
#define lnm VC_CRLF

-/*
- * this is what the terminal answers to a ESC-Z or csi0c query.
- */
-#define VT100ID "\033[?1;2c"
-#define VT102ID "\033[?6c"
-
const unsigned char color_table[] = { 0, 4, 2, 6, 1, 5, 3, 7,
8,12,10,14, 9,13,11,15 };

@@ -1835,7 +1829,10 @@ static inline void status_report(struct tty_struct *tty)

static inline void respond_ID(struct tty_struct *tty)
{
- respond_string(VT102ID, strlen(VT102ID), tty->port);
+ /* terminal answer to an ESC-Z or csi0c query. */
+ static const char vt102_id[] = "\033[?6c";
+
+ respond_string(vt102_id, strlen(vt102_id), tty->port);
}

void mouse_report(struct tty_struct *tty, int butt, int mrx, int mry)
diff --git a/include/linux/console.h b/include/linux/console.h
index 964b67912b04..0670d3491e0e 100644
--- a/include/linux/console.h
+++ b/include/linux/console.h
@@ -24,12 +24,6 @@ struct module;
struct tty_struct;
struct notifier_block;

-/*
- * this is what the terminal answers to a ESC-Z or csi0c query.
- */
-#define VT100ID "\033[?1;2c"
-#define VT102ID "\033[?6c"
-
enum con_scroll {
SM_UP,
SM_DOWN,
--
2.27.0
\
 
 \ /
  Last update: 2020-06-15 09:52    [W:0.168 / U:1.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site