GNU bug report logs -
#19509
[PATCH] diff: treat fifos as identical
Previous Next
Reported by: Ondřej Svoboda <ondrej <at> svobodasoft.cz>
Date: Sun, 4 Jan 2015 21:24:03 UTC
Severity: normal
Tags: notabug, patch
Done: Jim Meyering <jim <at> meyering.net>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 19509 <at> debbugs.gnu.org (full text, mbox):
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. */
This bug report was last modified 8 years and 14 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.