From fcae57263d8103018f129ef4b381b759f00e0dcc Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Tue, 12 Aug 2025 12:16:37 +0200 Subject: [PATCH] namespace: allow "namespace" config directive instead of "container" The namespace config still has the "container" directive, which should have been named "namespace". It's a leftover from the original working draft that was named "container extension". For the time being, keep backwards compatibility by allowing both tokens "container" as well as "namespace" for the same directive. But consider the old token as deprecated, it shouldn't be used anymore and might go away in the near future. Signed-off-by: Enrico Weigelt, metux IT consult --- Xext/namespace/config.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Xext/namespace/config.c b/Xext/namespace/config.c index a59bd24b8a..eb2692180a 100644 --- a/Xext/namespace/config.c +++ b/Xext/namespace/config.c @@ -66,7 +66,7 @@ static int hex2bin(const char *in, char *out) /* * loadConfig * - * Load the container config + * Load the namespace config */ static void parseLine(char *line, struct Xnamespace **walk_ns) { @@ -84,10 +84,11 @@ static void parseLine(char *line, struct Xnamespace **walk_ns) if (token == NULL) return; - // if no "container" statement hasn't been issued yet, use root NS + /* if no "namespace" statement hasn't been issued yet, use root NS */ struct Xnamespace * curr = (*walk_ns ? *walk_ns : &ns_root); - if (strcmp(token, "container") == 0) + if ((strcmp(token, "namespace") == 0) || + (strcmp(token, "container") == 0)) /* "container" is deprecated ! */ { if ((token = strtok(NULL, " ")) == NULL) { @@ -171,7 +172,7 @@ Bool XnsLoadConfig(void) FILE *fp = fopen(namespaceConfigFile, "r"); if (fp == NULL) { - FatalError("failed loading container config: %s\n", namespaceConfigFile); + FatalError("failed loading namespace config: %s\n", namespaceConfigFile); return FALSE; }