Commit 290211fb authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

tty: Aligh tty_driver members

As done for other structures here in file.
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 19948472
...@@ -132,14 +132,14 @@ static DECLARE_BITMAP(tty_bitmap, (MAX_TTYS << 1)); ...@@ -132,14 +132,14 @@ static DECLARE_BITMAP(tty_bitmap, (MAX_TTYS << 1));
static DECLARE_BITMAP(tty_active_pairs, (MAX_TTYS << 1)); static DECLARE_BITMAP(tty_active_pairs, (MAX_TTYS << 1));
struct tty_driver { struct tty_driver {
int t; int t;
char *name; char *name;
int index; int index;
int img_type; int img_type;
unsigned flags; unsigned int flags;
int (*fd_get_index)(int fd, const struct fd_parms *); int (*fd_get_index)(int fd, const struct fd_parms *p);
int (*img_get_index)(struct tty_info *ti); int (*img_get_index)(struct tty_info *ti);
int (*open)(struct tty_info *ti); int (*open)(struct tty_info *ti);
}; };
#define TTY_PAIR 0x1 #define TTY_PAIR 0x1
...@@ -170,33 +170,33 @@ static int pty_get_index(struct tty_info *ti) ...@@ -170,33 +170,33 @@ static int pty_get_index(struct tty_info *ti)
static int pty_open_ptmx(struct tty_info *info); static int pty_open_ptmx(struct tty_info *info);
static struct tty_driver ptm_driver = { static struct tty_driver ptm_driver = {
.t = TTY_TYPE_PTM, .t = TTY_TYPE_PTM,
.flags = TTY_PAIR | TTY_MASTER, .flags = TTY_PAIR | TTY_MASTER,
.name = "ptmx", .name = "ptmx",
.img_type = TTY_TYPE__PTY, .img_type = TTY_TYPE__PTY,
.fd_get_index = ptm_fd_get_index, .fd_get_index = ptm_fd_get_index,
.img_get_index = pty_get_index, .img_get_index = pty_get_index,
.open = pty_open_ptmx, .open = pty_open_ptmx,
}; };
static int open_simple_tty(struct tty_info *info); static int open_simple_tty(struct tty_info *info);
static struct tty_driver console_driver = { static struct tty_driver console_driver = {
.t = TTY_TYPE_CONSOLE, .t = TTY_TYPE_CONSOLE,
.flags = TTY_MASTER, .flags = TTY_MASTER,
.name = "console", .name = "console",
.img_type = TTY_TYPE__CONSOLE, .img_type = TTY_TYPE__CONSOLE,
.index = CONSOLE_INDEX, .index = CONSOLE_INDEX,
.open = open_simple_tty, .open = open_simple_tty,
}; };
static struct tty_driver vt_driver = { static struct tty_driver vt_driver = {
.t = TTY_TYPE_VT, .t = TTY_TYPE_VT,
.flags = 0, .flags = 0,
.name = "vt", .name = "vt",
.img_type = TTY_TYPE__VT, .img_type = TTY_TYPE__VT,
.index = VT_INDEX, .index = VT_INDEX,
.open = open_simple_tty, .open = open_simple_tty,
}; };
static int pts_fd_get_index(int fd, const struct fd_parms *p) static int pts_fd_get_index(int fd, const struct fd_parms *p)
...@@ -220,13 +220,13 @@ static int pts_fd_get_index(int fd, const struct fd_parms *p) ...@@ -220,13 +220,13 @@ static int pts_fd_get_index(int fd, const struct fd_parms *p)
} }
static struct tty_driver pts_driver = { static struct tty_driver pts_driver = {
.t = TTY_TYPE_PTS, .t = TTY_TYPE_PTS,
.flags = TTY_PAIR, .flags = TTY_PAIR,
.name = "pts", .name = "pts",
.img_type = TTY_TYPE__PTY, .img_type = TTY_TYPE__PTY,
.fd_get_index = pts_fd_get_index, .fd_get_index = pts_fd_get_index,
.img_get_index = pty_get_index, .img_get_index = pty_get_index,
.open = pty_open_ptmx, .open = pty_open_ptmx,
}; };
struct tty_driver *get_tty_driver(int major, int minor) struct tty_driver *get_tty_driver(int major, int minor)
......
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