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 <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
This commit is contained in:
Jon Turney 2014-10-11 14:49:16 +01:00
parent 1974198382
commit 42f7cd5d92
2 changed files with 5 additions and 4 deletions

View File

@ -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);

View File

@ -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);