tail(1): fix misbehaviour on pseudo filesystems
authorDaniel Fojt <df@neosystem.org>
Wed, 17 Jun 2020 06:56:17 +0000 (08:56 +0200)
committerDaniel Fojt <df@neosystem.org>
Wed, 17 Jun 2020 07:31:10 +0000 (09:31 +0200)
commitd02fa88ed6cf8165d3e835121e374d0879737631
treeb1f478bb247121b05a9753f022e244a66fbf4611
parent81002e79937bb55687c3e60fc4f07b4b0c83da4a
tail(1): fix misbehaviour on pseudo filesystems

When processing regular zero-sized files, use display_lines() instead of
rlines(). This fixes tail(1) behaviour with files on pseudo filesystems
(like procfs) which are often reported to have zero size while having
a content.

Issue: https://bugs.dragonflybsd.org/issues/3034
usr.bin/tail/forward.c