forked from pool/xorg-x11-server
Stefan Dirsch
0de1ccd95c
- Update to version 1.17.0: + Continued work to strip out stale code and clean up the server. Thousands of lines of unnecessary code have disappeared yet again. + The modesetting driver has been merged into the server code base, simplifying ongoing maintenance by coupling it to the X server ABI/API release schedule. This now includes DRI2 support (so that GLX works correctly) along with Glamor support (which handles DRI3). + Lots of Glamor improvements, including a rewrite of the core protocol rendering functions. - Remove upstream patches: + Patch130: U_BellProc-Send-bell-event-on-core-protocol-bell-when-requested.patch + Patch131: U_fb-Fix-invalid-bpp-for-24bit-depth-window.patch + Patch200: U_kdrive_extend_screen_option_syntax.patch + Patch201: U_ephyr_enable_screen_window_placement.patch + Patch202: U_ephyr_add_output_option_support.patch OBS-URL: https://build.opensuse.org/request/show/284232 OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/xorg-x11-server?expand=0&rev=556
82 lines
2.9 KiB
Diff
82 lines
2.9 KiB
Diff
From: Egbert Eich <eich@suse.de>
|
|
Date: Sat May 24 02:02:32 2014 +0200
|
|
Subject: [PATCH]CloseConsole: Don't report FatalError() when shutting down
|
|
Patch-mainline: to be upstreamed
|
|
Git-commit: 4edf1fd15b9d2746f1f83165ab45efbe35af8de8
|
|
Git-repo:
|
|
References: bnc#879666, bnc#879489
|
|
Signed-off-by: Egbert Eich <eich@suse.com>
|
|
|
|
When encountering a problem while closing the console, don't report this
|
|
as a FatalError(). FatalError() will terminate the Xserver - no use calling
|
|
it when terminating anyway. Since FatalError() will call CloseConsole()
|
|
we would only come here again.
|
|
|
|
Signed-off-by: Egbert Eich <eich@suse.de>
|
|
---
|
|
hw/xfree86/os-support/linux/lnx_init.c | 25 ++++++++++++++++---------
|
|
1 file changed, 16 insertions(+), 9 deletions(-)
|
|
|
|
diff --git a/hw/xfree86/os-support/linux/lnx_init.c b/hw/xfree86/os-support/linux/lnx_init.c
|
|
index bcb039f..c46bca9 100644
|
|
--- a/hw/xfree86/os-support/linux/lnx_init.c
|
|
+++ b/hw/xfree86/os-support/linux/lnx_init.c
|
|
@@ -63,17 +63,24 @@ drain_console(int fd, void *closure)
|
|
}
|
|
|
|
static void
|
|
-switch_to(int vt, const char *from)
|
|
+switch_to(int vt, const char *from, Bool fatal)
|
|
{
|
|
int ret;
|
|
|
|
SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_ACTIVATE, vt));
|
|
- if (ret < 0)
|
|
- FatalError("%s: VT_ACTIVATE failed: %s\n", from, strerror(errno));
|
|
-
|
|
+ if (ret < 0) {
|
|
+ if (fatal)
|
|
+ FatalError("%s: VT_ACTIVATE failed: %s\n", from, strerror(errno));
|
|
+ else
|
|
+ xf86Msg(X_WARNING, "%s: VT_ACTIVATE failed: %s\n", from, strerror(errno));
|
|
+ }
|
|
SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_WAITACTIVE, vt));
|
|
- if (ret < 0)
|
|
- FatalError("%s: VT_WAITACTIVE failed: %s\n", from, strerror(errno));
|
|
+ if (ret < 0) {
|
|
+ if (fatal)
|
|
+ FatalError("%s: VT_WAITACTIVE failed: %s\n", from, strerror(errno));
|
|
+ else
|
|
+ xf86Msg(X_WARNING, "%s: VT_WAITACTIVE failed: %s\n", from, strerror(errno));
|
|
+ }
|
|
}
|
|
|
|
#pragma GCC diagnostic push
|
|
@@ -194,7 +201,7 @@ xf86OpenConsole(void)
|
|
/*
|
|
* now get the VT. This _must_ succeed, or else fail completely.
|
|
*/
|
|
- switch_to(xf86Info.vtno, "xf86OpenConsole");
|
|
+ switch_to(xf86Info.vtno, "xf86OpenConsole", TRUE);
|
|
|
|
SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_GETMODE, &VT));
|
|
if (ret < 0)
|
|
@@ -255,7 +262,7 @@ xf86OpenConsole(void)
|
|
else { /* serverGeneration != 1 */
|
|
if (!xf86Info.ShareVTs && xf86Info.autoVTSwitch) {
|
|
/* now get the VT */
|
|
- switch_to(xf86Info.vtno, "xf86OpenConsole");
|
|
+ switch_to(xf86Info.vtno, "xf86OpenConsole", TRUE);
|
|
}
|
|
}
|
|
}
|
|
@@ -305,7 +312,7 @@ xf86CloseConsole(void)
|
|
* Perform a switch back to the active VT when we were started
|
|
*/
|
|
if (activeVT >= 0) {
|
|
- switch_to(activeVT, "xf86CloseConsole");
|
|
+ switch_to(activeVT, "xf86CloseConsole", FALSE);
|
|
activeVT = -1;
|
|
}
|
|
}
|