summaryrefslogtreecommitdiff
path: root/hw/xfree86/common/xf86Configure.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@sun.com>2009-02-12 18:34:22 -0800
committerAlan Coopersmith <alan.coopersmith@sun.com>2009-02-12 18:34:22 -0800
commitac470dfb4fadaa0b28b6f8b57f4f13a20842b897 (patch)
tree5c38368ec98babc65da5260158d1e21339319d1b /hw/xfree86/common/xf86Configure.c
parentbd713794ceaa1b2890522554562103c0a2d50f04 (diff)
Check for and report errors writing xorg.conf.new from Xorg -configure
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Diffstat (limited to 'hw/xfree86/common/xf86Configure.c')
-rw-r--r--hw/xfree86/common/xf86Configure.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/hw/xfree86/common/xf86Configure.c b/hw/xfree86/common/xf86Configure.c
index b803b4910..1f1ff677c 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");