mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 08:04:30 +00:00
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 <info@metux.net>
This commit is contained in:
committed by
Enrico Weigelt
parent
3af53d474f
commit
e98a3a5ff4
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user