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

Michel Dänzer michel at daenzer.net
Wed Jan 6 17:47:28 PST 2016


On 07.01.2016 00:03, 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));
>          }
> 

This fixes make check for me, thanks Adam!


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer


More information about the xorg-devel mailing list