summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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
@@ -730,13 +730,17 @@ 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 */
xf86ConfigFile = filename;
if (xf86HandleConfigFile(FALSE) != CONFIG_OK) {
goto bail;
@@ -826,13 +830,17 @@ DoConfigure(void)
xf86config->conf_monitor_lst = (XF86ConfMonitorPtr)xf86addListItem(
(glp)xf86config->conf_monitor_lst, (glp)MonitorPtr);
xf86config->conf_screen_lst = (XF86ConfScreenPtr)xf86addListItem(
(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");
#ifdef __SCO__
ErrorF("\n"__XSERVERNAME__
" is using the kernel event driver to access the mouse.\n"