Hello,
I'm trying out 2.6.0-test9-ruby, and I noticed that XFree86 tries to comes
up on the last used vc (vt06) instead of the first unused vc (vt07). I
think that there is an off by one error in the VT_OPENQRY ioctl and that
the patch below is appropriate. I've included the full text of the
VT_OPENQRY ioctl, since I'm not sure if I understand everything fully.
Thanks,
Wayne
--- linux-2.6.0-test9-ruby/drivers/char/vt_ioctl.c~ 2003-10-02 04:25:00.000000000 -0700
+++ linux-2.6.0-test9-ruby/drivers/char/vt_ioctl.c 2003-11-11 12:33:50.000000000 -0800
@@ -1020,21 +1020,21 @@
case VT_OPENQRY:
{
int j = vc->display_fg->first_vc;
for (i = 0; i < vc->display_fg->vc_count; ++i, j++) {
struct vc_data *tmp = find_vc(j);
if (!tmp || (tmp && !VT_IS_IN_USE(tmp)))
break;
}
- ucval = i < vc->display_fg->vc_count ? (j) : -1;
+ ucval = i < vc->display_fg->vc_count ? (j+1) : -1;
goto setint;
}
/*
* ioctl(fd, VT_ACTIVATE, num) will cause us to switch to vt # num,
* unless we attempt to switch to the visible VT, just
* to preserve sanity).
*/
case VT_ACTIVATE:
{
struct vc_data *tmp;
|