| author | Alan Coopersmith <alan.coopersmith@sun.com> | 2009-02-13 02:34:22 (GMT) |
|---|---|---|
| committer | Alan Coopersmith <alan.coopersmith@sun.com> | 2009-02-13 02:34:22 (GMT) |
| commit | ac470dfb4fadaa0b28b6f8b57f4f13a20842b897 (patch) (side-by-side diff) | |
| tree | 5c38368ec98babc65da5260158d1e21339319d1b | |
| parent | bd713794ceaa1b2890522554562103c0a2d50f04 (diff) | |
| download | xserver-ac470dfb4fadaa0b28b6f8b57f4f13a20842b897.zip xserver-ac470dfb4fadaa0b28b6f8b57f4f13a20842b897.tar.gz | |
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 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"); |
