summaryrefslogtreecommitdiffstats
path: root/usr.bin/diff/diffreg.c
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2003-07-06 22:17:21 +0000
committermillert <millert@openbsd.org>2003-07-06 22:17:21 +0000
commitcab5d83c9d6e6ab1ee51c5ad293daabd8930d5f9 (patch)
tree5b72060b1a052866dd3bc0c01135f6a5e66c1444 /usr.bin/diff/diffreg.c
parentprotos (diff)
downloadwireguard-openbsd-cab5d83c9d6e6ab1ee51c5ad293daabd8930d5f9.tar.xz
wireguard-openbsd-cab5d83c9d6e6ab1ee51c5ad293daabd8930d5f9.zip
Add -q option from GNU diff
Diffstat (limited to 'usr.bin/diff/diffreg.c')
-rw-r--r--usr.bin/diff/diffreg.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.bin/diff/diffreg.c b/usr.bin/diff/diffreg.c
index 3a5852125e5..4e15c6b8ac1 100644
--- a/usr.bin/diff/diffreg.c
+++ b/usr.bin/diff/diffreg.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: diffreg.c,v 1.27 2003/07/06 20:48:59 millert Exp $ */
+/* $OpenBSD: diffreg.c,v 1.28 2003/07/06 22:17:21 millert Exp $ */
/*
* Copyright (C) Caldera International Inc. 2001-2002.
@@ -65,7 +65,7 @@
*/
#ifndef lint
-static const char rcsid[] = "$OpenBSD: diffreg.c,v 1.27 2003/07/06 20:48:59 millert Exp $";
+static const char rcsid[] = "$OpenBSD: diffreg.c,v 1.28 2003/07/06 22:17:21 millert Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -340,6 +340,10 @@ notsame:
* Files certainly differ at this point; set status accordingly
*/
status |= 1;
+ if (format == D_BRIEF) {
+ printf("Files %s and %s differ\n", file1, file2);
+ goto closem;
+ }
if (flags & D_HEADER) {
if (format == D_EDIT)
printf("ed - %s << '-*-END-*-'\n", basename(file1));