From 1b8d837cd0ec9c0a81748bb66085d2297aab7e52 Mon Sep 17 00:00:00 2001 From: Murray Stokely Date: Thu, 19 Jun 2003 07:24:26 +0000 Subject: phk added the -x option in May 2000, but only for regular files; for special files it was treated like -l. This commit adds the -x option in for special files as well. PR: bin/46249 Submitted by: Colin Percival --- usr.bin/cmp/special.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'usr.bin/cmp') diff --git a/usr.bin/cmp/special.c b/usr.bin/cmp/special.c index 754013bf60b9..bbe3cb10fa81 100644 --- a/usr.bin/cmp/special.c +++ b/usr.bin/cmp/special.c @@ -77,7 +77,11 @@ c_special(int fd1, const char *file1, off_t skip1, if (ch1 == EOF || ch2 == EOF) break; if (ch1 != ch2) { - if (lflag) { + if (xflag) { + dfound = 1; + (void)printf("%08llx %02x %02x\n", + (long long)byte - 1, ch1, ch2); + } else if (lflag) { dfound = 1; (void)printf("%6lld %3o %3o\n", (long long)byte, ch1, ch2); -- cgit v1.2.3