1
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_VTsw.c,v 3.6 1998/07/25 16:56:33 dawes Exp $ */
3
* Derived from VTsw_usl.c which is
4
* Copyright 1993 by David Wexelblat <dwex@goblin.org>
5
* by S_ren Schmidt (sos@login.dkuug.dk)
7
* Permission to use, copy, modify, distribute, and sell this software and its
8
* documentation for any purpose is hereby granted without fee, provided that
9
* the above copyright notice appear in all copies and that both that
10
* copyright notice and this permission notice appear in supporting
11
* documentation, and that the name of David Wexelblat not be used in
12
* advertising or publicity pertaining to distribution of the software without
13
* specific, written prior permission. David Wexelblat makes no representations
14
* about the suitability of this software for any purpose. It is provided
15
* "as is" without express or implied warranty.
17
* DAVID WEXELBLAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
18
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
19
* EVENT SHALL DAVID WEXELBLAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
20
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
21
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
22
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
23
* PERFORMANCE OF THIS SOFTWARE.
26
/* $XConsortium: bsd_VTsw.c /main/4 1996/02/21 17:50:57 kaleb $ */
31
#include "xf86_OSlib.h"
34
* Handle the VT-switching interface for OSs that use USL-style ioctl()s
35
* (the bsd, sysv, sco, and linux subdirs).
39
* This function is the signal handler for the VT-switching signal. It
40
* is only referenced inside the OS-support layer.
43
xf86VTRequest(int sig)
45
#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
46
if (xf86Info.consType == SYSCONS || xf86Info.consType == PCVT) {
47
xf86Info.vtRequestsPending = TRUE;
56
#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
57
if (xf86Info.consType == SYSCONS || xf86Info.consType == PCVT) {
58
return(xf86Info.vtRequestsPending ? TRUE : FALSE);
67
#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
68
if (xf86Info.consType == SYSCONS || xf86Info.consType == PCVT) {
69
xf86Info.vtRequestsPending = FALSE;
70
if (ioctl(xf86Info.consoleFd, VT_RELDISP, 1) < 0)
82
#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
83
if (xf86Info.consType == SYSCONS || xf86Info.consType == PCVT) {
84
xf86Info.vtRequestsPending = FALSE;
85
if (ioctl(xf86Info.consoleFd, VT_RELDISP, VT_ACKACQ) < 0)