HomeFreeBSD

MFC r327567: hexdump(1): Speed up -s flag on devices

Description

MFC r327567: hexdump(1): Speed up -s flag on devices

Using the -s flag on devices is extraordinarily slow due to using fseek(3) a
little too conservatively. Address this by using fseek on character/block
devices as well, falling back to getchar(3) only if we fail to seek or we're
operating on tape drives, where fseek may succeed while not actually being
supported.

PR: 86485

Details

Provenance
kevansAuthored on
Parents
rS328148: MFC r326084: patch(1): don't assume match if we run out of context to check
Branches
Unknown
Tags
Unknown