Correct error message if specified config file is not found

By making the "Unable to open config file" header a warning, it was
not appearing with the filename when a config file was specified and
not found.   Now we make it an error message again, but only issue
the error if a filename was specified - if none was specified, then
we don't even issue a warning, just the "Using autoconfig" info message.

Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
This commit is contained in:
Alan Coopersmith 2009-02-12 18:23:59 -08:00
parent d229ba7068
commit bd713794ce

View File

@ -2448,10 +2448,9 @@ xf86HandleConfigFile(Bool autoconfig)
xf86MsgVerb(from, 0, "Using config file: \"%s\"\n", filename);
xf86ConfigFile = xnfstrdup(filename);
} else {
xf86Msg(X_WARNING, "Unable to locate/open config file");
if (xf86ConfigFile)
xf86ErrorFVerb(0, ": \"%s\"", xf86ConfigFile);
xf86ErrorFVerb(0, "\n");
xf86Msg(X_ERROR, "Unable to locate/open config file: \"%s\"\n",
xf86ConfigFile);
return CONFIG_NOFILE;
}
}