aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/last
Commit message (Collapse)AuthorAgeFilesLines
* Use `The .Nm utility'Philippe Charnier2002-04-201-6/+8
| | | | Notes: svn path=/head/; revision=95124
* remove __PWarner Losh2002-03-221-10/+10
| | | | Notes: svn path=/head/; revision=92920
* Add a new "-y" flag which causes the year to be included in theIan Dowse2002-03-012-5/+13
| | | | | | | | | | | | | session start time. This is useful when looking at old or long-running wtmp files. PR: bin/12982 Obtained from: KOJIMA Hajime <kjm@rins.ryukoku.ac.jp>, keramida Reviewed by: keramida MFC after: 1 week Notes: svn path=/head/; revision=91541
* Oops, unbreak the -d and -<n> options. The `snapfound' variableIan Dowse2002-03-011-11/+5
| | | | | | | | | needs to be retained across entries, and we need to exit(), not return from doentry() when `maxrec' reaches 0. Move the code for processing `maxrec' into printentry() for simplicity. Notes: svn path=/head/; revision=91538
* Split up the big wtmp() function to avoid long lines and codeIan Dowse2002-03-011-151/+153
| | | | | | | duplication. Notes: svn path=/head/; revision=91536
* Remove leaf node WARNS?=2 (that mainly I added). This shouldMark Murray2002-02-081-1/+0
| | | | | | | help the GCC3 transition and CURRENT in general. Notes: svn path=/head/; revision=90415
* I've been meaning to do this for a while. Add an underscore to theMatthew Dillon2002-01-191-6/+6
| | | | | | | | | | | time_to_xxx() and xxx_to_time() functions. e.g. _time_to_xxx() instead of time_to_xxx(), to make it more obvious that these are stopgap functions & placemarkers and not meant to create a defacto standard. They will eventually be replaced when a real standard comes out of committee. Notes: svn path=/head/; revision=89572
* localtime() was being called on an int pointer (due to recentMatthew Dillon2001-10-291-6/+13
| | | | | | | utmp-related commits). fixed. Notes: svn path=/head/; revision=85648
* Document -d in usage.Dima Dorfman2001-08-051-1/+2
| | | | | | | Submitted by: Martin Kammerhofer <mkamm@sbox.tu-graz.ac.at> Notes: svn path=/head/; revision=81161
* mdoc(7) police: removed HISTORY info from the .Os call.Ruslan Ermilov2001-07-101-1/+1
| | | | Notes: svn path=/head/; revision=79535
* mdoc(7) police: add missing .Ar in SYNOPSIS.Ruslan Ermilov2001-07-051-1/+1
| | | | Notes: svn path=/head/; revision=79275
* Silence warnings and minor style fixes. Mostly constify and don'tDima Dorfman2001-06-142-10/+14
| | | | | | | | | assume that time_t is a long. Clamp down with WARNS=2. Not objected to by: -audit Notes: svn path=/head/; revision=78201
* The last(1) choked if there were two successive "login" marksRuslan Ermilov2001-05-281-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | found in wtmp(5) for the same TTY without in-between "logout" mark. This may be demonstrated by executing login(1), logging in and out, and watching the last(1) output on this TTY: : # last -tv7 -w : ru ttyv7 Mon May 28 12:46 - 12:46 (00:00:01) : ru ttyv7 Mon May 28 12:45 still logged in The fix merely takes the second "login" mark as the "logout" for the first "login" mark, if there were no "logout" mark in-between. This restores the behavior of last.c,v 1.2: : # last -tv7 -w : ru ttyv7 Mon May 28 12:46 - 12:46 (00:00:01) : ru ttyv7 Mon May 28 12:45 - 12:46 (00:00:25) Silence from: -arch, dg Notes: svn path=/head/; revision=77328
* Implement snapshots. The new -d option allows the user to find outDima Dorfman2001-05-282-73/+248
| | | | | | | | | who was logged in at a certain time and date. Obtained from: OpenBSD Notes: svn path=/head/; revision=77291
* mdoc(7) police: remove hard sentence breaks.Dima Dorfman2001-04-261-3/+6
| | | | Notes: svn path=/head/; revision=76014
* Don't attempt to parse %cAndrey A. Chernov2001-03-211-17/+33
| | | | Notes: svn path=/head/; revision=74588
* Used macro-API to <sys/queue.h>.Poul-Henning Kamp2000-12-291-13/+13
| | | | | | | Submitted by: ben Notes: svn path=/head/; revision=70467
* mdoc(7) police: use the new features of the Nm macro.Ruslan Ermilov2000-11-201-6/+6
| | | | Notes: svn path=/head/; revision=68963
* getopt and friends are declared in <unistd.h>Warner Losh2000-09-041-2/+0
| | | | | | | getopt returns -1 not EOF. Notes: svn path=/head/; revision=65428
* Don't call printf with no format string.Kris Kennaway2000-07-101-1/+1
| | | | Notes: svn path=/head/; revision=62871
* Back out the previous change to the queue(3) interface.Jake Burkholder2000-05-261-2/+2
| | | | | | | | | It was not discussed and should probably not happen. Requested by: msmith and others Notes: svn path=/head/; revision=60938
* Change the way that the queue(3) structures are declared; don't assume thatJake Burkholder2000-05-231-2/+4
| | | | | | | | | | | the type argument to *_HEAD and *_ENTRY is a struct. Suggested by: phk Reviewed by: phk Approved by: mdodd Notes: svn path=/head/; revision=60833
* Remove single-space hard sentence breaks. These degrade the qualitySheldon Hearn2000-03-011-2/+4
| | | | | | | | of the typeset output, tend to make diffs harder to read and provide bad examples for new-comers to mdoc. Notes: svn path=/head/; revision=57670
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50477
* Add $Id$, to make it simpler for members of the translation teams toNik Clayton1999-07-121-0/+1
| | | | | | | | | | | | | | | | | | | | track. The $Id$ line is normally at the bottom of the main comment block in the man page, separated from the rest of the manpage by an empty comment, like so; .\" $Id$ .\" If the immediately preceding comment is a @(#) format ID marker than the the $Id$ will line up underneath it with no intervening blank lines. Otherwise, an additional blank line is inserted. Approved by: bde Notes: svn path=/head/; revision=48792
* Reviewed by: Peter Hawkins <thepish@FreeBSD.org>Daniel O'Callaghan1998-05-282-18/+47
| | | | | | | Add s and w flags to show duration in or with seconds. Notes: svn path=/head/; revision=36434
* Change variable from long to time_t where they are passed by referenceJohn Birrell1998-05-151-2/+3
| | | | | | | to time(). Notes: svn path=/head/; revision=36062
* Add the year to the 'wtmp begins...' line.Steve Price1998-05-031-2/+2
| | | | | | | | PR: 6421 Submitted by: phk Notes: svn path=/head/; revision=35658
* compare return value from getopt against -1 rather than EOF, per the finalWarner Losh1997-03-291-1/+1
| | | | | | | posix standard on the topic. Notes: svn path=/head/; revision=24360
* Remove one space to produce the same output alignmentAndrey A. Chernov1996-12-051-3/+3
| | | | | | | like in who, rwho, w, etc. Notes: svn path=/head/; revision=20158
* Don't dereference a free()ed pointer.Joerg Wunsch1996-10-281-3/+5
| | | | | | | Closes PR bin/1909: 'last' coredumps if MALLOC_OPTIONS... Notes: svn path=/head/; revision=19223
* Localize timeAndrey A. Chernov1996-06-171-14/+27
| | | | Notes: svn path=/head/; revision=16438
* Fixed a bug that caused last(1) to be extremely slow in some cases, andDavid Greenman1995-10-172-83/+83
| | | | | | | | | | | | made other performance improving changes. This improves the performance of last(1) by as much as 32 times in some cases, and in more typical cases is about twice as fast. Added a BUGS section to the manual page to describe the behavior of last(1) when a login shell terminates abnormally (and thus doesn't write a logout record to the wtmp file). Notes: svn path=/head/; revision=11547
* Delete bogus referneces to timezone code internal header file `tzfile.h',Garrett Wollman1995-08-071-3/+2
| | | | | | | which is no longer bogusly installed in /usr/include. Notes: svn path=/head/; revision=9987
* BSD 4.4 Lite Usr.bin SourcesRodney W. Grimes1994-05-273-0/+548
Notes: svn path=/cvs2svn/branches/CHRISTOS/; revision=1590