From a81c98e42a954580ca0d43c89169dc2069c87b96 Mon Sep 17 00:00:00 2001 From: Olivier Fourdan Date: Tue, 8 Sep 2020 18:34:48 +0200 Subject: [PATCH] mi: Don't log the full extension list on disable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When enabling or disabling an extension which is not known to the Xserver, it will log an error message and list the extensions it knows about. That clutters the logs when the Xserver is Xwayland spawned by the Wayland compositor who doesn't actually know the list of extensions enabled at build time in the Xserver. Considering that disabling a non-existing extension is a no-op anyway, list all the extensions available only when attempting to enable an extension which the Xserver doesn't know about. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer --- mi/miinitext.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mi/miinitext.c b/mi/miinitext.c index b7c702127..358d485b3 100644 --- a/mi/miinitext.c +++ b/mi/miinitext.c @@ -221,8 +221,12 @@ EnableDisableExtensionError(const char *name, Bool enable) break; } } - if (found == FALSE) + if (found == FALSE) { ErrorF("[mi] Extension \"%s\" is not recognized\n", name); + /* Disabling a non-existing extension is a no-op anyway */ + if (enable == FALSE) + return; + } ErrorF("[mi] Only the following extensions can be run-time %s:\n", enable ? "enabled" : "disabled"); for (i = 0; i < ARRAY_SIZE(staticExtensions); i++) {