Commit e9261d2d authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

tty: Assing special indeces for ext and serial ttys

They are zero and may clash one day.
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 1b8a5bf9
...@@ -143,6 +143,8 @@ static LIST_HEAD(all_ttys); ...@@ -143,6 +143,8 @@ static LIST_HEAD(all_ttys);
#define CONSOLE_INDEX 1002 #define CONSOLE_INDEX 1002
#define VT_INDEX 1004 #define VT_INDEX 1004
#define CTTY_INDEX 1006 #define CTTY_INDEX 1006
#define ETTY_INDEX 1008
#define STTY_INDEX 1010
#define INDEX_ERR (MAX_TTYS + 1) #define INDEX_ERR (MAX_TTYS + 1)
static DECLARE_BITMAP(tty_bitmap, (MAX_TTYS << 1)); static DECLARE_BITMAP(tty_bitmap, (MAX_TTYS << 1));
...@@ -221,12 +223,14 @@ static int open_ext_tty(struct tty_info *info); ...@@ -221,12 +223,14 @@ static int open_ext_tty(struct tty_info *info);
static struct tty_driver ext_driver = { static struct tty_driver ext_driver = {
.type = TTY_TYPE__EXT_TTY, .type = TTY_TYPE__EXT_TTY,
.name = "ext", .name = "ext",
.index = ETTY_INDEX,
.open = open_ext_tty, .open = open_ext_tty,
}; };
static struct tty_driver serial_driver = { static struct tty_driver serial_driver = {
.type = TTY_TYPE__SERIAL, .type = TTY_TYPE__SERIAL,
.name = "serial", .name = "serial",
.index = STTY_INDEX,
.open = open_simple_tty, .open = open_simple_tty,
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment