From 42f7cd5d92f2046e1b5c264b3d76c3afda624a55 Mon Sep 17 00:00:00 2001 From: Jon Turney Date: Sat, 11 Oct 2014 14:49:16 +0100 Subject: [PATCH] hw/xwin: Tell LogInit() to backup previous logfile as .old Future work: Do we really need to call LogInit() in so many different places? Signed-off-by: Jon Turney Reviewed-by: Colin Harrison --- hw/xwin/InitOutput.c | 7 ++++--- hw/xwin/winerror.c | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/hw/xwin/InitOutput.c b/hw/xwin/InitOutput.c index 119012405..07631a9e1 100644 --- a/hw/xwin/InitOutput.c +++ b/hw/xwin/InitOutput.c @@ -210,7 +210,7 @@ ddxGiveUp(enum ExitCode error) #endif if (!g_fLogInited) { - g_pszLogFile = LogInit(g_pszLogFile, NULL); + g_pszLogFile = LogInit(g_pszLogFile, ".old"); g_fLogInited = TRUE; } LogClose(error); @@ -635,7 +635,8 @@ OsVendorInit(void) * avoid the second call */ g_fLogInited = TRUE; - g_pszLogFile = LogInit(g_pszLogFile, NULL); + g_pszLogFile = LogInit(g_pszLogFile, ".old"); + } LogSetParameter(XLOG_FLUSH, 1); LogSetParameter(XLOG_VERBOSITY, g_iLogVerbose); @@ -865,7 +866,7 @@ ddxUseMsg(void) /* Log file will not be opened for UseMsg unless we open it now */ if (!g_fLogInited) { - g_pszLogFile = LogInit(g_pszLogFile, NULL); + g_pszLogFile = LogInit(g_pszLogFile, ".old"); g_fLogInited = TRUE; } LogClose(EXIT_NO_ERROR); diff --git a/hw/xwin/winerror.c b/hw/xwin/winerror.c index 1318b0f36..b49f9e59d 100644 --- a/hw/xwin/winerror.c +++ b/hw/xwin/winerror.c @@ -75,7 +75,7 @@ OsVendorFatalError(const char *f, va_list args) if (!g_fLogInited) { g_fLogInited = TRUE; - g_pszLogFile = LogInit(g_pszLogFile, NULL); + g_pszLogFile = LogInit(g_pszLogFile, ".old"); } LogClose(EXIT_ERR_ABORT);