mirror of
https://github.com/X11Libre/xserver.git
synced 2026-09-26 21:12:25 +00:00
Sun bug 6872917: Xorg not querying /dev/fb when no xorg.conf exists
commit 48ee555833 (OpenSolaris VT support)
broke the autoconfiguration code in xf86AutoConfig.c that uses the
Solaris-specific VIS_GETIDENTIFIER ioctl on a frame buffer device like
/dev/fb by changing xf86Info.consoleFd from /dev/fb to a /dev/vt/*
device.
This fixes it by reworking the code to split the console device
(/dev/vt/*, the vtXX CLI option) from the frame buffer device
(/dev/fb, -dev option) to allow both VT and autoconfig to work.
It also fixes the console device to use /dev/fb when VT's are not
supported instead of throwing a Fatal Error because it can't open
/dev/vt/0.
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
This commit is contained in:
parent
d225230148
commit
2d34eace13
2 changed files with 33 additions and 12 deletions
|
|
@ -410,8 +410,25 @@ listPossibleVideoDrivers(char *matches[], int nmatches)
|
|||
if (xf86Info.consoleFd >= 0) {
|
||||
struct vis_identifier visid;
|
||||
const char *cp;
|
||||
extern char xf86SolarisFbDev[PATH_MAX];
|
||||
int iret;
|
||||
|
||||
if (ioctl(xf86Info.consoleFd, VIS_GETIDENTIFIER, &visid) >= 0) {
|
||||
SYSCALL(iret = ioctl(xf86Info.consoleFd, VIS_GETIDENTIFIER, &visid));
|
||||
if (iret < 0) {
|
||||
int fbfd;
|
||||
|
||||
fbfd = open(xf86SolarisFbDev, O_RDONLY);
|
||||
if (fbfd >= 0) {
|
||||
SYSCALL(iret = ioctl(fbfd, VIS_GETIDENTIFIER, &visid));
|
||||
close(fbfd);
|
||||
}
|
||||
}
|
||||
|
||||
if (iret < 0) {
|
||||
xf86Msg(X_WARNING,
|
||||
"could not get frame buffer identifier from %s\n",
|
||||
xf86SolarisFbDev);
|
||||
} else {
|
||||
xf86Msg(X_PROBED, "console driver: %s\n", visid.name);
|
||||
|
||||
/* Special case from before the general case was set */
|
||||
|
|
|
|||
Loading…
Reference in a new issue