<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/usr.bin/cmp/cmp.c, branch releng/13.3</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=releng%2F13.3</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=releng%2F13.3'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2023-08-23T17:43:26Z</updated>
<entry>
<title>Remove $FreeBSD$: one-line .c pattern</title>
<updated>2023-08-23T17:43:26Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-22T01:31:41Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=3d497e17ebd33fe0f58d773e35ab994d750258d6'/>
<id>urn:sha1:3d497e17ebd33fe0f58d773e35ab994d750258d6</id>
<content type='text'>
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/

Similar commit in main:
(cherry picked from commit 1d386b48a555)
</content>
</entry>
<entry>
<title>cmp: Print a summary on SIGINFO.</title>
<updated>2023-02-09T20:32:56Z</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2023-01-31T00:28:47Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=54117b169fba3ed04e30b467d0d209ef398a9c26'/>
<id>urn:sha1:54117b169fba3ed04e30b467d0d209ef398a9c26</id>
<content type='text'>
MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D38280

(cherry picked from commit 6673a5476d029cd5b47b2eed27032211a14f52bd)

cmp: Increase buffer size for non-mmap case.

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

(cherry picked from commit 134841a7f3e5516a83732d40a4d42268c901a492)
</content>
</entry>
<entry>
<title>cmp: initialize limit to avoid stack garbage limits</title>
<updated>2021-10-23T19:01:00Z</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2021-10-21T16:30:55Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=b6aec78847501c4f7a79552651991e0842ecaec3'/>
<id>urn:sha1:b6aec78847501c4f7a79552651991e0842ecaec3</id>
<content type='text'>
Pointy hat:	kevans
Fixes:	4e380e847460 ("cmp: add -n, --bytes to limit number of bytes [...]")
Sponsored by:	Klara, Inc.

(cherry picked from commit f1f7f31366e5830f4f5b96c6394a0b91475744f4)
</content>
</entry>
<entry>
<title>cmp: add -b, --print-bytes</title>
<updated>2021-10-03T05:15:12Z</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2021-09-23T05:46:30Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=6a1ef178d86a62a5377496ade866ea31bbfc6ec0'/>
<id>urn:sha1:6a1ef178d86a62a5377496ade866ea31bbfc6ec0</id>
<content type='text'>
This is compatible with GNU cmp.

Reviewed by:	bapt, markj (earlier version)
Sponsored by:	Klara, Inc.

(cherry picked from commit f66b9b40f403f7c30fec3c4ceed93c6e8fafa8ac)
</content>
</entry>
<entry>
<title>cmp: add -i, --ignore-initial, an alternative to skip1/skip2 args</title>
<updated>2021-10-03T05:15:08Z</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2021-09-23T05:43:32Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=0ab72f80ab69888e69821e996d52180f02158105'/>
<id>urn:sha1:0ab72f80ab69888e69821e996d52180f02158105</id>
<content type='text'>
This is compatible with GNU cmp.

Reviewed by:	markj
Sponsored by:	Klara, Inc.

(cherry picked from commit 8d546b6832eea031f95f30eaec3232ec1256a281)
</content>
</entry>
<entry>
<title>cmp: add -n, --bytes to limit number of bytes to compare</title>
<updated>2021-10-03T05:15:05Z</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2021-09-23T05:26:52Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=1159a71ad777dbcabd8d62afb8de2b85e0ee975b'/>
<id>urn:sha1:1159a71ad777dbcabd8d62afb8de2b85e0ee975b</id>
<content type='text'>
This is compatible with GNU cmp.

Reviewed by:	markj
Sponsored by:	Klara, Inc.

(cherry picked from commit 4e380e8474609875c4cf5277b3755ac29079a8b5)
</content>
</entry>
<entry>
<title>cmp: accept SI suffixes for skip1 and skip2</title>
<updated>2021-10-03T05:15:01Z</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2021-09-23T05:17:07Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=5d3ac4ddf9db8a42968d31f11a8b18cdc198b4ff'/>
<id>urn:sha1:5d3ac4ddf9db8a42968d31f11a8b18cdc198b4ff</id>
<content type='text'>
This is compatible with GNU cmp.

Reviewed by:	bapt (earlier version), markj, imp
Sponsored by:	Klara, Inc.

(cherry picked from commit f6787614fd4db2a9d5e649af0e819852ebd5a19d)
</content>
</entry>
<entry>
<title>cmp: fix -s (silent) when used with skip offsets</title>
<updated>2021-01-11T00:02:56Z</updated>
<author>
<name>Ed Maste</name>
<email>emaste@FreeBSD.org</email>
</author>
<published>2021-01-11T00:02:56Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=80445b7a3f738e0b0a33ee7a11905a275346a6de'/>
<id>urn:sha1:80445b7a3f738e0b0a33ee7a11905a275346a6de</id>
<content type='text'>
-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:		3e6902efc802ab57fc4e9bf798f2d271b152e7f9
Reported by:	William Ahern
Reviewed by:	markj
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D28071
</content>
</entry>
<entry>
<title>cmp: use C99 bool for flags</title>
<updated>2021-01-11T00:02:55Z</updated>
<author>
<name>Ed Maste</name>
<email>emaste@FreeBSD.org</email>
</author>
<published>2021-01-11T00:02:55Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=1f7661742de650bcb6b9124ee3da7e94c8650c4b'/>
<id>urn:sha1:1f7661742de650bcb6b9124ee3da7e94c8650c4b</id>
<content type='text'>
MFC after:	1 week
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D28072
</content>
</entry>
<entry>
<title>Fix handling of rights on stdio streams, take two.</title>
<updated>2019-02-25T19:47:27Z</updated>
<author>
<name>Mark Johnston</name>
<email>markj@FreeBSD.org</email>
</author>
<published>2019-02-25T19:47:27Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=2528b7e2cb5c0d6fe0ad020dd80a1573d02a6240'/>
<id>urn:sha1:2528b7e2cb5c0d6fe0ad020dd80a1573d02a6240</id>
<content type='text'>
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
</content>
</entry>
</feed>
