uterm: vt: do nothing if target-VT is already active during deactivation

If we deactivate our VT and the target-VT is already active (probably
because we opened the _current_ VT during uterm-vt creation), we shouldn't
do anything but simply close the VT.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
David Herrmann 2012-11-19 13:00:38 +01:00
parent 75435623e1
commit e1687d5931

View File

@ -500,7 +500,7 @@ static int real_deactivate(struct uterm_vt *vt)
return -EFAULT;
}
if (vts.v_active != vt->real_num)
if (vts.v_active != vt->real_num || vts.v_active == vt->real_saved_num)
return 0;
if (!vt->active)