summaryrefslogtreecommitdiff
path: root/os
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2016-01-06 10:03:23 -0500
committerAdam Jackson <ajax@redhat.com>2016-01-27 09:53:38 -0500
commitf7da9e4cd8237795cea4c0cf82148bdd18ec0f92 (patch)
tree402f5cd3fc5289d746cfb2470ff9dcfd9aee35b8 /os
parent4dfb05aaae9dc7a45294f60ebd3ad454a4707966 (diff)
os: Failure to remove a non-existent log file is not an error
Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> (cherry picked from commit 6dcb73375e0ce389315d55587623eb84e9d13543)
Diffstat (limited to 'os')
-rw-r--r--os/log.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/os/log.c b/os/log.c
index 6168d59bd..91e55a532 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));
}