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>
This commit is contained in:
parent
862cbf4c87
commit
6dcb73375e
2
os/log.c
2
os/log.c
|
@ -218,7 +218,7 @@ LogFilePrep(const char *fname, const char *backup, const char *idstring)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (remove(logFileName) != 0) {
|
if (remove(logFileName) != 0 && errno != ENOENT) {
|
||||||
FatalError("Cannot remove old log file \"%s\": %s\n",
|
FatalError("Cannot remove old log file \"%s\": %s\n",
|
||||||
logFileName, strerror(errno));
|
logFileName, strerror(errno));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue