summaryrefslogtreecommitdiff
path: root/hw/xfree86/os-support/solaris
diff options
context:
space:
mode:
Diffstat (limited to 'hw/xfree86/os-support/solaris')
-rw-r--r--hw/xfree86/os-support/solaris/sun_init.c14
-rw-r--r--hw/xfree86/os-support/solaris/sun_vid.c43
2 files changed, 10 insertions, 47 deletions
diff --git a/hw/xfree86/os-support/solaris/sun_init.c b/hw/xfree86/os-support/solaris/sun_init.c
index b79814d8a..795b0c13c 100644
--- a/hw/xfree86/os-support/solaris/sun_init.c
+++ b/hw/xfree86/os-support/solaris/sun_init.c
@@ -49,8 +49,9 @@ static char fb_dev[PATH_MAX] = "/dev/console";
void
xf86OpenConsole(void)
{
+ int i;
#ifdef HAS_USL_VTS
- int fd, i;
+ int fd;
struct vt_mode VT;
struct vt_stat vtinfo;
int FreeVTslot;
@@ -173,9 +174,14 @@ xf86OpenConsole(void)
if (ioctl(xf86Info.consoleFd, VT_SETMODE, &VT) < 0)
FatalError("xf86OpenConsole: VT_SETMODE VT_PROCESS failed\n");
#endif
+
#ifdef KDSETMODE
- if (ioctl(xf86Info.consoleFd, KDSETMODE, KD_GRAPHICS) < 0)
- FatalError("xf86OpenConsole: KDSETMODE KD_GRAPHICS failed\n");
+ SYSCALL(i = ioctl(xf86Info.consoleFd, KDSETMODE, KD_GRAPHICS));
+ if (i < 0) {
+ xf86Msg(X_WARNING,
+ "xf86OpenConsole: KDSETMODE KD_GRAPHICS failed on %s (%s)\n",
+ fb_dev, strerror(errno));
+ }
#endif
}
else /* serverGeneration != 1 */
@@ -257,7 +263,7 @@ xf86CloseConsole(void)
#ifdef KDSETMODE
/* Reset the display back to text mode */
- ioctl(xf86Info.consoleFd, KDSETMODE, KD_TEXT);
+ SYSCALL(ioctl(xf86Info.consoleFd, KDSETMODE, KD_TEXT));
#endif
#ifdef HAS_USL_VTS
diff --git a/hw/xfree86/os-support/solaris/sun_vid.c b/hw/xfree86/os-support/solaris/sun_vid.c
index 2b50dd619..3982f631f 100644
--- a/hw/xfree86/os-support/solaris/sun_vid.c
+++ b/hw/xfree86/os-support/solaris/sun_vid.c
@@ -263,46 +263,3 @@ xf86DisableIO(void)
ExtendedEnabled = FALSE;
#endif /* i386 */
}
-
-
-/***************************************************************************/
-/* Interrupt Handling section */
-/***************************************************************************/
-
-_X_EXPORT Bool
-xf86DisableInterrupts(void)
-{
-#if defined(__i386__) || defined(__i386) || defined(__x86)
- if (!ExtendedEnabled && (sysi86(SI86V86, V86SC_IOPL, PS_IOPL) < 0))
- return FALSE;
-
-#ifdef __GNUC__
- __asm__ __volatile__("cli");
-#else
- asm("cli");
-#endif /* __GNUC__ */
-
- if (!ExtendedEnabled)
- sysi86(SI86V86, V86SC_IOPL, 0);
-#endif /* i386 */
-
- return TRUE;
-}
-
-_X_EXPORT void
-xf86EnableInterrupts(void)
-{
-#if defined(__i386__) || defined(__i386) || defined(__x86)
- if (!ExtendedEnabled && (sysi86(SI86V86, V86SC_IOPL, PS_IOPL) < 0))
- return;
-
-#ifdef __GNUC__
- __asm__ __volatile__("sti");
-#else
- asm("sti");
-#endif /* __GNUC__ */
-
- if (!ExtendedEnabled)
- sysi86(SI86V86, V86SC_IOPL, 0);
-#endif /* i386 */
-}