uterm: vt: fix skipping real_activate() when being inactive
authorDavid Herrmann <dh.herrmann@googlemail.com>
Mon, 1 Oct 2012 11:54:08 +0000 (13:54 +0200)
committerDavid Herrmann <dh.herrmann@googlemail.com>
Mon, 1 Oct 2012 11:54:08 +0000 (13:54 +0200)
This is probably a copy&paste error from real_deactivate(). We should skip
real_activate() if we are _active_, not if we are _inactive_.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
src/uterm_vt.c

index 4ce4633..ec915be 100644 (file)
@@ -338,7 +338,7 @@ static int real_activate(struct uterm_vt *vt)
                return -EFAULT;
        }
 
-       if (vts.v_active != vt->real_num)
+       if (vts.v_active == vt->real_num)
                return 0;
 
        ret = ioctl(vt->real_fd, VT_ACTIVATE, vt->real_num);