summaryrefslogtreecommitdiffstats
path: root/usr.bin/cmp
Commit message (Collapse)AuthorAgeFilesLines
* MFC r311572, r311895, r311928, r311985, r312395, r312417asomers2017-02-283-0/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r311572: Fix file descriptor leaks in cmp(1) Also, add a few test cases Reported by: Coverity CID: 271624 275338 Reviewed by: ngie MFC after: 4 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D9074 r311895: Fix memory leaks during "tail -r" of an irregular file * Rewrite r_buf to use standard tail queues instead of a hand-rolled circular linked list. Free dynamic allocations when done. * Remove an optimization for the case where the file is a multiple of 128KB in size and there is a scarcity of memory. * Add ATF tests for "tail -r" and its variants. Reported by: Valgrind Reviewed by: ngie MFC after: 4 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D9067 r311928: Fix build of usr.bin/tail with GCC Submitted by: pluknet Reported by: pluknet MFC after: 27 days X-MFC-with: 311895 Sponsored by: Spectra Logic Corp r311985: Fix uninitialized variable CIDs in route6d The variables in question are actually return arguments, but it's still good form to initialize them. Reported by: Coverity CID: 979679 979680 MFC after: 4 weeks Sponsored by: Spectra Logic Corp r312395: Fix several Coverity CIDs in devd CID 1362055, 1362054: File descriptor leaks during shutdown CID 1362013: Potential null-termination fail with long network device names CID 1362097: Uncaught exception during memory pressure CID 1362017, 1362016: Unchecked errors, possibly resulting in weird behavior if two devd instances start at the same time. CID 1362015: Unchecked error that will probably never fail Reported by: Coverity CID: 1362055 1362054 1362013 1362097 1362017 1362016 1362015 MFC after: 4 weeks Sponsored by: Spectra Logic Corp r312417: Fix build of devd with GCC 4.2 Reported by: olivier Pointy-hat-to: asomers MFC after: 27 days X-MFC-with: 312395 Sponsored by: Spectra Logic Corp
* Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installedngie2016-05-041-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | after r298107 Summary of changes: - Replace all instances of FILES/TESTS with ${PACKAGE}FILES. This ensures that namespacing is kept with FILES appropriately, and that this shouldn't need to be repeated if the namespace changes -- only the definition of PACKAGE needs to be changed - Allow PACKAGE to be overridden by callers instead of forcing it to always be `tests`. In the event we get to the point where things can be split up enough in the base system, it would make more sense to group the tests with the blocks they're a part of, e.g. byacc with byacc-tests, etc - Remove PACKAGE definitions where possible, i.e. where FILES wasn't used previously. - Remove unnecessary TESTSPACKAGE definitions; this has been elided into bsd.tests.mk - Remove unnecessary BINDIRs used previously with ${PACKAGE}FILES; ${PACKAGE}FILESDIR is now automatically defined in bsd.test.mk. - Fix installation of files under data/ subdirectories in lib/libc/tests/hash and lib/libc/tests/net/getaddrinfo - Remove unnecessary .include <bsd.own.mk>s (some opportunistic cleanup) Document the proposed changes in share/examples/tests/tests/... via examples so it's clear that ${PACKAGES}FILES is the suggested way forward in terms of replacing FILES. share/mk/bsd.README didn't seem like the appropriate method of communicating that info. MFC after: never probably X-MFC with: r298107 PR: 209114 Relnotes: yes Tested with: buildworld, installworld, checkworld; buildworld, packageworld Sponsored by: EMC / Isilon Storage Division
* MFHgjb2016-03-101-0/+11
|\ | | | | | | Sponsored by: The FreeBSD Foundation
| * DIRDEPS_BUILD: Connect MK_TESTS.bdrewery2016-03-091-0/+11
| | | | | | | | Sponsored by: EMC / Isilon Storage Division
* | First pass to fix the 'tests' packages.gjb2016-02-021-0/+4
|/ | | | Sponsored by: The FreeBSD Foundation
* Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) andngie2015-10-121-6/+3
| | | | | | | | | | | | netbsd-tests.test.mk (r289151) - Eliminate explicit OBJTOP/SRCTOP setting - Convert all ad hoc NetBSD test integration over to netbsd-tests.test.mk - Remove unnecessary TESTSDIR setting - Use SRCTOP where possible for clarity MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Divison
* Add META_MODE support.sjg2015-06-131-0/+18
|\ | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp
| * dirdeps.mk now sets DEP_RELDIRsjg2015-06-081-2/+0
| |
| * Merge from head@274682sjg2014-11-192-0/+18
| |\ | |/ |/|
| * Updated dependenciessjg2014-05-161-1/+0
| |
| * Updated dependenciessjg2014-05-101-0/+2
| |
| * Merge headsjg2014-04-281-1/+7
| |\
| * | Updated dependenciessjg2013-03-111-0/+1
| | |
| * | Updated dependenciessjg2013-02-161-2/+0
| | |
| * | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.marcel2012-08-221-0/+19
| | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net>
* | | Integrate usr.bin/cmp/tests from NetBSD into atf/kyuangie2014-10-092-0/+18
| |/ |/| | | | | | | In collaboration with: sjg Sponsored by: EMC / Isilon Storage Division
* | Bump .Dd for recent changeeadler2013-11-181-1/+1
| |
* | Indicate which options are extensions to POSIX.eadler2013-11-181-0/+6
|/ | | | Inspired by: DragonFlyBSD
* Add missing static keywords to cmp(1)ed2011-11-061-1/+1
|
* Eliminate unneeded headers.delphij2011-06-212-3/+0
|
* Remove the advertising clause from UCB copyrighted files in usr.bin. Thisjoel2010-12-116-24/+0
| | | | | | | | | 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
* Revert most part of 200420 as requested, as more review and polish isdelphij2009-12-132-0/+3
| | | | needed.
* Remove unneeded header includes from usr.bin/ except contributed code.delphij2009-12-112-3/+0
| | | | Tested with: make universe
* add __unused to succeed at WARNS=6charnier2008-07-101-1/+1
|
* Refine markup and add the EXIT STATUS section where appropriate.ru2006-12-191-4/+4
|
* -mdoc sweep.ru2005-11-181-2/+2
|
* Add a -h option to tell cmp not to follow symbolic links.brian2005-08-235-7/+123
| | | | | MFC after: 3 weeks Sponsored by: Sophos/ActiveState
* phk added the -x option in May 2000, but only for regular files; formurray2003-06-191-1/+5
| | | | | | | | special files it was treated like -l. This commit adds the -x option in for special files as well. PR: bin/46249 Submitted by: Colin Percival <cperciva@sfu.ca>
* The cmp utility has the questionable feature of using mmap whendas2003-02-261-0/+21
| | | | | | | | | | | 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)
* Fix typos, mostly s/ an / a / where appropriate and a few s/an/and/schweikh2002-12-301-1/+1
| | | | Add FreeBSD Id tag where missing.
* ANSIify function definitions to avoid a warning.dwmalone2002-07-284-21/+9
|
* No need to check for "-" explicitly in getopt() loop.tjr2002-06-071-5/+1
|
* Exit >1 when an error occurs, regardless of whether -s is specified (SUSv3)tjr2002-06-071-4/+4
|
* remove __Pimp2002-03-223-6/+6
|
* Remove leaf node WARNS?=2 (that mainly I added). This shouldmarkm2002-02-081-1/+0
| | | | help the GCC3 transition and CURRENT in general.
* Style improvements recommended by Bruce as a follow up to somedwmalone2001-12-105-21/+25
| | | | | | | | 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.
* Cast off_t to long long before printing. Use %ll instead of %q incasedwmalone2001-12-033-5/+8
| | | | long long and quad_t are not the same.
* Turn on WARNS=2.markm2001-12-025-17/+22
| | | | Use __FBSDID().
* Make filenames const to avoid a few warnings.dwmalone2001-11-055-9/+15
| | | | | | Add FreeBSD tags. Reviewed by: cmp
* Don't use gcc -Wall flag. Add FreeBSD: line.dwmalone2001-11-051-1/+1
|
* Make cmp work by mmapping chunks of a file, rather than the wholedwmalone2001-11-041-14/+52
| | | | | | | | file at one time. PR: 24732 Submitted by: Andrew L. Neporada <andr@dgap.mipt.ru> MFC after: 2 weeks
* Remove whitespace at EOL.dd2001-07-151-2/+2
|
* mdoc(7) police: use the new features of the Nm macro.ru2000-11-201-7/+7
|
* Fix a bug introduced in rev 1.8, where special files ended upsheldonh2000-07-251-1/+2
| | | | | | being treated like regular files because of missing braces. PR: 20143
* Add the -z flag to check file sizes firstbrian2000-07-142-5/+19
| | | | | | | Correct the cmp.1 usage message Correct the -l/-s incompatibility message Submitted by: Mark Knight <markk@knigma.org>
* Make cmp -s work properly if skip values are given. Also, exit(1)green2000-06-201-3/+3
| | | | | | | | is now exit(DIFF_EXIT). PR: 18597 Submitted by: Anatoly Vorobey <mellon@pobox.com> Committed at: Usenix terminal room
* Oops, byte offset was as off_t.phk2000-05-151-1/+1
|
* Let cmp(1) grow in -x option to print differences in contemporarry hexphk2000-05-154-4/+25
| | | | format rather than the mixed decimal/octal format of -l.
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Fix improper mmap length paramater which can result in improper behaviorgreen1999-07-291-7/+9
| | | | or cmp crashing in specific cases.
OpenPOWER on IntegriCloud