Home | History | Annotate | only in /src/usr.bin/last
History log of /src/usr.bin/last
RevisionDateAuthorComments
 1.7 19-Nov-2004  christos use sockaddr_snprintf()
 1.6 17-Feb-2003  christos Add wtmpx support.
 1.5 19-Oct-1997  lukem don't define WARNS=1 here
 1.4 24-Aug-1997  kleink * Fix compiler warnings
* Style: lseek(2) L_SET vs. SEEK_SET; getopt(3) EOF vs. -1
 1.3 21-Dec-1994  jtc Merged with 4.4lite.
Changed to conform to NetBSD's new RCS Id convention.
 1.2 31-Jul-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 21-Dec-1994  jtc imported from 44lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.20 12-May-2012  reed Change or add history. I checked the 1bsd archives and this first
appeared in 1BSD (before it was known as 1BSD). I looked at code and
later sccs history to confirm. In the case of rewritten code, we are
not consistent in manpages indicating that history.
 1.19 19-Oct-2011  reed branches: 1.19.2;
patch from from Snader_LB via IRC.

- mention "The following options are available:"

- improve grammar

- provide useful tip about -x
 1.18 27-Jul-2007  reed branches: 1.18.16;
Add lastlogin(8) to see also.
 1.17 27-Dec-2006  pooka support reading wtmp/wtmpx from stdin with -f -

from bin/35329 by David A. Holland
 1.16 05-Mar-2005  wiz Remove trailing whitespace, and use .Sq instead of manual quoting.
 1.15 04-Mar-2005  christos PR/26934: Curt Sampson: Add -x flag to process wtmpx files that don't end
in `x'.
 1.14 11-Nov-2004  wiz Options without arguments are combined in SYNOPSIS; new sentence, new line.
 1.13 11-Nov-2004  christos Add -n flag to print numeric entries.
 1.12 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.11 03-Mar-2003  wiz Bump date. Sort options, sort SEE ALSO.
 1.10 17-Feb-2003  christos Add wtmpx support.
 1.9 30-Sep-2002  grant New sentence, new line.
 1.8 21-Aug-2001  simonb Include -T in the synopsis.
 1.7 25-Jun-2000  simonb Extend the -T option show that it shows the year as well as seconds.
Also print the full time on interrupt and exit, regardless of the
-T setting. Replace all uses of asctime()/ctime() and magic number
offsets within their return strings with strftime().

Fixes PR bin/5311 from Geoff Wing and much more.
 1.6 22-Mar-1999  garbled branches: 1.6.10;
More and more .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Many more to
come.
 1.5 19-Oct-1997  lukem fix up .Nm usage
 1.4 17-Jul-1997  perry add -T option to display seconds, from jhawk in pr-1548
 1.3 21-Dec-1994  jtc Merged with 4.4lite.
Changed to conform to NetBSD's new RCS Id convention.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 21-Dec-1994  jtc imported from 44lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.6.10.2 30-Sep-2001  he Pull up revision 1.8 (requested by simonb):
Include ``-T'' in the synopsis.
 1.6.10.1 26-Jun-2000  simonb Pull up rev 1.7:
Extend the -T option show that it shows the year as well as seconds.
Also print the full time on interrupt and exit, regardless of the
-T setting. Replace all uses of asctime()/ctime() and magic number
offsets within their return strings with strftime().

Fixes PR bin/5311 from Geoff Wing and much more.
 1.18.16.2 27-Jul-2007  reed Add lastlogin(8) to see also.
 1.18.16.1 27-Jul-2007  reed file last.1 was added on branch matt-mips64 on 2007-07-27 16:59:26 +0000
 1.19.2.1 23-May-2012  yamt sync with head.
 1.36 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.35 16-Sep-2011  joerg branches: 1.35.2;
Use __dead
 1.34 05-Jun-2010  dholland Avoid SIGSEGV on out-of-range time_t.
 1.33 12-Apr-2009  lukem Fix WARNS=4 issues (-Wshadow -Wcast-qual -Wsign-compare)
 1.32 21-Jul-2008  lukem branches: 1.32.6;
Remove the \n and tabs from the __COPYRIGHT() strings.
Tweak to use a consistent format.
 1.31 05-Oct-2007  lukem branches: 1.31.8;
Convert to raise_default_signal(3).
 1.30 06-Jan-2007  cbiere branches: 1.30.4;
- Use EXIT_SUCCESS/EXIT_FAILURE instead of 0/1.
- Reject unreasonable command-line arguments.
- No need to cast sizeof() to u_int for malloc().
- ttyconv: Simplified and replaced magic '5'.
 1.29 22-Jan-2006  christos restructure as a single level if/then/elif/else
 1.28 22-Jan-2006  martin Do not access out of bounds argv when mixing non-getopt -<digit> arguments
with regular getopt-handled options.
Fixes PR bin/32596.
 1.27 14-Mar-2005  christos Remove extra ; found by gcc-2.95 and reported in port-vax.
 1.26 04-Mar-2005  christos PR/26934: Curt Sampson: Add -x flag to process wtmpx files that don't end
in `x'.
 1.25 19-Nov-2004  christos use sockaddr_snprintf()
 1.24 11-Nov-2004  wiz Add -n to usage.
 1.23 11-Nov-2004  christos Add -n flag to print numeric entries.
 1.22 05-Jan-2004  jmmv Homogenize usage messages: make the 'usage' word all lowercase, as this seems
