[PATCH xserver] os: Failure to remove a non-existent log file is not an error

Adam Jackson ajax at redhat.com
Wed Jan 6 07:03:23 PST 2016


Signed-off-by: Adam Jackson <ajax at redhat.com>
---
 os/log.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/os/log.c b/os/log.c
index 6168d59..91e55a5 100644
--- a/os/log.c
+++ b/os/log.c
@@ -218,7 +218,7 @@ LogFilePrep(const char *fname, const char *backup, const char *idstring)
         }
     }
     else {
-        if (remove(logFileName) != 0) {
+        if (remove(logFileName) != 0 && errno != ENOENT) {
             FatalError("Cannot remove old log file \"%s\": %s\n",
                        logFileName, strerror(errno));
         }
-- 
2.5.0



More information about the xorg-devel mailing list