diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c index fce7c401d..1c93b61b0 100644 --- a/hw/xfree86/common/xf86Config.c +++ b/hw/xfree86/common/xf86Config.c @@ -826,12 +826,10 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts) { if ((s = xf86GetOptValString(FlagOptions, FLAG_LOG))) { if (!xf86NameCmp(s, "flush")) { - xf86Msg(X_CONFIG, "Flushing logfile enabled\n"); - LogSetParameter(XLOG_FLUSH, TRUE); + xf86Msg(X_CONFIG, "flush log flag is noop\n"); } else if (!xf86NameCmp(s, "sync")) { xf86Msg(X_CONFIG, "Syncing logfile enabled\n"); - LogSetParameter(XLOG_FLUSH, TRUE); LogSetParameter(XLOG_SYNC, TRUE); } else { diff --git a/hw/xwin/InitOutput.c b/hw/xwin/InitOutput.c index 541503552..254511749 100644 --- a/hw/xwin/InitOutput.c +++ b/hw/xwin/InitOutput.c @@ -646,7 +646,6 @@ OsVendorInit(void) g_pszLogFile = LogInit(g_pszLogFile, ".old"); } - LogSetParameter(XLOG_FLUSH, 1); LogSetParameter(XLOG_VERBOSITY, g_iLogVerbose); LogSetParameter(XLOG_FILE_VERBOSITY, g_iLogVerbose); diff --git a/include/os.h b/include/os.h index fa41d6698..f00d44198 100644 --- a/include/os.h +++ b/include/os.h @@ -324,7 +324,6 @@ timingsafe_memcmp(const void *b1, const void *b2, size_t len); /* Logging. */ typedef enum _LogParameter { - XLOG_FLUSH, XLOG_SYNC, XLOG_VERBOSITY, XLOG_FILE_VERBOSITY diff --git a/os/log.c b/os/log.c index e468af917..89a1214de 100644 --- a/os/log.c +++ b/os/log.c @@ -118,7 +118,6 @@ void (*OsVendorVErrorFProc) (const char *, va_list args) = NULL; #endif static int logFileFd = -1; -static Bool logFlush = FALSE; static Bool logSync = FALSE; static int logVerbosity = DEFAULT_LOG_VERBOSITY; static int logFileVerbosity = DEFAULT_LOG_FILE_VERBOSITY; @@ -341,9 +340,6 @@ Bool LogSetParameter(LogParameter param, int value) { switch (param) { - case XLOG_FLUSH: - logFlush = value ? TRUE : FALSE; - return TRUE; case XLOG_SYNC: logSync = value ? TRUE : FALSE; return TRUE; @@ -604,7 +600,7 @@ LogSWrite(int verb, const char *buf, size_t len, Bool end_line) if (inSignalContext && logFileFd >= 0) { ret = write(logFileFd, buf, len); #ifndef WIN32 - if (logFlush && logSync) + if (logSync) fsync(logFileFd); #endif } @@ -620,12 +616,10 @@ LogSWrite(int verb, const char *buf, size_t len, Bool end_line) } newline = end_line; write(logFileFd, buf, len); - if (logFlush) { #ifndef WIN32 - if (logSync) - fsync(logFileFd); + if (logSync) + fsync(logFileFd); #endif - } } else if (!inSignalContext && needBuffer) { if (len > bufferUnused) {