xserver: Branch 'master' - 2 commits
Alan Coopersmith
alanc at kemper.freedesktop.org
Thu Feb 12 18:38:04 PST 2009
hw/xfree86/common/xf86Config.c | 5 ++---
hw/xfree86/common/xf86Configure.c | 12 ++++++++++--
2 files changed, 12 insertions(+), 5 deletions(-)
New commits:
commit ac470dfb4fadaa0b28b6f8b57f4f13a20842b897
Author: Alan Coopersmith <alan.coopersmith at sun.com>
Date: Thu Feb 12 18:34:22 2009 -0800
Check for and report errors writing xorg.conf.new from Xorg -configure
Signed-off-by: Alan Coopersmith <alan.coopersmith at sun.com>
diff --git a/hw/xfree86/common/xf86Configure.c b/hw/xfree86/common/xf86Configure.c
index b803b49..1f1ff67 100644
--- a/hw/xfree86/common/xf86Configure.c
+++ b/hw/xfree86/common/xf86Configure.c
@@ -733,7 +733,11 @@ DoConfigure(void)
snprintf(filename, sizeof(filename), "%s%s" XF86CONFIGFILE ".new",
home, addslash);
- xf86writeConfigFile(filename, xf86config);
+ if (xf86writeConfigFile(filename, xf86config) == 0) {
+ xf86Msg(X_ERROR, "Unable to write config file: \"%s\": %s\n",
+ filename, strerror(errno));
+ goto bail;
+ }
xf86DoConfigurePass1 = FALSE;
/* Try to get DDC information filled in */
@@ -829,7 +833,11 @@ DoConfigure(void)
(glp)xf86config->conf_screen_lst, (glp)ScreenPtr);
}
- xf86writeConfigFile(filename, xf86config);
+ if (xf86writeConfigFile(filename, xf86config) == 0) {
+ xf86Msg(X_ERROR, "Unable to write config file: \"%s\": %s\n",
+ filename, strerror(errno));
+ goto bail;
+ }
ErrorF("\n");
commit bd713794ceaa1b2890522554562103c0a2d50f04
Author: Alan Coopersmith <alan.coopersmith at sun.com>
Date: Thu Feb 12 18:23:59 2009 -0800
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 at sun.com>
diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index 953af45..a70b1d6 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -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;
}
}
More information about the xorg-commit
mailing list