From e1687d59312c742183a73d1af08079892fdf8b52 Mon Sep 17 00:00:00 2001 From: David Herrmann Date: Mon, 19 Nov 2012 13:00:38 +0100 Subject: [PATCH] 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 --- src/uterm_vt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/uterm_vt.c b/src/uterm_vt.c index 5a0f0a6..c3765ae 100644 --- a/src/uterm_vt.c +++ b/src/uterm_vt.c @@ -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)