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

Alan Coopersmith alan.coopersmith at oracle.com
Wed Jan 6 08:11:54 PST 2016


On 01/ 6/16 07:03 AM, Adam Jackson wrote:
> 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));
>           }
>

Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>

-- 
	-Alan Coopersmith-              alan.coopersmith at oracle.com
	 Oracle Solaris Engineering - http://blogs.oracle.com/alanc


More information about the xorg-devel mailing list