summaryrefslogtreecommitdiff
path: root/hw/xfree86/os-support
diff options
context:
space:
mode:
Diffstat (limited to 'hw/xfree86/os-support')
-rw-r--r--hw/xfree86/os-support/bsd/bsd_VTsw.c9
-rw-r--r--hw/xfree86/os-support/sco/VTsw_sco.c10
-rw-r--r--hw/xfree86/os-support/shared/VTsw_noop.c6
-rw-r--r--hw/xfree86/os-support/shared/VTsw_usl.c11
-rw-r--r--hw/xfree86/os-support/solaris/sun_VTsw.c17
-rw-r--r--hw/xfree86/os-support/xf86_OSproc.h1
6 files changed, 54 insertions, 0 deletions
diff --git a/hw/xfree86/os-support/bsd/bsd_VTsw.c b/hw/xfree86/os-support/bsd/bsd_VTsw.c
index 476a0e957..4842be5c9 100644
--- a/hw/xfree86/os-support/bsd/bsd_VTsw.c
+++ b/hw/xfree86/os-support/bsd/bsd_VTsw.c
@@ -92,3 +92,12 @@ xf86VTSwitchTo()
#endif
return(TRUE);
}
+
+Bool
+xf86VTActivate(int vtno)
+{
+ if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, vtno) < 0) {
+ return(FALSE);
+ }
+ return(TRUE);
+}
diff --git a/hw/xfree86/os-support/sco/VTsw_sco.c b/hw/xfree86/os-support/sco/VTsw_sco.c
index d126e7869..0a59fb965 100644
--- a/hw/xfree86/os-support/sco/VTsw_sco.c
+++ b/hw/xfree86/os-support/sco/VTsw_sco.c
@@ -115,3 +115,13 @@ xf86VTSwitchTo(void)
return TRUE;
}
}
+
+Bool
+xf86VTActivate(int vtno)
+{
+ if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, vtno - 1) < 0) {
+ return(FALSE);
+ }
+
+ return(TRUE);
+}
diff --git a/hw/xfree86/os-support/shared/VTsw_noop.c b/hw/xfree86/os-support/shared/VTsw_noop.c
index 78cbe0e34..3425840a2 100644
--- a/hw/xfree86/os-support/shared/VTsw_noop.c
+++ b/hw/xfree86/os-support/shared/VTsw_noop.c
@@ -52,3 +52,9 @@ xf86VTSwitchTo(void)
{
return(TRUE);
}
+
+Bool
+xf86VTActivate(int vtno)
+{
+ return(TRUE);
+}
diff --git a/hw/xfree86/os-support/shared/VTsw_usl.c b/hw/xfree86/os-support/shared/VTsw_usl.c
index 9308640e2..393f1c0b9 100644
--- a/hw/xfree86/os-support/shared/VTsw_usl.c
+++ b/hw/xfree86/os-support/shared/VTsw_usl.c
@@ -88,3 +88,14 @@ xf86VTSwitchTo(void)
return(TRUE);
}
}
+
+Bool
+xf86VTActivate(int vtno)
+{
+#ifdef VT_ACTIVATE
+ if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, vtno) < 0) {
+ return(FALSE);
+ }
+#endif
+ return(TRUE);
+}
diff --git a/hw/xfree86/os-support/solaris/sun_VTsw.c b/hw/xfree86/os-support/solaris/sun_VTsw.c
index 7f4e08e1e..1e2774b11 100644
--- a/hw/xfree86/os-support/solaris/sun_VTsw.c
+++ b/hw/xfree86/os-support/solaris/sun_VTsw.c
@@ -118,3 +118,20 @@ xf86VTSwitchTo(void)
return(TRUE);
}
}
+
+Bool
+xf86VTActivate(int vtno)
+{
+ struct vt_stat state;
+
+ if (ioctl(xf86Info.consoleFd, VT_GETSTATE, &state) < 0)
+ return(FALSE);
+
+ if ((state.v_state & (1 << vtno)) == 0)
+ return(FALSE);
+
+ xf86Info.vtRequestsPending = TRUE;
+ xf86Info.vtPendingNum = vtno;
+
+ return(TRUE);
+}
diff --git a/hw/xfree86/os-support/xf86_OSproc.h b/hw/xfree86/os-support/xf86_OSproc.h
index c1a117334..f0cb768be 100644
--- a/hw/xfree86/os-support/xf86_OSproc.h
+++ b/hw/xfree86/os-support/xf86_OSproc.h
@@ -199,6 +199,7 @@ extern _X_EXPORT Bool xf86SIGIOSupported (void);
typedef void (*PMClose)(void);
extern _X_EXPORT void xf86OpenConsole(void);
extern _X_EXPORT void xf86CloseConsole(void);
+extern _X_HIDDEN Bool xf86VTActivate(int vtno);
extern _X_EXPORT Bool xf86VTSwitchPending(void);
extern _X_EXPORT Bool xf86VTSwitchAway(void);
extern _X_EXPORT Bool xf86VTSwitchTo(void);