[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-diffutils] bug#19509: [PATCH] diff: treat fifos as identical
From: |
Ondřej Svoboda |
Subject: |
[bug-diffutils] bug#19509: [PATCH] diff: treat fifos as identical |
Date: |
Sun, 04 Jan 2015 22:05:17 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 |
(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. */
--
2.2.1
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [bug-diffutils] bug#19509: [PATCH] diff: treat fifos as identical,
Ondřej Svoboda <=