bsd: drop PCCONS support
The old PCCONS driver only seems to be used on minimal install disks and cannot coexist with newer ones (at least that's the feedback I've gotten from BSD community), so there's probably no practical use case for supporting it in Xorg anymore. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
parent
bef80a0db9
commit
eb95982b2a
|
@ -46,19 +46,7 @@ xf86OSRingBell(int loudness, int pitch, int duration)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (loudness && pitch) {
|
if (loudness && pitch) {
|
||||||
#ifdef PCCONS_SUPPORT
|
|
||||||
int data[2];
|
|
||||||
#endif
|
|
||||||
|
|
||||||
switch (xf86Info.consType) {
|
switch (xf86Info.consType) {
|
||||||
|
|
||||||
#ifdef PCCONS_SUPPORT
|
|
||||||
case PCCONS:
|
|
||||||
data[0] = pitch;
|
|
||||||
data[1] = (duration * loudness) / 50;
|
|
||||||
ioctl(xf86Info.consoleFd, CONSOLE_X_BELL, data);
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
|
#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
|
||||||
case SYSCONS:
|
case SYSCONS:
|
||||||
case PCVT:
|
case PCVT:
|
||||||
|
|
|
@ -45,31 +45,13 @@
|
||||||
|
|
||||||
#include "os/osdep.h"
|
#include "os/osdep.h"
|
||||||
|
|
||||||
#ifndef CONSOLE_X_MODE_ON
|
|
||||||
#define CONSOLE_X_MODE_ON _IO('t',121)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef CONSOLE_X_MODE_OFF
|
|
||||||
#define CONSOLE_X_MODE_OFF _IO('t',122)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static Bool KeepTty = FALSE;
|
static Bool KeepTty = FALSE;
|
||||||
|
|
||||||
#ifdef PCCONS_SUPPORT
|
|
||||||
static int devConsoleFd = -1;
|
|
||||||
#endif
|
|
||||||
#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
|
#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
|
||||||
static int VTnum = -1;
|
static int VTnum = -1;
|
||||||
static int initialVT = -1;
|
static int initialVT = -1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PCCONS_SUPPORT
|
|
||||||
/* Stock 0.1 386bsd pccons console driver interface */
|
|
||||||
#define PCCONS_CONSOLE_DEV1 "/dev/ttyv0"
|
|
||||||
#define PCCONS_CONSOLE_DEV2 "/dev/vga"
|
|
||||||
#define PCCONS_CONSOLE_MODE O_RDWR|O_NDELAY
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef SYSCONS_SUPPORT
|
#ifdef SYSCONS_SUPPORT
|
||||||
/* The FreeBSD 1.1 version syscons driver uses /dev/ttyv0 */
|
/* The FreeBSD 1.1 version syscons driver uses /dev/ttyv0 */
|
||||||
#define SYSCONS_CONSOLE_DEV1 "/dev/ttyv0"
|
#define SYSCONS_CONSOLE_DEV1 "/dev/ttyv0"
|
||||||
|
@ -100,9 +82,6 @@ static int initialVT = -1;
|
||||||
"Check your kernel's console driver configuration and /dev entries"
|
"Check your kernel's console driver configuration and /dev entries"
|
||||||
|
|
||||||
static const char *supported_drivers[] = {
|
static const char *supported_drivers[] = {
|
||||||
#ifdef PCCONS_SUPPORT
|
|
||||||
"pccons (with X support)",
|
|
||||||
#endif
|
|
||||||
#ifdef SYSCONS_SUPPORT
|
#ifdef SYSCONS_SUPPORT
|
||||||
"syscons",
|
"syscons",
|
||||||
#endif
|
#endif
|
||||||
|
@ -124,10 +103,6 @@ static const char *supported_drivers[] = {
|
||||||
|
|
||||||
typedef int (*xf86ConsOpen_t) (void);
|
typedef int (*xf86ConsOpen_t) (void);
|
||||||
|
|
||||||
#ifdef PCCONS_SUPPORT
|
|
||||||
static int xf86OpenPccons(void);
|
|
||||||
#endif /* PCCONS_SUPPORT */
|
|
||||||
|
|
||||||
#ifdef SYSCONS_SUPPORT
|
#ifdef SYSCONS_SUPPORT
|
||||||
static int xf86OpenSyscons(void);
|
static int xf86OpenSyscons(void);
|
||||||
#endif /* SYSCONS_SUPPORT */
|
#endif /* SYSCONS_SUPPORT */
|
||||||
|
@ -153,9 +128,6 @@ static xf86ConsOpen_t xf86ConsTab[] = {
|
||||||
#ifdef SYSCONS_SUPPORT
|
#ifdef SYSCONS_SUPPORT
|
||||||
xf86OpenSyscons,
|
xf86OpenSyscons,
|
||||||
#endif
|
#endif
|
||||||
#ifdef PCCONS_SUPPORT
|
|
||||||
xf86OpenPccons,
|
|
||||||
#endif
|
|
||||||
#ifdef WSCONS_SUPPORT
|
#ifdef WSCONS_SUPPORT
|
||||||
xf86OpenWScons,
|
xf86OpenWScons,
|
||||||
#endif
|
#endif
|
||||||
|
@ -218,24 +190,6 @@ xf86OpenConsole(void)
|
||||||
xf86Info.consoleFd = fd;
|
xf86Info.consoleFd = fd;
|
||||||
|
|
||||||
switch (xf86Info.consType) {
|
switch (xf86Info.consType) {
|
||||||
#ifdef PCCONS_SUPPORT
|
|
||||||
case PCCONS:
|
|
||||||
if (ioctl(xf86Info.consoleFd, CONSOLE_X_MODE_ON, 0) < 0) {
|
|
||||||
FatalError("%s: CONSOLE_X_MODE_ON failed (%s)\n%s",
|
|
||||||
"xf86OpenConsole", strerror(errno),
|
|
||||||
CHECK_DRIVER_MSG);
|
|
||||||
}
|
|
||||||
/*
|
|
||||||
* Hack to prevent keyboard hanging when syslogd closes
|
|
||||||
* /dev/console
|
|
||||||
*/
|
|
||||||
if ((devConsoleFd = open("/dev/console", O_WRONLY, 0)) < 0) {
|
|
||||||
LogMessageVerb(X_WARNING, 1,
|
|
||||||
"xf86OpenConsole: couldn't open /dev/console (%s)\n",
|
|
||||||
strerror(errno));
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
|
#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
|
||||||
case SYSCONS:
|
case SYSCONS:
|
||||||
/* as of FreeBSD 2.2.8, syscons driver does not need the #1 vt
|
/* as of FreeBSD 2.2.8, syscons driver does not need the #1 vt
|
||||||
|
@ -329,31 +283,6 @@ xf86OpenConsole(void)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef PCCONS_SUPPORT
|
|
||||||
|
|
||||||
static int
|
|
||||||
xf86OpenPccons(void)
|
|
||||||
{
|
|
||||||
int fd = -1;
|
|
||||||
|
|
||||||
if ((fd = open(PCCONS_CONSOLE_DEV1, PCCONS_CONSOLE_MODE, 0))
|
|
||||||
>= 0 || (fd = open(PCCONS_CONSOLE_DEV2, PCCONS_CONSOLE_MODE, 0))
|
|
||||||
>= 0) {
|
|
||||||
if (ioctl(fd, CONSOLE_X_MODE_OFF, 0) < 0) {
|
|
||||||
FatalError("%s: CONSOLE_X_MODE_OFF failed (%s)\n%s\n%s",
|
|
||||||
"xf86OpenPccons",
|
|
||||||
strerror(errno),
|
|
||||||
"Was expecting pccons driver with X support",
|
|
||||||
CHECK_DRIVER_MSG);
|
|
||||||
}
|
|
||||||
xf86Info.consType = PCCONS;
|
|
||||||
LogMessageVerb(X_PROBED, 1, "Using pccons driver with X support\n");
|
|
||||||
}
|
|
||||||
return fd;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* PCCONS_SUPPORT */
|
|
||||||
|
|
||||||
#ifdef SYSCONS_SUPPORT
|
#ifdef SYSCONS_SUPPORT
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
@ -617,11 +546,6 @@ xf86CloseConsole(void)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch (xf86Info.consType) {
|
switch (xf86Info.consType) {
|
||||||
#ifdef PCCONS_SUPPORT
|
|
||||||
case PCCONS:
|
|
||||||
ioctl(xf86Info.consoleFd, CONSOLE_X_MODE_OFF, 0);
|
|
||||||
break;
|
|
||||||
#endif /* PCCONS_SUPPORT */
|
|
||||||
#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
|
#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
|
||||||
case SYSCONS:
|
case SYSCONS:
|
||||||
case PCVT:
|
case PCVT:
|
||||||
|
@ -652,10 +576,6 @@ xf86CloseConsole(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
close(xf86Info.consoleFd);
|
close(xf86Info.consoleFd);
|
||||||
#ifdef PCCONS_SUPPORT
|
|
||||||
if (devConsoleFd >= 0)
|
|
||||||
close(devConsoleFd);
|
|
||||||
#endif
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -42,14 +42,6 @@
|
||||||
|
|
||||||
#include "xf86_bsd_priv.h"
|
#include "xf86_bsd_priv.h"
|
||||||
|
|
||||||
#ifndef CONSOLE_X_TV_ON
|
|
||||||
#define CONSOLE_X_TV_ON _IOW('t',155,int)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef CONSOLE_X_TV_OFF
|
|
||||||
#define CONSOLE_X_TV_OFF _IO('t',156)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __OpenBSD__
|
#ifdef __OpenBSD__
|
||||||
#define SYSCTL_MSG "\tCheck that you have set 'machdep.allowaperture=1'\n"\
|
#define SYSCTL_MSG "\tCheck that you have set 'machdep.allowaperture=1'\n"\
|
||||||
"\tin /etc/sysctl.conf and reboot your machine\n" \
|
"\tin /etc/sysctl.conf and reboot your machine\n" \
|
||||||
|
@ -285,18 +277,6 @@ void
|
||||||
xf86SetTVOut(int mode)
|
xf86SetTVOut(int mode)
|
||||||
{
|
{
|
||||||
switch (xf86Info.consType) {
|
switch (xf86Info.consType) {
|
||||||
#ifdef PCCONS_SUPPORT
|
|
||||||
case PCCONS:{
|
|
||||||
|
|
||||||
if (ioctl(xf86Info.consoleFd, CONSOLE_X_TV_ON, &mode) < 0) {
|
|
||||||
LogMessageVerb(X_WARNING, 1,
|
|
||||||
"xf86SetTVOut: Could not set console to TV output, %s\n",
|
|
||||||
strerror(errno));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
#endif /* PCCONS_SUPPORT */
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
FatalError("Xf86SetTVOut: Unsupported console");
|
FatalError("Xf86SetTVOut: Unsupported console");
|
||||||
break;
|
break;
|
||||||
|
@ -308,18 +288,6 @@ void
|
||||||
xf86SetRGBOut(void)
|
xf86SetRGBOut(void)
|
||||||
{
|
{
|
||||||
switch (xf86Info.consType) {
|
switch (xf86Info.consType) {
|
||||||
#ifdef PCCONS_SUPPORT
|
|
||||||
case PCCONS:{
|
|
||||||
|
|
||||||
if (ioctl(xf86Info.consoleFd, CONSOLE_X_TV_OFF, 0) < 0) {
|
|
||||||
LogMessageVerb(X_WARNING, 1,
|
|
||||||
"xf86SetTVOut: Could not set console to RGB output, %s\n",
|
|
||||||
strerror(errno));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
#endif /* PCCONS_SUPPORT */
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
FatalError("Xf86SetTVOut: Unsupported console");
|
FatalError("Xf86SetTVOut: Unsupported console");
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -283,21 +283,18 @@ defines_svr4 = '''#if !defined(SVR4) && !defined(__svr4__) && !defined(__SVR4)
|
||||||
'''
|
'''
|
||||||
|
|
||||||
# BSD specifics
|
# BSD specifics
|
||||||
supports_pccons = false
|
|
||||||
supports_pcvt = false
|
supports_pcvt = false
|
||||||
supports_syscons = false
|
supports_syscons = false
|
||||||
supports_wscons = false
|
supports_wscons = false
|
||||||
csrg_based = false
|
csrg_based = false
|
||||||
|
|
||||||
if host_machine.system() == 'freebsd' or host_machine.system() == 'dragonfly'
|
if host_machine.system() == 'freebsd' or host_machine.system() == 'dragonfly'
|
||||||
supports_pccons = true
|
|
||||||
supports_pcvt = true
|
supports_pcvt = true
|
||||||
supports_syscons = true
|
supports_syscons = true
|
||||||
csrg_based = true
|
csrg_based = true
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if host_machine.system() == 'kfreebsd'
|
if host_machine.system() == 'kfreebsd'
|
||||||
supports_pccons = true
|
|
||||||
supports_pcvt = true
|
supports_pcvt = true
|
||||||
supports_syscons = true
|
supports_syscons = true
|
||||||
endif
|
endif
|
||||||
|
@ -325,7 +322,6 @@ conf_data.set_quoted('XCONFIGFILE', 'xorg.conf')
|
||||||
conf_data.set_quoted('__XSERVERNAME__', 'Xorg')
|
conf_data.set_quoted('__XSERVERNAME__', 'Xorg')
|
||||||
conf_data.set('WITH_VGAHW', build_vgahw ? '1' : false)
|
conf_data.set('WITH_VGAHW', build_vgahw ? '1' : false)
|
||||||
conf_data.set('CSRG_BASED', csrg_based ? '1' : false)
|
conf_data.set('CSRG_BASED', csrg_based ? '1' : false)
|
||||||
conf_data.set('PCCONS_SUPPORT', supports_pccons ? '1' : false)
|
|
||||||
conf_data.set('PCVT_SUPPORT', supports_pcvt ? '1' : false)
|
conf_data.set('PCVT_SUPPORT', supports_pcvt ? '1' : false)
|
||||||
conf_data.set('SYSCONS_SUPPORT', supports_syscons ? '1' : false)
|
conf_data.set('SYSCONS_SUPPORT', supports_syscons ? '1' : false)
|
||||||
conf_data.set('WSCONS_SUPPORT', supports_wscons ? '1' : false)
|
conf_data.set('WSCONS_SUPPORT', supports_wscons ? '1' : false)
|
||||||
|
|
|
@ -94,9 +94,6 @@
|
||||||
/* System is BSD-like */
|
/* System is BSD-like */
|
||||||
#mesondefine CSRG_BASED
|
#mesondefine CSRG_BASED
|
||||||
|
|
||||||
/* System has PC console */
|
|
||||||
#mesondefine PCCONS_SUPPORT
|
|
||||||
|
|
||||||
/* System has PCVT console */
|
/* System has PCVT console */
|
||||||
#mesondefine PCVT_SUPPORT
|
#mesondefine PCVT_SUPPORT
|
||||||
|
|
||||||
|
|
|
@ -171,9 +171,6 @@
|
||||||
/* System is BSD-like */
|
/* System is BSD-like */
|
||||||
#mesondefine CSRG_BASED
|
#mesondefine CSRG_BASED
|
||||||
|
|
||||||
/* System has PC console */
|
|
||||||
#mesondefine PCCONS_SUPPORT
|
|
||||||
|
|
||||||
/* System has PCVT console */
|
/* System has PCVT console */
|
||||||
#mesondefine PCVT_SUPPORT
|
#mesondefine PCVT_SUPPORT
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue