diff options
Diffstat (limited to 'hw/xfree86/os-support/solaris/sun_init.c')
-rw-r--r-- | hw/xfree86/os-support/solaris/sun_init.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/hw/xfree86/os-support/solaris/sun_init.c b/hw/xfree86/os-support/solaris/sun_init.c index b08529a00..c7382e0e1 100644 --- a/hw/xfree86/os-support/solaris/sun_init.c +++ b/hw/xfree86/os-support/solaris/sun_init.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sunos/sun_init.c,v 1.6 2002/06/06 13:49:34 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sunos/sun_init.c,v 1.5 2001/11/25 13:51:24 tsi Exp $ */ /* * Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany * Copyright 1993 by David Wexelblat <dwex@goblin.org> @@ -26,6 +26,9 @@ #include "xf86.h" #include "xf86Priv.h" #include "xf86_OSlib.h" +#ifdef __i386 +# include <sys/kd.h> +#endif static Bool KeepTty = FALSE; static Bool Protect0 = FALSE; @@ -34,7 +37,11 @@ static int VTnum = -1; static int xf86StartVT = -1; #endif +#if defined(__SOL8__) || !defined(__i386) +static char fb_dev[PATH_MAX] = "/dev/fb"; +#else static char fb_dev[PATH_MAX] = "/dev/console"; +#endif void xf86OpenConsole(void) @@ -162,12 +169,15 @@ xf86OpenConsole(void) if (ioctl(xf86Info.consoleFd, VT_SETMODE, &VT) < 0) FatalError("xf86OpenConsole: VT_SETMODE VT_PROCESS failed\n"); - +#endif +#ifdef __i386 if (ioctl(xf86Info.consoleFd, KDSETMODE, KD_GRAPHICS) < 0) FatalError("xf86OpenConsole: KDSETMODE KD_GRAPHICS failed\n"); +#endif } else /* serverGeneration != 1 */ { +#ifdef HAS_USL_VTS /* * Now re-get the VT */ @@ -245,6 +255,11 @@ xf86CloseConsole(void) #endif +#ifdef __i386 + /* Reset the display back to text mode */ + ioctl(xf86Info.consoleFd, KDSETMODE, KD_TEXT); +#endif + #ifdef HAS_USL_VTS /* @@ -261,8 +276,6 @@ xf86CloseConsole(void) * Did the whole thing similarly to the way linux does it */ - /* Reset the display back to text mode */ - ioctl(xf86Info.consoleFd, KDSETMODE, KD_TEXT); if (ioctl(xf86Info.consoleFd, VT_GETMODE, &VT) != -1) { VT.mode = VT_AUTO; /* Set default vt handling */ |