#
3c37828e |
| 09-Oct-2024 |
Dag-Erling Smørgrav <des@FreeBSD.org> |
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: K
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
show more ...
|
#
d350e8d7 |
| 09-Oct-2024 |
Dag-Erling Smørgrav <des@FreeBSD.org> |
cmp: Style and type issues.
MFC after: 3 days Sponsored by: Klara, Inc. Reviewed by: 0mp, markj Differential Revision: https://reviews.freebsd.org/D47019
|
Revision tags: release/13.4.0, release/14.1.0, release/13.3.0 |
|
#
0b8224d1 |
| 24-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove copyright strings ifdef'd out
We've ifdef'd out the copyright strings for some time now. Go ahead and remove the ifdefs. Plus whatever other detritis was left over from other recent removals.
Remove copyright strings ifdef'd out
We've ifdef'd out the copyright strings for some time now. Go ahead and remove the ifdefs. Plus whatever other detritis was left over from other recent removals. These copyright strings are present in the comments and are largely from CSRG's attempt at adding their copyright to every binary file (which modern interpretations of the license doesn't require).
Sponsored by: Netflix
show more ...
|
#
bdcbfde3 |
| 23-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
usr.bin: Remove ancient SCCS tags.
Remove ancient SCCS tags from the tree, automated scripting, with two minor fixup to keep things compiling. All the common forms in the tree were removed with a pe
usr.bin: Remove ancient SCCS tags.
Remove ancient SCCS tags from the tree, automated scripting, with two minor fixup to keep things compiling. All the common forms in the tree were removed with a perl script.
Sponsored by: Netflix
show more ...
|
Revision tags: release/14.0.0 |
|
#
1d386b48 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
#
498a0a9c |
| 07-Jul-2023 |
Alfonso Gregory <gfunni234@gmail.com> |
Mark usage function as __dead2 in programs where it does not return
In most cases, usage does not return, so mark them as __dead2. For the cases where they do return, they have not been marked __dea
Mark usage function as __dead2 in programs where it does not return
In most cases, usage does not return, so mark them as __dead2. For the cases where they do return, they have not been marked __dead2.
Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/735
show more ...
|
Revision tags: release/13.2.0 |
|
#
6673a547 |
| 31-Jan-2023 |
Dag-Erling Smørgrav <des@FreeBSD.org> |
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 |
|
#
f1f7f313 |
| 21-Oct-2021 |
Kyle Evans <kevans@FreeBSD.org> |
cmp: initialize limit to avoid stack garbage limits
Pointy hat: kevans Fixes: 4e380e847460 ("cmp: add -n, --bytes to limit number of bytes [...]") Sponsored by: Klara, Inc.
|
#
f66b9b40 |
| 23-Sep-2021 |
Kyle Evans <kevans@FreeBSD.org> |
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
|
#
8d546b68 |
| 23-Sep-2021 |
Kyle Evans <kevans@FreeBSD.org> |
cmp: add -i, --ignore-initial, an alternative to skip1/skip2 args
This is compatible with GNU cmp.
Reviewed by: markj Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D3
cmp: add -i, --ignore-initial, an alternative to skip1/skip2 args
This is compatible with GNU cmp.
Reviewed by: markj Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D32073
show more ...
|
#
4e380e84 |
| 23-Sep-2021 |
Kyle Evans <kevans@FreeBSD.org> |
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
|
#
f6787614 |
| 23-Sep-2021 |
Kyle Evans <kevans@FreeBSD.org> |
cmp: accept SI suffixes for skip1 and skip2
This is compatible with GNU cmp.
Reviewed by: bapt (earlier version), markj, imp Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd
cmp: accept SI suffixes for skip1 and skip2
This is compatible with GNU cmp.
Reviewed by: bapt (earlier version), markj, imp Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D32071
show more ...
|
Revision tags: release/13.0.0 |
|
#
80445b7a |
| 11-Jan-2021 |
Ed Maste <emaste@FreeBSD.org> |
cmp: fix -s (silent) when used with skip offsets
-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 f
cmp: fix -s (silent) when used with skip offsets
-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
show more ...
|
#
1f766174 |
| 11-Jan-2021 |
Ed Maste <emaste@FreeBSD.org> |
cmp: use C99 bool for flags
MFC after: 1 week Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28072
|
Revision tags: release/12.2.0, release/11.4.0, release/12.1.0, release/11.3.0 |
|
#
b18a4cca |
| 05-Mar-2019 |
Enji Cooper <ngie@FreeBSD.org> |
MFhead@r344786
|
#
844fc3e9 |
| 04-Mar-2019 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r344549 through r344775.
|
#
2528b7e2 |
| 25-Feb-2019 |
Mark Johnston <markj@FreeBSD.org> |
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 ...
|
#
88148a07 |
| 22-Jan-2019 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r343202 through r343319.
|
#
33a28349 |
| 21-Jan-2019 |
Mark Johnston <markj@FreeBSD.org> |
Revert r343117.
It breaks the special mode specified by passing "-" as one of the input files. Revert for now while we discuss a fix.
PR: 234885 Reported by: delphij MFC after: now
|
#
e6de40fa |
| 17-Jan-2019 |
Mark Johnston <markj@FreeBSD.org> |
Fix handling of rights on stdio streams.
- Limit rights on stdio before opening input files. Otherwise, open() may return one of the standard descriptors and we end up limiting rights such that
Fix handling of rights on stdio streams.
- Limit rights on stdio before opening input files. Otherwise, open() may return one of the standard descriptors and we end up limiting rights such that we cannot read from one of the input files. - Use caph_limit_stdio(), which suppresses EBADF, to ensure that we don't emit an error if one of the stdio streams is closed. - Don't bother further limiting rights on stdin when stdin isn't going to be used. Doing so correctly requires checking for a number of edge cases, and it doesn't provide any significant benefit.
PR: 234885 Reviewed by: oshogbo MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D18860
show more ...
|
Revision tags: release/12.0.0 |
|
#
c06e7b66 |
| 07-Nov-2018 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r340126 through r340212.
|
#
377421df |
| 04-Nov-2018 |
Mariusz Zaborski <oshogbo@FreeBSD.org> |
capsicum: use a new capsicum helpers in tools
Use caph_{rights,ioctls,fcntls}_limit to simplify the code.
|
Revision tags: release/11.2.0 |
|
#
7672a014 |
| 20-Jun-2018 |
Mariusz Zaborski <oshogbo@FreeBSD.org> |
Convert `cap_enter() < 0 && errno != ENOSYS` to `caph_enter() < 0`.
No functional change intended.
|
#
8facfdcf |
| 02-May-2018 |
Kyle Evans <kevans@FreeBSD.org> |
cmp(1): Provide some long options
These match GNU cmp(1) for compatibility where applicable.
Future work might implement the -i option from GNU cmp(1) to express skip either in terms of both files
cmp(1): Provide some long options
These match GNU cmp(1) for compatibility where applicable.
Future work might implement the -i option from GNU cmp(1) to express skip either in terms of both files or of the form "SKIP1:SKIP2" rather than specifying them as additional arguments to cmp(1).
MFC after: 1 month
show more ...
|
#
82725ba9 |
| 23-Nov-2017 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
Merge ^/head r325999 through r326131.
|