2003-11-14 17:48:57 +01:00
|
|
|
/*
|
|
|
|
* Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany
|
|
|
|
* Copyright 1993 by David Wexelblat <dwex@goblin.org>
|
|
|
|
* Copyright 1999 by David Holland <davidh@iquest.net>
|
|
|
|
*
|
|
|
|
* Permission to use, copy, modify, distribute, and sell this software and its
|
|
|
|
* documentation for any purpose is hereby granted without fee, provided that
|
|
|
|
* the above copyright notice appear in all copies and that both that copyright
|
|
|
|
* notice and this permission notice appear in supporting documentation, and
|
|
|
|
* that the names of the copyright holders not be used in advertising or
|
|
|
|
* publicity pertaining to distribution of the software without specific,
|
|
|
|
* written prior permission. The copyright holders make no representations
|
|
|
|
* about the suitability of this software for any purpose. It is provided "as
|
|
|
|
* is" without express or implied warranty.
|
|
|
|
*
|
|
|
|
* THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
|
|
|
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, AND IN NO
|
|
|
|
* EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
|
|
|
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
|
|
|
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
|
|
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
|
|
|
* OF THIS SOFTWARE.
|
|
|
|
*/
|
|
|
|
|
2005-07-03 09:02:09 +02:00
|
|
|
#ifdef HAVE_XORG_CONFIG_H
|
|
|
|
#include <xorg-config.h>
|
|
|
|
#endif
|
|
|
|
|
2003-11-14 17:48:57 +01:00
|
|
|
#include "xf86.h"
|
|
|
|
#include "xf86Priv.h"
|
|
|
|
#include "xf86_OSlib.h"
|
2008-08-22 19:14:11 +02:00
|
|
|
#ifdef HAVE_SYS_KD_H
|
2005-05-21 09:46:38 +02:00
|
|
|
# include <sys/kd.h>
|
|
|
|
#endif
|
2003-11-14 17:48:57 +01:00
|
|
|
|
|
|
|
static Bool KeepTty = FALSE;
|
|
|
|
static Bool Protect0 = FALSE;
|
|
|
|
#ifdef HAS_USL_VTS
|
|
|
|
static int VTnum = -1;
|
|
|
|
static int xf86StartVT = -1;
|
2009-08-04 08:21:39 +02:00
|
|
|
static int vtEnabled = 0;
|
2009-12-15 02:55:46 +01:00
|
|
|
extern void xf86VTAcquire(int);
|
|
|
|
extern void xf86VTRelease(int);
|
2009-08-04 08:21:39 +02:00
|
|
|
#endif
|
2003-11-14 17:48:57 +01:00
|
|
|
|
2009-08-19 05:11:23 +02:00
|
|
|
/* Device to open as xf86Info.consoleFd */
|
|
|
|
static char consoleDev[PATH_MAX] = "/dev/fb";
|
|
|
|
|
|
|
|
/* Set by -dev argument on CLI
|
|
|
|
Used by hw/xfree86/common/xf86AutoConfig.c for VIS_GETIDENTIFIER */
|
|
|
|
_X_HIDDEN char xf86SolarisFbDev[PATH_MAX] = "/dev/fb";
|
|
|
|
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
void
|
2003-11-14 17:48:57 +01:00
|
|
|
xf86OpenConsole(void)
|
|
|
|
{
|
2008-11-25 05:32:20 +01:00
|
|
|
int i;
|
2003-11-14 17:48:57 +01:00
|
|
|
#ifdef HAS_USL_VTS
|
2008-11-25 05:32:20 +01:00
|
|
|
int fd;
|
2003-11-14 17:48:57 +01:00
|
|
|
struct vt_mode VT;
|
|
|
|
struct vt_stat vtinfo;
|
|
|
|
int FreeVTslot;
|
|
|
|
MessageType from = X_PROBED;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
if (serverGeneration == 1)
|
|
|
|
{
|
|
|
|
/* Check if we're run with euid==0 */
|
|
|
|
if (geteuid() != 0)
|
|
|
|
FatalError("xf86OpenConsole: Server must be suid root\n");
|
|
|
|
|
|
|
|
/* Protect page 0 to help find NULL dereferencing */
|
|
|
|
/* mprotect() doesn't seem to work */
|
|
|
|
if (Protect0)
|
|
|
|
{
|
|
|
|
int fd = -1;
|
|
|
|
|
|
|
|
if ((fd = open("/dev/zero", O_RDONLY, 0)) < 0)
|
|
|
|
{
|
|
|
|
xf86Msg(X_WARNING,
|
|
|
|
"xf86OpenConsole: cannot open /dev/zero (%s)\n",
|
|
|
|
strerror(errno));
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if ((int)mmap(0, 0x1000, PROT_NONE,
|
|
|
|
MAP_FIXED | MAP_SHARED, fd, 0) == -1)
|
|
|
|
xf86Msg(X_WARNING,
|
|
|
|
"xf86OpenConsole: failed to protect page 0 (%s)\n",
|
|
|
|
strerror(errno));
|
|
|
|
|
|
|
|
close(fd);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#ifdef HAS_USL_VTS
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Setup the virtual terminal manager
|
|
|
|
*/
|
2009-08-04 08:21:39 +02:00
|
|
|
if ((fd = open("/dev/vt/0",O_RDWR,0)) == -1)
|
2003-11-14 17:48:57 +01:00
|
|
|
{
|
2009-08-04 08:21:39 +02:00
|
|
|
xf86ErrorF("xf86OpenConsole: Cannot open /dev/vt/0 (%s)\n",
|
|
|
|
strerror(errno));
|
|
|
|
vtEnabled = 0;
|
2003-11-14 17:48:57 +01:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2009-08-04 08:21:39 +02:00
|
|
|
if (ioctl(fd, VT_ENABLED, &vtEnabled) < 0)
|
|
|
|
{
|
|
|
|
xf86ErrorF("xf86OpenConsole: VT_ENABLED failed (%s)\n",
|
|
|
|
strerror(errno));
|
|
|
|
vtEnabled = 0;
|
|
|
|
}
|
|
|
|
}
|
2003-11-14 17:48:57 +01:00
|
|
|
|
2009-08-04 08:21:39 +02:00
|
|
|
|
|
|
|
if (vtEnabled == 0)
|
|
|
|
{
|
|
|
|
/* VT not enabled - kernel too old or Sparc platforms
|
|
|
|
without visual_io support */
|
|
|
|
xf86Msg(from, "VT infrastructure is not available\n");
|
|
|
|
|
|
|
|
xf86StartVT = 0;
|
|
|
|
xf86Info.vtno = 0;
|
2009-08-19 05:11:23 +02:00
|
|
|
strlcpy(consoleDev, xf86SolarisFbDev, sizeof(consoleDev));
|
2009-08-04 08:21:39 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2003-11-14 17:48:57 +01:00
|
|
|
if (ioctl(fd, VT_GETSTATE, &vtinfo) < 0)
|
|
|
|
FatalError("xf86OpenConsole: Cannot determine current VT\n");
|
|
|
|
|
|
|
|
xf86StartVT = vtinfo.v_active;
|
|
|
|
|
2009-08-04 08:21:39 +02:00
|
|
|
if (VTnum != -1)
|
|
|
|
{
|
|
|
|
xf86Info.vtno = VTnum;
|
|
|
|
from = X_CMDLINE;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if ((ioctl(fd, VT_OPENQRY, &xf86Info.vtno) < 0) ||
|
2009-12-15 02:55:46 +01:00
|
|
|
(xf86Info.vtno == -1))
|
|
|
|
{
|
2009-08-04 08:21:39 +02:00
|
|
|
FatalError("xf86OpenConsole: Cannot find a free VT\n");
|
|
|
|
}
|
|
|
|
}
|
2003-11-14 17:48:57 +01:00
|
|
|
|
2009-08-04 08:21:39 +02:00
|
|
|
xf86Msg(from, "using VT number %d\n\n", xf86Info.vtno);
|
2009-08-19 05:11:23 +02:00
|
|
|
snprintf(consoleDev, PATH_MAX, "/dev/vt/%d", xf86Info.vtno);
|
2009-08-04 08:21:39 +02:00
|
|
|
}
|
2003-11-14 17:48:57 +01:00
|
|
|
|
2009-12-15 02:55:46 +01:00
|
|
|
if (fd != -1)
|
|
|
|
{
|
2003-11-14 17:48:57 +01:00
|
|
|
close(fd);
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* HAS_USL_VTS */
|
|
|
|
|
|
|
|
if (!KeepTty)
|
|
|
|
setpgrp();
|
|
|
|
|
2009-08-19 05:11:23 +02:00
|
|
|
if (((xf86Info.consoleFd = open(consoleDev, O_RDWR | O_NDELAY, 0)) < 0))
|
2003-11-14 17:48:57 +01:00
|
|
|
FatalError("xf86OpenConsole: Cannot open %s (%s)\n",
|
2009-08-19 05:11:23 +02:00
|
|
|
consoleDev, strerror(errno));
|
2003-11-14 17:48:57 +01:00
|
|
|
|
|
|
|
#ifdef HAS_USL_VTS
|
|
|
|
|
|
|
|
/* Change ownership of the vt */
|
2009-08-19 05:11:23 +02:00
|
|
|
chown(consoleDev, getuid(), getgid());
|
2003-11-14 17:48:57 +01:00
|
|
|
|
2009-08-04 08:21:39 +02:00
|
|
|
if (vtEnabled)
|
|
|
|
{
|
|
|
|
/*
|
|
|
|
* Now get the VT
|
|
|
|
*/
|
|
|
|
if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno) != 0)
|
|
|
|
xf86Msg(X_WARNING, "xf86OpenConsole: VT_ACTIVATE failed\n");
|
|
|
|
|
|
|
|
if (ioctl(xf86Info.consoleFd, VT_WAITACTIVE, xf86Info.vtno) != 0)
|
|
|
|
xf86Msg(X_WARNING, "xf86OpenConsole: VT_WAITACTIVE failed\n");
|
2003-11-14 17:48:57 +01:00
|
|
|
|
2009-08-04 08:21:39 +02:00
|
|
|
if (ioctl(xf86Info.consoleFd, VT_GETMODE, &VT) < 0)
|
|
|
|
FatalError("xf86OpenConsole: VT_GETMODE failed\n");
|
2003-11-14 17:48:57 +01:00
|
|
|
|
2009-12-15 02:55:46 +01:00
|
|
|
OsSignal(SIGUSR1, xf86VTAcquire);
|
|
|
|
OsSignal(SIGUSR2, xf86VTRelease);
|
2003-11-14 17:48:57 +01:00
|
|
|
|
2009-08-04 08:21:39 +02:00
|
|
|
VT.mode = VT_PROCESS;
|
|
|
|
VT.acqsig = SIGUSR1;
|
2009-12-15 02:55:46 +01:00
|
|
|
VT.relsig = SIGUSR2;
|
2003-11-14 17:48:57 +01:00
|
|
|
|
2009-08-04 08:21:39 +02:00
|
|
|
if (ioctl(xf86Info.consoleFd, VT_SETMODE, &VT) < 0)
|
|
|
|
FatalError("xf86OpenConsole: VT_SETMODE VT_PROCESS failed\n");
|
2003-11-14 17:48:57 +01:00
|
|
|
|
2009-08-04 08:21:39 +02:00
|
|
|
if (ioctl(xf86Info.consoleFd, VT_SETDISPINFO, atoi(display)) < 0)
|
|
|
|
xf86Msg(X_WARNING, "xf86OpenConsole: VT_SETDISPINFO failed\n");
|
|
|
|
}
|
2005-05-21 09:46:38 +02:00
|
|
|
#endif
|
2008-11-25 05:32:20 +01:00
|
|
|
|
2005-05-21 09:46:38 +02:00
|
|
|
#ifdef KDSETMODE
|
2008-11-25 05:32:20 +01:00
|
|
|
SYSCALL(i = ioctl(xf86Info.consoleFd, KDSETMODE, KD_GRAPHICS));
|
|
|
|
if (i < 0) {
|
|
|
|
xf86Msg(X_WARNING,
|
|
|
|
"xf86OpenConsole: KDSETMODE KD_GRAPHICS failed on %s (%s)\n",
|
2009-08-19 05:11:23 +02:00
|
|
|
consoleDev, strerror(errno));
|
2008-11-25 05:32:20 +01:00
|
|
|
}
|
2005-05-21 09:46:38 +02:00
|
|
|
#endif
|
2003-11-14 17:48:57 +01:00
|
|
|
}
|
|
|
|
else /* serverGeneration != 1 */
|
|
|
|
{
|
2005-05-21 09:46:38 +02:00
|
|
|
#ifdef HAS_USL_VTS
|
2009-12-15 02:55:46 +01:00
|
|
|
if (vtEnabled)
|
|
|
|
{
|
2009-08-04 08:21:39 +02:00
|
|
|
/*
|
|
|
|
* Now re-get the VT
|
|
|
|
*/
|
|
|
|
if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno) != 0)
|
|
|
|
xf86Msg(X_WARNING, "xf86OpenConsole: VT_ACTIVATE failed\n");
|
2003-11-14 17:48:57 +01:00
|
|
|
|
2009-08-04 08:21:39 +02:00
|
|
|
if (ioctl(xf86Info.consoleFd, VT_WAITACTIVE, xf86Info.vtno) != 0)
|
|
|
|
xf86Msg(X_WARNING, "xf86OpenConsole: VT_WAITACTIVE failed\n");
|
2003-11-14 17:48:57 +01:00
|
|
|
|
2009-08-04 08:21:39 +02:00
|
|
|
/*
|
|
|
|
* If the server doesn't have the VT when the reset occurs,
|
|
|
|
* this is to make sure we don't continue until the activate
|
|
|
|
* signal is received.
|
|
|
|
*/
|
|
|
|
if (!xf86Screens[0]->vtSema)
|
|
|
|
sleep(5);
|
|
|
|
}
|
2003-11-14 17:48:57 +01:00
|
|
|
#endif /* HAS_USL_VTS */
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
void
|
2003-11-14 17:48:57 +01:00
|
|
|
xf86CloseConsole(void)
|
|
|
|
{
|
|
|
|
#ifdef HAS_USL_VTS
|
|
|
|
struct vt_mode VT;
|
|
|
|
#endif
|
|
|
|
|
2007-11-21 03:31:03 +01:00
|
|
|
#if !defined(__i386__) && !defined(__i386) && !defined(__x86)
|
2003-11-14 17:48:57 +01:00
|
|
|
|
2009-07-24 12:47:31 +02:00
|
|
|
if (!xf86DoConfigure) {
|
2003-11-14 17:48:57 +01:00
|
|
|
int fd;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Wipe out framebuffer just like the non-SI Xsun server does. This
|
|
|
|
* could be improved by saving framebuffer contents in
|
|
|
|
* xf86OpenConsole() above and restoring them here. Also, it's unclear
|
|
|
|
* at this point whether this should be done for all framebuffers in
|
|
|
|
* the system, rather than only the console.
|
|
|
|
*/
|
2009-08-19 05:11:23 +02:00
|
|
|
if ((fd = open(xf86SolarisFbDev, O_RDWR, 0)) < 0) {
|
2003-11-14 17:48:57 +01:00
|
|
|
xf86Msg(X_WARNING,
|
|
|
|
"xf86CloseConsole(): unable to open framebuffer (%s)\n",
|
|
|
|
strerror(errno));
|
|
|
|
} else {
|
|
|
|
struct fbgattr fbattr;
|
|
|
|
|
|
|
|
if ((ioctl(fd, FBIOGATTR, &fbattr) < 0) &&
|
|
|
|
(ioctl(fd, FBIOGTYPE, &fbattr.fbtype) < 0)) {
|
|
|
|
xf86Msg(X_WARNING,
|
|
|
|
"xf86CloseConsole(): unable to retrieve framebuffer"
|
|
|
|
" attributes (%s)\n", strerror(errno));
|
|
|
|
} else {
|
|
|
|
pointer fbdata;
|
|
|
|
|
|
|
|
fbdata = mmap(NULL, fbattr.fbtype.fb_size,
|
|
|
|
PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
|
|
|
|
if (fbdata == MAP_FAILED) {
|
|
|
|
xf86Msg(X_WARNING,
|
|
|
|
"xf86CloseConsole(): unable to mmap framebuffer"
|
|
|
|
" (%s)\n", strerror(errno));
|
|
|
|
} else {
|
2008-10-06 21:36:51 +02:00
|
|
|
memset(fbdata, 0, fbattr.fbtype.fb_size);
|
|
|
|
munmap(fbdata, fbattr.fbtype.fb_size);
|
2003-11-14 17:48:57 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
close(fd);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2005-05-21 09:46:38 +02:00
|
|
|
#ifdef KDSETMODE
|
|
|
|
/* Reset the display back to text mode */
|
2008-11-25 05:32:20 +01:00
|
|
|
SYSCALL(ioctl(xf86Info.consoleFd, KDSETMODE, KD_TEXT));
|
2005-05-21 09:46:38 +02:00
|
|
|
#endif
|
|
|
|
|
2003-11-14 17:48:57 +01:00
|
|
|
#ifdef HAS_USL_VTS
|
2009-12-15 02:55:46 +01:00
|
|
|
if (vtEnabled)
|
|
|
|
{
|
2009-08-04 08:21:39 +02:00
|
|
|
if (ioctl(xf86Info.consoleFd, VT_GETMODE, &VT) != -1)
|
|
|
|
{
|
|
|
|
VT.mode = VT_AUTO; /* Set default vt handling */
|
|
|
|
ioctl(xf86Info.consoleFd, VT_SETMODE, &VT);
|
|
|
|
}
|
2003-11-14 17:48:57 +01:00
|
|
|
|
2009-08-04 08:21:39 +02:00
|
|
|
/* Activate the VT that X was started on */
|
|
|
|
ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86StartVT);
|
2003-11-14 17:48:57 +01:00
|
|
|
}
|
|
|
|
#endif /* HAS_USL_VTS */
|
|
|
|
|
|
|
|
close(xf86Info.consoleFd);
|
|
|
|
}
|
|
|
|
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
int
|
2003-11-14 17:48:57 +01:00
|
|
|
xf86ProcessArgument(int argc, char **argv, int i)
|
|
|
|
{
|
|
|
|
/*
|
|
|
|
* Keep server from detaching from controlling tty. This is useful when
|
|
|
|
* debugging, so the server can receive keyboard signals.
|
|
|
|
*/
|
|
|
|
if (!strcmp(argv[i], "-keeptty"))
|
|
|
|
{
|
|
|
|
KeepTty = TRUE;
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Undocumented flag to protect page 0 from read/write to help catch NULL
|
|
|
|
* pointer dereferences. This is purely a debugging flag.
|
|
|
|
*/
|
|
|
|
if (!strcmp(argv[i], "-protect0"))
|
|
|
|
{
|
|
|
|
Protect0 = TRUE;
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
#ifdef HAS_USL_VTS
|
|
|
|
|
|
|
|
if ((argv[i][0] == 'v') && (argv[i][1] == 't'))
|
|
|
|
{
|
2009-08-04 08:21:39 +02:00
|
|
|
if (sscanf(argv[i], "vt%d", &VTnum) == 0)
|
2003-11-14 17:48:57 +01:00
|
|
|
{
|
|
|
|
UseMsg();
|
|
|
|
VTnum = -1;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* HAS_USL_VTS */
|
|
|
|
|
|
|
|
if ((i + 1) < argc) {
|
|
|
|
if (!strcmp(argv[i], "-dev")) {
|
2009-08-19 05:11:23 +02:00
|
|
|
strlcpy(xf86SolarisFbDev, argv[i+1], sizeof(xf86SolarisFbDev));
|
2003-11-14 17:48:57 +01:00
|
|
|
return 2;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
void xf86UseMsg()
|
2003-11-14 17:48:57 +01:00
|
|
|
{
|
|
|
|
#ifdef HAS_USL_VTS
|
2009-08-04 08:21:39 +02:00
|
|
|
ErrorF("vtX Use the specified VT number\n");
|
2003-11-14 17:48:57 +01:00
|
|
|
#endif
|
|
|
|
ErrorF("-dev <fb> Framebuffer device\n");
|
|
|
|
ErrorF("-keeptty Don't detach controlling tty\n");
|
|
|
|
ErrorF(" (for debugging only)\n");
|
|
|
|
}
|