diff options
author | joerg <joerg@FreeBSD.org> | 1997-09-14 19:01:01 +0000 |
---|---|---|
committer | joerg <joerg@FreeBSD.org> | 1997-09-14 19:01:01 +0000 |
commit | e7c3d728c1e204f878989ecf58b0052b331cc844 (patch) | |
tree | 4d4d0031ab7698121b32ff834bbe3dcf0692a43f | |
parent | 3c44379082c86657a96a59096b066cce137f6f2b (diff) | |
download | FreeBSD-src-e7c3d728c1e204f878989ecf58b0052b331cc844.zip FreeBSD-src-e7c3d728c1e204f878989ecf58b0052b331cc844.tar.gz |
Fix the broken VT_WAITACTIVE ioctl for the case where the third arg
was 0.
PR: 4164
Submitted by: Joe Traister <traister@mojozone.org>
While i was at it, also fixed a broken return value for the VT_RELDISP
ioctl, iff the third arg was legally VT_TRUE, but the destination
screen was in process mode so the actual switch had to be deferred.
This was breaking the ability to directly toggle between two X servers
running on two VTs, since the server getting the bogus error return
was running wild, and competing with the other one for the hardware.
(Sigh, this was a very long-standing bug.)
-rw-r--r-- | sys/i386/isa/pcvt/pcvt_ext.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/sys/i386/isa/pcvt/pcvt_ext.c b/sys/i386/isa/pcvt/pcvt_ext.c index da55be0..acf066a 100644 --- a/sys/i386/isa/pcvt/pcvt_ext.c +++ b/sys/i386/isa/pcvt/pcvt_ext.c @@ -2601,8 +2601,8 @@ usl_vt_ioctl(Dev_t dev, int cmd, caddr_t data, int flag, struct proc *p) if(pcvt_is_console) cons_unavail = 0; #endif - return 0; } + return 0; } break; @@ -2651,20 +2651,8 @@ usl_vt_ioctl(Dev_t dev, int cmd, caddr_t data, int flag, struct proc *p) return 0; if(i == -1) - { - /* xxx Is this what it is supposed to do? */ - int x = spltty(); - i = current_video_screen; - error = 0; - while (current_video_screen == i && - (error == 0 || error == ERESTART)) { - vs[i].vt_status |= VT_WAIT_ACT; - error = tsleep((caddr_t)&vs[i].smode, - PZERO | PCATCH, "waitvt", 0); - } - splx(x); - } - else + i = minor(dev); + { int x = spltty(); error = 0; |