to be the most common practice in our tree.
 1.21 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.20 14-Jul-2003  itojun use bounded string op/asprintf
 1.19 07-Jul-2003  wiz Fix typo in error message.
 1.18 03-Mar-2003  wiz Sync usage with options; sort option string; handle N instead of
non-existing U option.
 1.17 28-Feb-2003  matt #undef TYPE(a) is not legal. Change to #undef TYPE /*(a)*/
 1.16 17-Feb-2003  christos Add wtmpx support.
 1.15 30-Jun-2000  simonb Fix botch in previous - include the day of the month in the output!
Noticed by Geoff Wing.
 1.14 25-Jun-2000  simonb Extend the -T option show that it shows the year as well as seconds.
Also print the full time on interrupt and exit, regardless of the
-T setting. Replace all uses of asctime()/ctime() and magic number
offsets within their return strings with strftime().

Fixes PR bin/5311 from Geoff Wing and much more.
 1.13 14-Apr-2000  simonb branches: 1.13.4;
Don't declare 'extern opt*' getopt variables.
 1.12 19-Dec-1998  christos Avoid bogus warnings produced by gcc-2.8.1 where it wants field widths to be
ints and copmplains if they are unsigned ints!
 1.11 25-Aug-1998  ross Add { and } to shut up egcs. Reformat the more questionable code.
 1.10 06-Jul-1998  mrg - use an array MAXHOSTNAMELEN+1 size to hold hostnames
- ensure hostname from gethostname() is nul-terminated in all cases
- minor KNF
- use MAXHOSTNAMELEN over various other values/defines
- be safe will buffers that hold hostnames
 1.9 26-Aug-1997  thorpej Change an instance of a time_t to a (more appropriate) off_t, PR #4037,
enami tsugutomo.
 1.8 24-Aug-1997  kleink * Fix compiler warnings
* Style: lseek(2) L_SET vs. SEEK_SET; getopt(3) EOF vs. -1
 1.7 17-Jul-1997  perry add -T option to display seconds, from jhawk in pr-1548
 1.6 24-Dec-1994  cgd be more careful with time_t's
 1.5 21-Dec-1994  jtc Merged with 4.4lite.
Changed to conform to NetBSD's new RCS Id convention.
 1.4 01-Apr-1994  cgd bad cast
 1.3 28-Mar-1994  cgd another lseek extern!
 1.2 01-Aug-1993  mycroft Add RCS identifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 21-Dec-1994  jtc imported from 44lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.13.4.2 30-Jun-2000  simonb Pull up rev 1.15:
Fix mistake in previous - include the day of the month in the output.
 1.13.4.1 26-Jun-2000  simonb Pull up rev 1.14:
Extend the -T option show that it shows the year as well as seconds.
Also print the full time on interrupt and exit, regardless of the
-T setting. Replace all uses of asctime()/ctime() and magic number
offsets within their return strings with strftime().

Fixes PR bin/5311 from Geoff Wing and much more.
 1.30.4.1 06-Nov-2007  matt sync with HEAD
 1.31.8.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.32.6.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.35.2.1 17-Apr-2012  yamt sync with head
 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