summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@sun.com>2008-11-24 20:32:20 -0800
committerAlan Coopersmith <alan.coopersmith@sun.com>2008-11-24 20:32:20 -0800
commit75784e1e53ad78e21518696dd9d297bc08c17d54 (patch)
tree000620d3dfbe766e48a411ff77777ba686ab9d22
parent3e6da1636093d7dc98baac40544c0b0fb7fd8aec (diff)
Solaris: Make KDSETMODE failure non fatal, and retry it on interrupts
-rw-r--r--hw/xfree86/os-support/solaris/sun_init.c14
1 files changed, 10 insertions, 4 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