diff options
author | Alan Coopersmith <alan.coopersmith@sun.com> | 2009-02-12 18:34:22 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@sun.com> | 2009-02-12 18:34:22 -0800 |
commit | ac470dfb4fadaa0b28b6f8b57f4f13a20842b897 (patch) | |
tree | 5c38368ec98babc65da5260158d1e21339319d1b | |
parent | bd713794ceaa1b2890522554562103c0a2d50f04 (diff) |
Check for and report errors writing xorg.conf.new from Xorg -configure
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
-rw-r--r-- | hw/xfree86/common/xf86Configure.c | 12 |
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" |