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". How-To-Repeat: mkdir dir1 dir2 ln -s /dev/random dir1/a ln -s /dev/zero dir2/a diff -qr dir1 dir2
BSD diff in HEAD does not emit the somewhat confusing error message, and as described in the man page just skips the devices. % man diff | grep -A2 'directory mode' directory are described as such. In directory mode only regular files and directories are compared. If a non-regular file such as a device special file or FIFO is encountered, a diagnostic message is printed. % diff -qr dir1 dir2 File dir1/a is not a regular file or directory and was skipped
For bugs matching the following conditions: - Status == In Progress - Assignee == "bugs@FreeBSD.org" - Last Modified Year <= 2017 Do - Set Status to "Open"
GNU diff removed and replaced in base r315051