From 4892a42d40945ed9e74d5bd2dc738a9ab71bdb0d Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sun, 22 Feb 2026 17:55:45 -0800 Subject: [PATCH] os: add a generic -verbose option instead of making each server add its own Replaces Xwayland's server-specific implementation, but leaves Xorg's since it sets global variables in the xfree86 ddx layer. Also leaves Xephyr's differently-spelled "-verbosity" for backwards compatibility. Signed-off-by: Alan Coopersmith Part-of: --- hw/kdrive/ephyr/ephyrinit.c | 6 ++++-- os/utils.c | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/hw/kdrive/ephyr/ephyrinit.c b/hw/kdrive/ephyr/ephyrinit.c index e4e1053ff..0f30eab1f 100644 --- a/hw/kdrive/ephyr/ephyrinit.c +++ b/hw/kdrive/ephyr/ephyrinit.c @@ -286,8 +286,10 @@ ddxProcessArgument(int argc, char **argv, int i) * was added, so it's been left for compatibility */ else if (!strcmp(argv[i], "-verbosity")) { if (i + 1 < argc && argv[i + 1][0] != '-') { - xorgLogVerbosity = atoi(argv[i + 1]); - EPHYR_LOG("set verbosity to %d\n", xorgLogVerbosity); + int verbosity = atoi(argv[i + 1]); + + LogSetParameter(XLOG_VERBOSITY, verbosity); + EPHYR_LOG("set verbosity to %d\n", verbosity); return 2; } else { diff --git a/os/utils.c b/os/utils.c index 0c235d5ff..6df21f7db 100644 --- a/os/utils.c +++ b/os/utils.c @@ -675,7 +675,7 @@ ProcessCommandLine(int argc, char *argv[]) i = n; } } - xorgLogVerbosity = verbosity; + LogSetParameter(XLOG_VERBOSITY, verbosity); } else if (strcmp(argv[i], "-wr") == 0) whiteRoot = TRUE;