summaryrefslogtreecommitdiffstats
path: root/usr.bin/tail/reverse.c
Commit message (Collapse)AuthorAgeFilesLines
* MFC r311160, r311210, r311288, r311292, r311298, r311340asomers2017-02-021-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r311160: misc minor fixes in mpr(4) sys/dev/mpr/mpr_sas.c * Fix a potential null pointer dereference (CID 1305731) * Check for overrun of the ccb_scsiio.cdb_io.cdb_bytes buffer (CID 1211934) sys/dev/mpr/mpr_sas_lsi.c * Nullify a dangling pointer in mprsas_get_sata_identify * Fix a memory leak in mprsas_SSU_to_SATA_devices (CID 1211935) Reported by: Coverity (partially) CID: 1305731 1211934 1211935 Reviewed by: slm MFC after: 4 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D8880 r311210: Quell Coverity for diskinfo(8) * CID 1198994: Don't run the speed disk on a disk with no sectors * CID 1011442: Don't call close(2) if open(2) fails * CID 1011161: Use snprintf instead of sprintf * CID 1009825: Check the return value of lseek Reported by: Coverity CID: 1198994 1011442 1011161 1009825 MFC after: 4 weeks Sponsored by: Spectra Logic Corp r311288: Delete dead code in chat(8) It's always been dead, ever since first import in 1994. It's still dead in OpenBSD's version, too. Reported by: Coverity CID: 270586 MFC after: 4 weeks Sponsored by: Spectra Logic Corp r311292: Remove dead code in rpc_parse.c It's been dead ever since it was imported from TI-RPC in 1995. The dead code is still present in Illumos today, but was removed from NetBSD in 2006. Reported by: Coverity CID: 270097 Obtained from: NetBSD MFC after: 4 weeks Sponsored by: Spectra Logic Corp r311298: Remove dead code in dhclient(8) The offending code has been dead ever since the import from OpenBSD in r195805. OpenBSD later deleted that entire function. Reported by: Coverity CID: 500059 MFC after: 4 weeks Sponsored by: Spectra Logic Corp r311340: Misc Coverity fixes for tail(1) CID 1006402: Initialize stack variable CID 271580: Don't leak memory when ENOMEM. Reported by: Coverity CID: 271580 1006402 MFC after: 4 weeks Sponsored by: Spectra Logic Corp
* Remove the advertising clause from UCB copyrighted files in usr.bin. Thisjoel2010-12-111-4/+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
* Change the behaviour of -F slightly; it now persists (forever) inbrian2009-06-051-14/+14
| | | | | | | | | | | | | | | | | | trying to open files rather than giving up when it encounters an error. ENOENT errors are not reported. As a result, files that are moved away then recreated are not at risk of being 'lost' to tail. Files that are recreated and temporarily have unreadable permissions will be shown when they are fixed. This behaviour is consistent with the GNU version of tail but without the verbiage that goes with the GNU version. This change also fixes error messages accompanying -f and -F. They no longer report problems with (null)! MFC after: 3 weeks
* initialize variables, WARNS=6 compliantcharnier2007-11-021-0/+1
|
* Don't skip the initialisation of tl->len when we hit an EOF immediatelyiedowse2005-03-201-3/+2
| | | | | | after allocating a new buffer. This bug caused `tail -r < /dev/null' to core dump when the `J' malloc option is set, and also affected any other input that was an exact multiple of 128k.
* Cast size_t to off_t before adding them to avoid warnings on the alpha.dwmalone2005-01-101-2/+4
| | | | Use %ld and intmax_t for printing an off_t.
* Convert to ANSI style function definitions.paul2004-11-031-12/+3
|
* Fix up vendor IDs.dwmalone2002-04-131-7/+10
| | | | Put a sequence point between writing to a variable and using it.
* GCC 3.1 cleanup - add a break after default: at the end of a switchmurray2002-04-081-0/+1
| | | | statement.
* remove __Pimp2002-03-221-2/+2
|
* WARNS=2 fixes, use __FBSDID().markm2001-12-121-8/+10
|
* File positions are off_t nowdays, not long, so:ache2001-09-011-3/+3
| | | | | | | | | | | long -> off_t strtol -> strtoll fseek -> fseeko NOTE: that fseek not works for >long offsets files per POSIX: [EOVERFLOW] For fseek( ), the resulting file offset would be a value which cannot be represented correctly in an object of type long.
* Fix tail to work on files bigger than 2GB.dwmalone2001-03-271-29/+49
| | | | | PR: 14786 Reviewed by: iedowse
* Remove register keyword usage with prejudice.asmodai2000-12-031-7/+7
| | | | | Modern compilers are smarter when it comes to allocating register usage.
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Fixed printf format errors.bde1998-07-061-2/+2
|
* Remove trailing \n in warn() string.charnier1997-08-131-1/+5
|
* Sweep through the tree fixing mmap() usage:alex1997-01-161-1/+1
| | | | | | | | | | | | - Use MAP_FAILED instead of the constant -1 to indicate failure (required by POSIX). - Removed flag arguments of '0' (required by POSIX). - Fixed code which expected an error return of 0. - Fixed code which thought any address with the high bit set was an error. - Check for failure where no checks were present. Discussed with: bde
* complete err() changes, actually use warn() in most instancesadam1996-08-261-5/+4
|
* Dont forget to #include <err.h>peter1996-08-251-0/+1
|
* Argh! caught! *blush*.. This program was supplying it's own 'err' routinepeter1996-08-251-4/+5
| | | | | which was slightly different to the libc one. To save any more cunfusion, use the libc one.
* when file can be opened for read but cannot be read from:adam1996-07-301-0/+5
| | | | | | | fail once (was twice) in forward case fail once (was no times) in reverse case this can happen when file is a directory on an NFS or procfs mount.
* BSD 4.4 Lite Usr.bin Sourcesrgrimes1994-05-271-0/+259
OpenPOWER on IntegriCloud