bug-diffutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-diffutils] bug#19509: bug#19509: [PATCH] diff: treat fifos as ident


From: Ondřej Svoboda
Subject: [bug-diffutils] bug#19509: bug#19509: [PATCH] diff: treat fifos as identical
Date: Thu, 12 Feb 2015 00:29:03 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

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.  */






reply via email to

[Prev in Thread] Current Thread [Next in Thread]