os: direct access to logSync instead of complex LogSetParameter()

It's just a simple flag, and only written from one site, so no need
for complex 'generic' setter function.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult
2025-02-10 13:19:34 +01:00
committed by Enrico Weigelt, metux IT consult .
parent 74ccb158eb
commit 4fa8b1658b
3 changed files with 22 additions and 2 deletions

View File

@@ -110,8 +110,9 @@ OR PERFORMANCE OF THIS SOFTWARE.
#define DEFAULT_LOG_VERBOSITY 0
#define DEFAULT_LOG_FILE_VERBOSITY 3
Bool logSync = FALSE;
static int logFileFd = -1;
static Bool logSync = FALSE;
static int logVerbosity = DEFAULT_LOG_VERBOSITY;
static int logFileVerbosity = DEFAULT_LOG_FILE_VERBOSITY;

18
os/log_priv.h Normal file
View File

@@ -0,0 +1,18 @@
/* SPDX-License-Identifier: MIT OR X11
*
* Copyright © 2024 Enrico Weigelt, metux IT consult <info@metux.net>
*/
#ifndef _XSERVER_LOG_PRIV_H
#define _XSERVER_LOG_PRIV_H
#include <sys/types.h>
#include <X11/Xdefs.h>
/**
* @brief force fsync() on each log write
*
* If set to TRUE, force fsync() on each log write.
*/
extern Bool logSync;
#endif /* _XSERVER_LOG_PRIV_H */