2 * Derived from VTsw_usl.c which is
3 * Copyright 1993 by David Wexelblat <dwex@goblin.org>
4 * by S_ren Schmidt (sos@login.dkuug.dk)
6 * Permission to use, copy, modify, distribute, and sell this software and its
7 * documentation for any purpose is hereby granted without fee, provided that
8 * the above copyright notice appear in all copies and that both that
9 * copyright notice and this permission notice appear in supporting
10 * documentation, and that the name of David Wexelblat not be used in
11 * advertising or publicity pertaining to distribution of the software without
12 * specific, written prior permission. David Wexelblat makes no representations
13 * about the suitability of this software for any purpose. It is provided
14 * "as is" without express or implied warranty.
16 * DAVID WEXELBLAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
17 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
18 * EVENT SHALL DAVID WEXELBLAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
19 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
20 * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
21 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
22 * PERFORMANCE OF THIS SOFTWARE.
26 #ifdef HAVE_XORG_CONFIG_H
27 #include <xorg-config.h>
33 #include "xf86_OSlib.h"
36 * Handle the VT-switching interface for OSs that use USL-style ioctl()s
37 * (the bsd, sysv, sco, and linux subdirs).
41 * This function is the signal handler for the VT-switching signal. It
42 * is only referenced inside the OS-support layer.
45 xf86VTRequest(int sig
)
47 #if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
48 if (xf86Info
.consType
== SYSCONS
|| xf86Info
.consType
== PCVT
) {
49 xf86Info
.vtRequestsPending
= TRUE
;
58 #if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
59 if (xf86Info
.consType
== SYSCONS
|| xf86Info
.consType
== PCVT
) {
60 return xf86Info
.vtRequestsPending
? TRUE
: FALSE
;
69 #if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
70 if (xf86Info
.consType
== SYSCONS
|| xf86Info
.consType
== PCVT
) {
71 xf86Info
.vtRequestsPending
= FALSE
;
72 if (ioctl(xf86Info
.consoleFd
, VT_RELDISP
, 1) < 0)
84 #if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
85 if (xf86Info
.consType
== SYSCONS
|| xf86Info
.consType
== PCVT
) {
86 xf86Info
.vtRequestsPending
= FALSE
;
87 if (ioctl(xf86Info
.consoleFd
, VT_RELDISP
, VT_ACKACQ
) < 0)
97 xf86VTActivate(int vtno
)
99 if (ioctl(xf86Info
.consoleFd
, VT_ACTIVATE
, vtno
) < 0) {