Subject: Re: [bug-diffutils] bug#19509: [PATCH] diff: treat fifos as identical

From: Ondřej Svoboda <[email-masked]>
Date: Thu, 12 Feb 2015 00:29:03 +0100

Hello Paul,

may I ask you to review this little patch (and its successor that I will 
be also bumping shortly)?

Thank you! :-)

Regards,
Ondra Svoboda

On 4.1.2015 22:05, Ondřej Svoboda wrote:
> (Continuation of the previous patch; may I ask the good people of the 
> list to review both?)
>
> This avoids unwanted "differences" like
>
>   File dev1/fifo1 is a fifo while file dev2/fifo1 is a fifo
> ---
>  src/diff.c | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/src/diff.c b/src/diff.c
> index a3e1b6f..cf2c62a 100644
> --- a/src/diff.c
> +++ b/src/diff.c
> @@ -1299,6 +1299,11 @@ compare_files (struct comparison const *parent,
>            status = EXIT_FAILURE;
>          }
>      }
> +      else if (S_ISFIFO (cmp.file[0].stat.st_mode)
> +               && S_ISFIFO (cmp.file[0].stat.st_mode))
> +    {
> +      /* Both are fifos.  */
> +    }
>        else
>      {
>        /* We have two files that are not to be compared.  */