mirror of
https://github.com/opnsense/src.git
synced 2026-02-13 07:44:48 -05:00
-s causes cmp to print nothing for differing files, for use when only
the exit status is of interest.
-z compares the file size first, for regular files, and fails the
comparison early if they do not match.
Prior to this change -s implied -z as an optimization, but this is not
valid when file offsets are specified. Now, enable the -z optimization
for -s only if both skip arguments are not provided / 0.
Note that using -z with differing skip values will currently always
fail. We may want to compare size1 - skip1 with size2 - skip2 instaead,
and in any case the man page should be clarified.
PR: 252542
Fixes:
|
||
|---|---|---|
| .. | ||
| tests | ||
| cmp.1 | ||
| cmp.c | ||
| extern.h | ||
| link.c | ||
| Makefile | ||
| Makefile.depend | ||
| misc.c | ||
| regular.c | ||
| special.c | ||