gnu/170624: diff -qr produces incorrect output

Lachlan Kang LCRTRIfFu91c710azO2Y at
Tue Aug 14 02:50:13 UTC 2012

>Number:         170624
>Category:       gnu
>Synopsis:       diff -qr produces incorrect output
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Aug 14 02:50:12 UTC 2012
>Originator:     Lachlan Kang
>Release:        FreeBSD 9.0-RELEASE
FreeBSD  9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan  3 07:15:25 UTC 2012     root at  i386
diff(1) produces incorrect output when recursively comparing folders that contains links to different character devices.

Given the following directories and links:
dir1/a -> /dev/random
dir2/a -> /dev/zero
"diff -qr dir1 dir2" prints "File dir1/a is a character special file while file dir2/a is a character special file".
It should print "Files dir1/a and dir2/a differ".
mkdir dir1 dir2
ln -s /dev/random dir1/a
ln -s /dev/zero dir2/a
diff -qr dir1 dir2


More information about the freebsd-bugs mailing list