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

tty: Rename open_pty_reg to open_tty_reg

This is not pty specific routine but rather a common one.
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 25abdf3a
...@@ -463,7 +463,7 @@ static void pty_free_fake_reg(struct reg_file_info **r) ...@@ -463,7 +463,7 @@ static void pty_free_fake_reg(struct reg_file_info **r)
} }
} }
static int open_pty_reg(struct file_desc *reg_d, u32 flags) static int open_tty_reg(struct file_desc *reg_d, u32 flags)
{ {
return open_path(reg_d, do_open_reg_noseek_flags, &flags); return open_path(reg_d, do_open_reg_noseek_flags, &flags);
} }
...@@ -483,7 +483,7 @@ static int pty_open_ptmx_index(struct file_desc *d, int index, int flags) ...@@ -483,7 +483,7 @@ static int pty_open_ptmx_index(struct file_desc *d, int index, int flags)
mutex_lock(tty_mutex); mutex_lock(tty_mutex);
for (i = 0; i < ARRAY_SIZE(fds); i++) { for (i = 0; i < ARRAY_SIZE(fds); i++) {
fds[i] = open_pty_reg(d, flags); fds[i] = open_tty_reg(d, flags);
if (fds[i] < 0) { if (fds[i] < 0) {
pr_perror("Can't open %s", path_from_reg(d)); pr_perror("Can't open %s", path_from_reg(d));
break; break;
...@@ -599,7 +599,7 @@ static int tty_restore_ctl_terminal(struct file_desc *d, int fd) ...@@ -599,7 +599,7 @@ static int tty_restore_ctl_terminal(struct file_desc *d, int fd)
} else } else
slave_d = info->reg_d; slave_d = info->reg_d;
slave = open_pty_reg(slave_d, O_RDONLY); slave = open_tty_reg(slave_d, O_RDONLY);
if (slave < 0) { if (slave < 0) {
pr_perror("Can't open %s", path_from_reg(slave_d)); pr_perror("Can't open %s", path_from_reg(slave_d));
goto err; goto err;
...@@ -760,7 +760,7 @@ static int pty_open_slaves(struct tty_info *info) ...@@ -760,7 +760,7 @@ static int pty_open_slaves(struct tty_info *info)
list_for_each_entry(slave, &info->sibling, sibling) { list_for_each_entry(slave, &info->sibling, sibling) {
BUG_ON(tty_is_master(slave)); BUG_ON(tty_is_master(slave));
fd = open_pty_reg(slave->reg_d, slave->tfe->flags | O_NOCTTY); fd = open_tty_reg(slave->reg_d, slave->tfe->flags | O_NOCTTY);
if (fd < 0) { if (fd < 0) {
pr_perror("Can't open slave %s", path_from_reg(slave->reg_d)); pr_perror("Can't open slave %s", path_from_reg(slave->reg_d));
goto err; goto err;
...@@ -842,7 +842,7 @@ static int pty_open_unpaired_slave(struct file_desc *d, struct tty_info *slave) ...@@ -842,7 +842,7 @@ static int pty_open_unpaired_slave(struct file_desc *d, struct tty_info *slave)
unlock_pty(master); unlock_pty(master);
fd = open_pty_reg(slave->reg_d, slave->tfe->flags | O_NOCTTY); fd = open_tty_reg(slave->reg_d, slave->tfe->flags | O_NOCTTY);
if (fd < 0) { if (fd < 0) {
pr_perror("Can't open slave %s", path_from_reg(slave->reg_d)); pr_perror("Can't open slave %s", path_from_reg(slave->reg_d));
goto err; goto err;
...@@ -932,7 +932,7 @@ static int open_simple_tty(struct tty_info *info) ...@@ -932,7 +932,7 @@ static int open_simple_tty(struct tty_info *info)
{ {
int fd = -1; int fd = -1;
fd = open_pty_reg(info->reg_d, info->tfe->flags); fd = open_tty_reg(info->reg_d, info->tfe->flags);
if (fd < 0) { if (fd < 0) {
pr_perror("Can't open %s %x", pr_perror("Can't open %s %x",
info->driver->name, info->tfe->id); info->driver->name, info->tfe->id);
......
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