Merge remote-tracking branch 'koba/reviewed'
This commit is contained in:
commit
6e965d8a18
|
@ -670,7 +670,6 @@ typedef enum {
|
|||
FLAG_DISABLEVIDMODE,
|
||||
FLAG_ALLOWNONLOCAL,
|
||||
FLAG_ALLOWMOUSEOPENFAIL,
|
||||
FLAG_VTSYSREQ,
|
||||
FLAG_SAVER_BLANKTIME,
|
||||
FLAG_DPMS_STANDBYTIME,
|
||||
FLAG_DPMS_SUSPENDTIME,
|
||||
|
@ -711,8 +710,6 @@ static OptionInfoRec FlagOptions[] = {
|
|||
{0}, FALSE },
|
||||
{ FLAG_ALLOWMOUSEOPENFAIL, "AllowMouseOpenFail", OPTV_BOOLEAN,
|
||||
{0}, FALSE },
|
||||
{ FLAG_VTSYSREQ, "VTSysReq", OPTV_BOOLEAN,
|
||||
{0}, FALSE },
|
||||
{ FLAG_SAVER_BLANKTIME, "BlankTime" , OPTV_INTEGER,
|
||||
{0}, FALSE },
|
||||
{ FLAG_DPMS_STANDBYTIME, "StandbyTime", OPTV_INTEGER,
|
||||
|
@ -850,16 +847,6 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
|
|||
if (xf86GetOptValBool(FlagOptions, FLAG_ALLOWMOUSEOPENFAIL, &value))
|
||||
xf86Info.allowMouseOpenFail = value;
|
||||
|
||||
if (xf86GetOptValBool(FlagOptions, FLAG_VTSYSREQ, &value)) {
|
||||
#ifdef USE_VT_SYSREQ
|
||||
xf86Info.vtSysreq = value;
|
||||
xf86Msg(X_CONFIG, "VTSysReq %s\n", value ? "enabled" : "disabled");
|
||||
#else
|
||||
if (value)
|
||||
xf86Msg(X_WARNING, "VTSysReq is not supported on this OS\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
xf86Info.pmFlag = TRUE;
|
||||
if (xf86GetOptValBool(FlagOptions, FLAG_NOPM, &value))
|
||||
xf86Info.pmFlag = !value;
|
||||
|
|
|
@ -96,7 +96,6 @@ InputInfoPtr xf86InputDevs = NULL;
|
|||
xf86InfoRec xf86Info = {
|
||||
.consoleFd = -1,
|
||||
.vtno = -1,
|
||||
.vtSysreq = FALSE,
|
||||
.lastEventTime = -1,
|
||||
.vtRequestsPending = FALSE,
|
||||
#ifdef sun
|
||||
|
@ -111,7 +110,6 @@ xf86InfoRec xf86Info = {
|
|||
.caughtSignal = FALSE,
|
||||
.currentScreen = NULL,
|
||||
#ifdef CSRG_BASED
|
||||
.screenFd = -1,
|
||||
.consType = -1,
|
||||
#endif
|
||||
.allowMouseOpenFail = FALSE,
|
||||
|
|
|
@ -57,7 +57,6 @@ typedef enum {
|
|||
typedef struct {
|
||||
int consoleFd;
|
||||
int vtno;
|
||||
Bool vtSysreq;
|
||||
|
||||
/* event handler part */
|
||||
int lastEventTime;
|
||||
|
@ -76,8 +75,6 @@ typedef struct {
|
|||
/* graphics part */
|
||||
ScreenPtr currentScreen;
|
||||
#if defined(CSRG_BASED) || defined(__FreeBSD_kernel__)
|
||||
int screenFd; /* fd for memory mapped access to
|
||||
* vga card */
|
||||
int consType; /* Which console driver? */
|
||||
#endif
|
||||
|
||||
|
|
|
@ -560,18 +560,6 @@ drivers to not report failure if the mouse device can't be opened/initialised.
|
|||
It has no effect on the evdev(__drivermansuffix__) or other drivers.
|
||||
Default: false.
|
||||
.TP 7
|
||||
.BI "Option \*qVTSysReq\*q \*q" boolean \*q
|
||||
enables the SYSV\-style VT switch sequence for non\-SYSV systems
|
||||
which support VT switching.
|
||||
This sequence is
|
||||
.B Alt\-SysRq
|
||||
followed by a function key
|
||||
.RB ( Fn ).
|
||||
This prevents the __xservername__ server trapping the
|
||||
keys used for the default VT switch sequence, which means that clients can
|
||||
access them.
|
||||
Default: off.
|
||||
.TP 7
|
||||
.BI "Option \*qBlankTime\*q \*q" time \*q
|
||||
sets the inactivity timeout for the
|
||||
.B blank
|
||||
|
|
|
@ -340,7 +340,7 @@ mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
|
|||
base = mmap(0, Size,
|
||||
(flags & VIDMEM_READONLY) ?
|
||||
PROT_READ : (PROT_READ | PROT_WRITE),
|
||||
MAP_FLAGS, xf86Info.screenFd,
|
||||
MAP_FLAGS, xf86Info.consoleFd,
|
||||
(unsigned long)Base + BUS_BASE);
|
||||
if (base == MAP_FAILED)
|
||||
{
|
||||
|
|
|
@ -213,7 +213,7 @@ mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
|
|||
base = mmap(0, Size,
|
||||
(flags & VIDMEM_READONLY) ?
|
||||
PROT_READ : (PROT_READ | PROT_WRITE),
|
||||
MAP_FLAGS, xf86Info.screenFd,
|
||||
MAP_FLAGS, xf86Info.consoleFd,
|
||||
(unsigned long)Base - 0xA0000);
|
||||
if (base == MAP_FAILED)
|
||||
{
|
||||
|
@ -306,7 +306,7 @@ checkMapInfo(Bool warn, int Region)
|
|||
|
||||
if(!memAccP->Checked)
|
||||
{
|
||||
if(ioctl(xf86Info.screenFd, memAccP->ioctl, &(memAccP->memInfo)) == -1)
|
||||
if(ioctl(xf86Info.consoleFd, memAccP->ioctl, &(memAccP->memInfo)) == -1)
|
||||
{
|
||||
if(warn)
|
||||
{
|
||||
|
@ -360,7 +360,7 @@ xf86MapInfoMap(struct memAccess *memInfoP, pointer Base, unsigned long Size)
|
|||
Size,
|
||||
PROT_READ | PROT_WRITE,
|
||||
MAP_SHARED,
|
||||
xf86Info.screenFd,
|
||||
xf86Info.consoleFd,
|
||||
(unsigned long)mapInfoP->u.map_info_mmap.map_offset))
|
||||
== (pointer)-1)
|
||||
{
|
||||
|
|
|
@ -37,10 +37,6 @@
|
|||
#include "xf86Priv.h"
|
||||
#include "xf86_OSlib.h"
|
||||
|
||||
#ifdef WSCONS_SUPPORT
|
||||
#define KBD_FD(i) ((i).kbdFd != -1 ? (i).kbdFd : (i).consoleFd)
|
||||
#endif
|
||||
|
||||
void
|
||||
xf86OSRingBell(int loudness, int pitch, int duration)
|
||||
{
|
||||
|
|
|
@ -41,7 +41,10 @@
|
|||
#include <errno.h>
|
||||
|
||||
static Bool KeepTty = FALSE;
|
||||
|
||||
#ifdef PCCONS_SUPPORT
|
||||
static int devConsoleFd = -1;
|
||||
#endif
|
||||
#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
|
||||
static int VTnum = -1;
|
||||
static int initialVT = -1;
|
||||
|
@ -207,11 +210,7 @@ xf86OpenConsole()
|
|||
"%s: No console driver found\n\tSupported drivers: %s\n\t%s",
|
||||
"xf86OpenConsole", cons_drivers, CHECK_DRIVER_MSG);
|
||||
}
|
||||
#if 0 /* stdin is already closed in OsInit() */
|
||||
fclose(stdin);
|
||||
#endif
|
||||
xf86Info.consoleFd = fd;
|
||||
xf86Info.screenFd = fd;
|
||||
|
||||
switch (xf86Info.consType)
|
||||
{
|
||||
|
@ -292,13 +291,13 @@ acquire_vt:
|
|||
{
|
||||
FatalError("xf86OpenConsole: VT_SETMODE VT_PROCESS failed");
|
||||
}
|
||||
#if !defined(USE_DEV_IO) && !defined(USE_I386_IOPL)
|
||||
#if !defined(__OpenBSD__) && !defined(USE_DEV_IO) && !defined(USE_I386_IOPL)
|
||||
if (ioctl(xf86Info.consoleFd, KDENABIO, 0) < 0)
|
||||
{
|
||||
FatalError("xf86OpenConsole: KDENABIO failed (%s)",
|
||||
strerror(errno));
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
if (ioctl(xf86Info.consoleFd, KDSETMODE, KD_GRAPHICS) < 0)
|
||||
{
|
||||
FatalError("xf86OpenConsole: KDSETMODE KD_GRAPHICS failed");
|
||||
|
@ -370,7 +369,6 @@ xf86OpenSyscons()
|
|||
int fd = -1;
|
||||
vtmode_t vtmode;
|
||||
char vtname[12];
|
||||
struct stat status;
|
||||
long syscons_version;
|
||||
MessageType from;
|
||||
|
||||
|
@ -423,20 +421,11 @@ xf86OpenSyscons()
|
|||
{
|
||||
/*
|
||||
* All VTs are in use. If initialVT was found, use it.
|
||||
* Otherwise, if stdin is a VT, use that one.
|
||||
* XXX stdin is already closed, so this won't work.
|
||||
*/
|
||||
if (initialVT != -1)
|
||||
{
|
||||
xf86Info.vtno = initialVT;
|
||||
}
|
||||
else if ((fstat(0, &status) >= 0)
|
||||
&& S_ISCHR(status.st_mode)
|
||||
&& (ioctl(0, VT_GETMODE, &vtmode) >= 0))
|
||||
{
|
||||
/* stdin is a VT */
|
||||
xf86Info.vtno = minor(status.st_rdev) + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (syscons_version >= 0x100)
|
||||
|
@ -457,11 +446,7 @@ xf86OpenSyscons()
|
|||
}
|
||||
|
||||
close(fd);
|
||||
#ifndef __OpenBSD__
|
||||
sprintf(vtname, "/dev/ttyv%01x", xf86Info.vtno - 1);
|
||||
#else
|
||||
sprintf(vtname, "/dev/ttyC%01x", xf86Info.vtno - 1);
|
||||
#endif
|
||||
if ((fd = open(vtname, SYSCONS_CONSOLE_MODE, 0)) < 0)
|
||||
{
|
||||
FatalError("xf86OpenSyscons: Cannot open %s (%s)",
|
||||
|
@ -506,7 +491,6 @@ xf86OpenPcvt()
|
|||
int fd = -1;
|
||||
vtmode_t vtmode;
|
||||
char vtname[12], *vtprefix;
|
||||
struct stat status;
|
||||
struct pcvtid pcvt_version;
|
||||
|
||||
#ifndef __OpenBSD__
|
||||
|
@ -552,20 +536,11 @@ xf86OpenPcvt()
|
|||
{
|
||||
/*
|
||||
* All VTs are in use. If initialVT was found, use it.
|
||||
* Otherwise, if stdin is a VT, use that one.
|
||||
* XXX stdin is already closed, so this won't work.
|
||||
*/
|
||||
if (initialVT != -1)
|
||||
{
|
||||
xf86Info.vtno = initialVT;
|
||||
}
|
||||
else if ((fstat(0, &status) >= 0)
|
||||
&& S_ISCHR(status.st_mode)
|
||||
&& (ioctl(0, VT_GETMODE, &vtmode) >= 0))
|
||||
{
|
||||
/* stdin is a VT */
|
||||
xf86Info.vtno = minor(status.st_rdev) + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalError("%s: Cannot find a free VT",
|
||||
|
@ -673,7 +648,7 @@ xf86CloseConsole()
|
|||
VT.mode = VT_AUTO;
|
||||
ioctl(xf86Info.consoleFd, VT_SETMODE, &VT); /* dflt vt handling */
|
||||
}
|
||||
#if !defined(OpenBSD) && !defined(USE_DEV_IO) && !defined(USE_I386_IOPL)
|
||||
#if !defined(__OpenBSD__) && !defined(USE_DEV_IO) && !defined(USE_I386_IOPL)
|
||||
if (ioctl(xf86Info.consoleFd, KDDISABIO, 0) < 0)
|
||||
{
|
||||
xf86FatalError("xf86CloseConsole: KDDISABIO failed (%s)",
|
||||
|
@ -688,25 +663,17 @@ xf86CloseConsole()
|
|||
case WSCONS:
|
||||
{
|
||||
int mode = WSDISPLAYIO_MODE_EMUL;
|
||||
ioctl(xf86Info.screenFd, WSDISPLAYIO_SMODE, &mode);
|
||||
ioctl(xf86Info.consoleFd, WSDISPLAYIO_SMODE, &mode);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
if (xf86Info.screenFd != xf86Info.consoleFd)
|
||||
{
|
||||
close(xf86Info.screenFd);
|
||||
close(xf86Info.consoleFd);
|
||||
if ((xf86Info.consoleFd = open("/dev/console",O_RDONLY,0)) <0)
|
||||
{
|
||||
xf86FatalError("xf86CloseConsole: Cannot open /dev/console (%s)",
|
||||
strerror(errno));
|
||||
}
|
||||
}
|
||||
close(xf86Info.consoleFd);
|
||||
#ifdef PCCONS_SUPPORT
|
||||
if (devConsoleFd >= 0)
|
||||
close(devConsoleFd);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -258,7 +258,7 @@ mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
|
|||
base = mmap(0, Size,
|
||||
(flags & VIDMEM_READONLY) ?
|
||||
PROT_READ : (PROT_READ | PROT_WRITE),
|
||||
MAP_FLAGS, xf86Info.screenFd,
|
||||
MAP_FLAGS, xf86Info.consoleFd,
|
||||
(unsigned long)Base - 0xA0000
|
||||
);
|
||||
if (base == MAP_FAILED)
|
||||
|
|
|
@ -73,7 +73,7 @@ volatile unsigned char *ioBase = MAP_FAILED;
|
|||
static pointer
|
||||
ppcMapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
|
||||
{
|
||||
int fd = xf86Info.screenFd;
|
||||
int fd = xf86Info.consoleFd;
|
||||
pointer base;
|
||||
#ifdef DEBUG
|
||||
xf86MsgVerb(X_INFO, 3, "mapVidMem %lx, %lx, fd = %d",
|
||||
|
@ -125,7 +125,7 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf,
|
|||
|
||||
Bool xf86EnableIO()
|
||||
{
|
||||
int fd = xf86Info.screenFd;
|
||||
int fd = xf86Info.consoleFd;
|
||||
|
||||
xf86MsgVerb(X_WARNING, 3, "xf86EnableIO %d\n", fd);
|
||||
if (ioBase == MAP_FAILED)
|
||||
|
|
|
@ -58,7 +58,7 @@ static pointer
|
|||
sparc64MapVidMem(int ScreenNum, unsigned long Base, unsigned long Size,
|
||||
int flags)
|
||||
{
|
||||
int fd = xf86Info.screenFd;
|
||||
int fd = xf86Info.consoleFd;
|
||||
pointer base;
|
||||
|
||||
#ifdef DEBUG
|
||||
|
|
|
@ -168,11 +168,6 @@
|
|||
# define POSIX_TTY
|
||||
# endif /* SVR4 */
|
||||
|
||||
|
||||
# if defined(sun) && defined(HAS_USL_VTS)
|
||||
# define USE_VT_SYSREQ
|
||||
# endif
|
||||
|
||||
#endif /* (SYSV || SVR4) */
|
||||
|
||||
/**************************************************************************/
|
||||
|
@ -207,7 +202,6 @@
|
|||
# define LDSMAP PIO_SCRNMAP
|
||||
# define LDNMAP LDSMAP
|
||||
# define CLEARDTR_SUPPORT
|
||||
# define USE_VT_SYSREQ
|
||||
# endif
|
||||
|
||||
# define POSIX_TTY
|
||||
|
@ -266,9 +260,6 @@
|
|||
# else /* __bsdi__ */
|
||||
# ifdef SYSCONS_SUPPORT
|
||||
# define COMPAT_SYSCONS
|
||||
# if defined(__NetBSD__) || defined(__OpenBSD__)
|
||||
# include <machine/console.h>
|
||||
# else
|
||||
# if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
|
||||
# if defined(__DragonFly__) || (__FreeBSD_kernel_version >= 410000)
|
||||
# include <sys/consio.h>
|
||||
|
@ -279,22 +270,15 @@
|
|||
# else
|
||||
# include <sys/console.h>
|
||||
# endif
|
||||
# endif
|
||||
# endif /* SYSCONS_SUPPORT */
|
||||
# if defined(PCVT_SUPPORT)
|
||||
# if defined(PCVT_SUPPORT) && !defined(__NetBSD__) && !defined(__OpenBSD__)
|
||||
# if !defined(SYSCONS_SUPPORT)
|
||||
/* no syscons, so include pcvt specific header file */
|
||||
# if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|
||||
# include <machine/pcvt_ioctl.h>
|
||||
# else
|
||||
# if defined(__NetBSD__) || defined(__OpenBSD__)
|
||||
# if !defined(WSCONS_SUPPORT)
|
||||
# include <machine/pcvt_ioctl.h>
|
||||
# endif /* WSCONS_SUPPORT */
|
||||
# else
|
||||
# include <sys/pcvt_ioctl.h>
|
||||
# endif /* __NetBSD__ */
|
||||
# endif /* __FreeBSD_kernel__ || __OpenBSD__ */
|
||||
# endif /* __FreeBSD_kernel__ */
|
||||
# else /* pcvt and syscons: hard-code the ID magic */
|
||||
# define VGAPCVTID _IOWR('V',113, struct pcvtid)
|
||||
struct pcvtid {
|
||||
|
@ -353,10 +337,6 @@
|
|||
|
||||
# define CLEARDTR_SUPPORT
|
||||
|
||||
# if defined(SYSCONS_SUPPORT) || defined(PCVT_SUPPORT) || defined(WSCONS_SUPPORT)
|
||||
# define USE_VT_SYSREQ
|
||||
# endif
|
||||
|
||||
#endif
|
||||
/* __FreeBSD_kernel__ || __NetBSD__ || __OpenBSD__ || __bsdi__ */
|
||||
|
||||
|
|
|
@ -207,8 +207,6 @@ typedef enum {
|
|||
XKBLAYOUT,
|
||||
XKBVARIANT,
|
||||
XKBOPTIONS,
|
||||
/* The next two have become ServerFlags options */
|
||||
VTSYSREQ,
|
||||
/* Obsolete keyboard tokens */
|
||||
SERVERNUM,
|
||||
LEFTALT,
|
||||
|
|
Loading…
Reference in New Issue
Block a user