summaryrefslogtreecommitdiff
path: root/hw/xwin/winerror.c
diff options
context:
space:
mode:
authorYaakov Selkowitz <yselkowitz@users.sourceforge.net>2010-02-01 17:11:51 +0000
committerJon TURNEY <jon.turney@dronecode.org.uk>2010-03-16 14:02:17 +0000
commitbf181915e103b0659c5a0bc3b2f6bccb18c9ec36 (patch)
tree97baaa289584be87ffc5f438d3e2c58896d19d1b /hw/xwin/winerror.c
parentcca4952d750779a4c58a11fe08a53336042930bb (diff)
Cygwin/X: Allow the default log location to be configurable
Allow the default log location to be configurable (e.g. /var/log), and use separate logs for each display instance (e.g. XWin.0.log). Make the type of g_pszLogFile const char*, per os/log.c:LogInit(). Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Diffstat (limited to 'hw/xwin/winerror.c')
-rw-r--r--hw/xwin/winerror.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/hw/xwin/winerror.c b/hw/xwin/winerror.c
index 9ed27c3d0..191b9a921 100644
--- a/hw/xwin/winerror.c
+++ b/hw/xwin/winerror.c
@@ -41,8 +41,9 @@
/* References to external symbols */
extern char * g_pszCommandLine;
-extern char * g_pszLogFile;
+extern const char * g_pszLogFile;
extern Bool g_fSilentFatalError;
+extern Bool g_fLogInited;
#ifdef DDXOSVERRORF
@@ -87,6 +88,12 @@ OsVendorFatalError (void)
if (g_fSilentFatalError)
return;
+ if (!g_fLogInited) {
+ g_fLogInited = TRUE;
+ g_pszLogFile = LogInit (g_pszLogFile, NULL);
+ }
+ LogClose ();
+
winMessageBoxF (
"A fatal error has occurred and " PROJECT_NAME " will now exit.\n" \
"Please open %s for more information.\n",