summaryrefslogtreecommitdiff
path: root/usr.bin/diff/diff.c
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2004-03-16 00:40:35 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2004-03-16 00:40:35 +0000
commit5158e01d42b380c30ab5e2d29d8b053c2e336cb2 (patch)
treef872d2d0057bdfc57245bfda76f7280be81b324d /usr.bin/diff/diff.c
parent170a06b52be749493e3b2375fe154d810b3aa5f1 (diff)
POSIX specifies that in directory mode device special files and
FIFOs shall be skipped. Other types of files may be skipped too (this is implementation-dependent). In directory mode, just skip anything that is not a regular file or directory. OK tedu@
Diffstat (limited to 'usr.bin/diff/diff.c')
-rw-r--r--usr.bin/diff/diff.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/usr.bin/diff/diff.c b/usr.bin/diff/diff.c
index 7ad00106cae..134cb37c0f3 100644
--- a/usr.bin/diff/diff.c
+++ b/usr.bin/diff/diff.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: diff.c,v 1.44 2004/01/07 17:18:32 otto Exp $ */
+/* $OpenBSD: diff.c,v 1.45 2004/03/16 00:40:34 millert Exp $ */
/*
* Copyright (c) 2003 Todd C. Miller <Todd.Miller@courtesan.com>
@@ -21,7 +21,7 @@
*/
#ifndef lint
-static const char rcsid[] = "$OpenBSD: diff.c,v 1.44 2004/01/07 17:18:32 otto Exp $";
+static const char rcsid[] = "$OpenBSD: diff.c,v 1.45 2004/03/16 00:40:34 millert Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -385,6 +385,14 @@ print_status(int val, char *path1, char *path2, char *entry)
printf("File %s%s is a regular file while file %s%s is a directory\n",
path1, entry ? entry : "", path2, entry ? entry : "");
break;
+ case D_SKIPPED1:
+ printf("File %s%s is not a regular file or directory and was skipped\n",
+ path1, entry ? entry : "");
+ break;
+ case D_SKIPPED2:
+ printf("File %s%s is not a regular file or directory and was skipped\n",
+ path2, entry ? entry : "");
+ break;
}
}