Commit 80a134a4 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

tty: Make sure we're opening unpaired pty

pty_open_unpaired_slave must be called for
pty peers only and it caused no problems so
far but better to be sure it's pty peer we're
restoring (there gonna be more drivers with
time).
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent e558d58a
...@@ -957,7 +957,7 @@ static int tty_open(struct file_desc *d) ...@@ -957,7 +957,7 @@ static int tty_open(struct file_desc *d)
if (!info->create) if (!info->create)
return receive_tty(info); return receive_tty(info);
if (!tty_is_master(info)) if (is_pty(info->driver) && !tty_is_master(info))
return pty_open_unpaired_slave(d, info); return pty_open_unpaired_slave(d, info);
return info->driver->open(info); return info->driver->open(info);
......
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