History log of /freebsd-14.2/usr.bin/cmp/regular.c (Results 1 – 25 of 31)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: release/13.4.0-p5, release/13.5.0-p1, release/14.2.0-p3, release/13.5.0, release/14.2.0-p2, release/14.1.0-p8, release/13.4.0-p4, release/14.1.0-p7, release/14.2.0-p1, release/13.4.0-p3, release/14.2.0
# 02a8a4e4 09-Oct-2024 Dag-Erling Smørgrav <[email protected]>

cmp: Style and type issues.

MFC after: 3 days
Sponsored by: Klara, Inc.
Reviewed by: 0mp, markj
Differential Revision: https://reviews.freebsd.org/D47019

(cherry picked from commit d350e8d795d53dbc

cmp: Style and type issues.

MFC after: 3 days
Sponsored by: Klara, Inc.
Reviewed by: 0mp, markj
Differential Revision: https://reviews.freebsd.org/D47019

(cherry picked from commit d350e8d795d53dbc58ea428f76355cf5e28f6116)

cmp: Check the status of stdout.

POSIX requires us to print an error message and exit non-zero if
writing to stdout fails. This can only happen if sflag is unset.

MFC after: 3 days
Sponsored by: Klara, Inc.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D47020

(cherry picked from commit 3c37828ee1874754e1c5e96268016113c1e02ba2)

show more ...


Revision tags: release/13.4.0, release/14.1.0, release/13.3.0, release/14.0.0
# 1d386b48 16-Aug-2023 Warner Losh <[email protected]>

Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


Revision tags: release/13.2.0
# 6673a547 31-Jan-2023 Dag-Erling Smørgrav <[email protected]>

cmp: Print a summary on SIGINFO.

MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D38280


Revision tags: release/12.4.0, release/13.1.0, release/12.3.0
# f66b9b40 23-Sep-2021 Kyle Evans <[email protected]>

cmp: add -b, --print-bytes

This is compatible with GNU cmp.

Reviewed by: bapt, markj (earlier version)
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D32074


# 4e380e84 23-Sep-2021 Kyle Evans <[email protected]>

cmp: add -n, --bytes to limit number of bytes to compare

This is compatible with GNU cmp.

Reviewed by: markj
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D32072


Revision tags: release/13.0.0, release/12.2.0, release/11.4.0, release/12.1.0, release/11.3.0
# 2528b7e2 25-Feb-2019 Mark Johnston <[email protected]>

Fix handling of rights on stdio streams, take two.

Split the rights-limiting code into two cases: if one of the input
files isn't a regular file, use caph_limit_stream(3) instead of
open-coding the

Fix handling of rights on stdio streams, take two.

Split the rights-limiting code into two cases: if one of the input
files isn't a regular file, use caph_limit_stream(3) instead of
open-coding the same logic; if both input files are regular files,
and the initial attempts to map them succeed, we limit the rights on
those files to CAP_MMAP_R.

Add a regression test for PR 234885.

PR: 234885
Reviewed by: delphij
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D19216

show more ...


Revision tags: release/12.0.0, release/11.2.0
# 8a16b7a1 20-Nov-2017 Pedro F. Giffuni <[email protected]>

General further adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 3-Clause license.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier f

General further adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 3-Clause license.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.

show more ...


Revision tags: release/10.4.0, release/11.1.0
# fbbd9655 28-Feb-2017 Warner Losh <[email protected]>

Renumber copyright clause 4

Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is

Renumber copyright clause 4

Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is too pedantic, so give up on that point.

Submitted by: Jan Schaumann <[email protected]>
Pull Request: https://github.com/freebsd/freebsd/pull/96

show more ...


Revision tags: release/11.0.1, release/11.0.0, release/10.3.0, release/10.2.0, release/10.1.0, release/9.3.0, release/10.0.0, release/9.2.0, release/8.4.0, release/9.1.0, release/8.3.0_cvs, release/8.3.0, release/9.0.0
# 71024a97 21-Jun-2011 Xin LI <[email protected]>

Eliminate unneeded headers.


Revision tags: release/7.4.0_cvs, release/8.2.0_cvs, release/7.4.0, release/8.2.0
# da52b4ca 11-Dec-2010 Joel Dahl <[email protected]>

Remove the advertising clause from UCB copyrighted files in usr.bin. This
is in accordance with the information provided at
ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change

Also add $F

Remove the advertising clause from UCB copyrighted files in usr.bin. This
is in accordance with the information provided at
ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change

Also add $FreeBSD$ to a few files to keep svn happy.

Discussed with: imp, rwatson

show more ...


Revision tags: release/8.1.0_cvs, release/8.1.0, release/7.3.0_cvs, release/7.3.0
# 821df508 13-Dec-2009 Xin LI <[email protected]>

Revert most part of 200420 as requested, as more review and polish is
needed.


# 6f2d3221 11-Dec-2009 Xin LI <[email protected]>

Remove unneeded header includes from usr.bin/ except contributed code.

Tested with: make universe


Revision tags: release/8.0.0_cvs, release/8.0.0, release/7.2.0_cvs, release/7.2.0, release/7.1.0_cvs, release/7.1.0, release/6.4.0_cvs, release/6.4.0
# dd999839 10-Jul-2008 Philippe Charnier <[email protected]>

add __unused to succeed at WARNS=6


Revision tags: release/7.0.0_cvs, release/7.0.0, release/6.3.0_cvs, release/6.3.0, release/6.2.0_cvs, release/6.2.0, release/5.5.0_cvs, release/5.5.0, release/6.1.0_cvs, release/6.1.0, release/6.0.0_cvs, release/6.0.0, release/5.4.0_cvs, release/5.4.0, release/4.11.0_cvs, release/4.11.0, release/5.3.0_cvs, release/5.3.0, release/4.10.0_cvs, release/4.10.0, release/5.2.1_cvs, release/5.2.1, release/5.2.0_cvs, release/5.2.0, release/4.9.0_cvs, release/4.9.0, release/5.1.0_cvs, release/5.1.0, release/4.8.0_cvs, release/4.8.0
# d4890512 26-Feb-2003 David Schultz <[email protected]>

The cmp utility has the questionable feature of using mmap when
comparing regular files. Add a SIGSEGV handler to make its
behavior less surprising when a read error occurs. The handler
does not at

The cmp utility has the questionable feature of using mmap when
comparing regular files. Add a SIGSEGV handler to make its
behavior less surprising when a read error occurs. The handler
does not attempt to distinguish errors from file truncation, but
anyone actively modifying a file while trying to compare it
shouldn't even expect something sane to happen.

PR: 45391
Reviewed by: mike (mentor)

show more ...


Revision tags: release/5.0.0_cvs, release/5.0.0, release/4.7.0_cvs, release/4.6.2_cvs, release/4.6.2
# f2e8e0da 28-Jul-2002 David Malone <[email protected]>

ANSIify function definitions to avoid a warning.


Revision tags: release/4.6.1, release/4.6.0_cvs
# f1bb2cd2 22-Mar-2002 Warner Losh <[email protected]>

remove __P


Revision tags: release/4.5.0_cvs, release/4.4.0_cvs
# 9f5b04e9 10-Dec-2001 David Malone <[email protected]>

Style improvements recommended by Bruce as a follow up to some
of the recent WARNS commits. The idea is:

1) FreeBSD id tags should follow vendor tags.
2) Vendor tags should not be compiled (though c

Style improvements recommended by Bruce as a follow up to some
of the recent WARNS commits. The idea is:

1) FreeBSD id tags should follow vendor tags.
2) Vendor tags should not be compiled (though copyrights probably should).
3) There should be no blank line between including cdefs and __FBSDIF.

