Home | History | Annotate | Download | only in last
History log of /src/usr.bin/last/want.c
RevisionDateAuthorComments
 1.17  15-Mar-2012  dholland Tidy up: we no longer need FIRSTVALID for its original purpose, so change
the name of the symbol to something that applies to the remaining use.
 1.16  15-Mar-2012  dholland When the wtmp file is empty, for the "wtmp[x] begins..." output, use
the last mod time of the wtmp file (in practice, the time it was last
rotated, which is when it begins) instead of the current time, which
wasn't ever particularly useful. PR 39444.
 1.15  15-Mar-2012  dholland Keep track of the timestamp of the last (thus oldest) record seen and use
it to print "wtmp[x] begins" at the end, instead of knowing where to look
in the final utmp buffer to get a final timestamp out. This is both tidier
and fixes a problem with wtmpx files, which is that if the header record
is missing (which it seems to be on my machines) it would fetch the wrong
time out, and if you happened to have a one-record wtmp file it would use
the current time instead. This change restores the traditional behavior
of printing the time of the oldest record in the file, and if no records
are present to use the current time.

It might be a bug that wtmpx files don't seem to have the header
record they supposedly ought to.
 1.14  16-Sep-2011  joerg branches: 1.14.2; 1.14.4;
Use __dead
 1.13  12-Apr-2009  lukem Fix WARNS=4 issues (-Wshadow -Wcast-qual -Wsign-compare)
 1.12  29-Dec-2008  christos branches: 1.12.2;
fix time format.
 1.11  05-Oct-2007  lukem branches: 1.11.12;
Convert to raise_default_signal(3).
 1.10  06-Jan-2007  cbiere branches: 1.10.4;
Respect the environment variable TMPDIR if set.
 1.9  06-Jan-2007  cbiere Pointing before a memory object is not proper C. Use an index instead of
pointer arithmetic.
 1.8  06-Jan-2007  cbiere - Applied patch by David Holland from PR bin/35354.
- Use EXIT_SUCCESS/EXIT_FAILURE instead of 0/1.
- Additional check for regular file.
- Use pread() instead of lseek() + read().
- Check for partial read to prevent out-of-bounds memory access.
- Added FIXME to onintr(): This is no proper signal handler albeit might
not really matter here.
 1.7  27-Dec-2006  pooka support reading wtmp/wtmpx from stdin with -f -

from bin/35329 by David A. Holland
 1.6  28-Feb-2006  ginsbach Code indentation fix up.
 1.5  04-Mar-2005  christos PR/23409: Geoff C. Wing: make sure we only print nul terminated strings.
 1.4  19-Nov-2004  christos use sockaddr_snprintf()
 1.3  11-Nov-2004  christos Add -n flag to print numeric entries.
 1.2  07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22365, verified by myself.
 1.1  17-Feb-2003  christos Add wtmpx support.
 1.10.4.1  06-Nov-2007  matt sync with HEAD
 1.11.12.1  15-Mar-2012  sborrill Pull up the following revisions(s) (requested by dholland in ticket #1744):
usr.bin/last/want.c: revision 1.15-1.16

Keep track of the timestamp of the last (thus oldest) record seen and use
it to print "wtmp[x] begins" at the end. When the wtmp file is empty, use
the last mod time of the wtmp file. Fixes PR/39444.
 1.12.2.1  13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.14.4.1  15-Mar-2012  sborrill Pull up the following revisions(s) (requested by dholland in ticket #117):
usr.bin/last/want.c: revision 1.15-116

Keep track of the timestamp of the last (thus oldest) record seen and use
it to print "wtmp[x] begins" at the end. When the wtmp file is empty, use
the last mod time of the wtmp file. Fixes PR/39444.
 1.14.2.1  17-Apr-2012  yamt sync with head

RSS XML Feed