show more ...


# 5748d9ba 03-Dec-2001 David Malone <[email protected]>

Cast off_t to long long before printing. Use %ll instead of %q incase
long long and quad_t are not the same.


# 6af414cb 02-Dec-2001 Mark Murray <[email protected]>

Turn on WARNS=2.
Use __FBSDID().


# c5250ed1 05-Nov-2001 David Malone <[email protected]>

Make filenames const to avoid a few warnings.
Add FreeBSD tags.

Reviewed by: cmp


# 60b49f05 04-Nov-2001 David Malone <[email protected]>

Make cmp work by mmapping chunks of a file, rather than the whole
file at one time.

PR: 24732
Submitted by: Andrew L. Neporada <[email protected]>
MFC after: 2 weeks


Revision tags: release/4.3.0_cvs, release/4.3.0, release/4.2.0, release/4.1.1_cvs, release/4.1.0, release/3.5.0_cvs
# 84ad3d8f 20-Jun-2000 Brian Feldman <[email protected]>

Make cmp -s work properly if skip values are given. Also, exit(1)
is now exit(DIFF_EXIT).

PR: 18597
Submitted by: Anatoly Vorobey <[email protected]>
Committed at: Usenix terminal room


# 78cb0ab4 15-May-2000 Poul-Henning Kamp <[email protected]>

Oops, byte offset was as off_t.


# e03983a3 15-May-2000 Poul-Henning Kamp <[email protected]>

Let cmp(1) grow in -x option to print differences in contemporarry hex
format rather than the mixed decimal/octal format of -l.


Revision tags: release/4.0.0_cvs, release/3.4.0_cvs, release/3.3.0_cvs
# ac022265 29-Jul-1999 Brian Feldman <[email protected]>

Fix improper mmap length paramater which can result in improper behavior
or cmp crashing in specific cases.


12