| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Unbreak "last reboot".
According to the last(1) man page, the "reboot" pseudo-user should print
all system reboot entries. This got broken by the utmpx import, as
records are typed.
Re-add support for "last reboot" by specifically matching against
SHUTDOWN_TIME and BOOT_TIME records.
PR: 168844
Submitted by: matthew@
|
|
|
|
|
|
|
| |
PR: docs/171624
Submitted by: bdrewery
Approved by: gabor
MFC after: 3 days
|
|
|
|
| |
This code requires none of the features of LIST.
|
|
|
|
|
|
|
|
| |
- A real filename is now shown in an output report when "-f file" is specified.
- Add Xr lastlogin into last(1) manual page.
Reviewed by: ed
MFC after: 1 week
|
| |
|
|
|
|
|
| |
These ports were only built with WARNS=1, because they use certain
format extensions. We can use NO_WFORMAT for that instead.
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
I removed utmp and its manpage, but not other manpages referring to it.
|
|
|
|
|
|
|
|
|
|
|
|
| |
I must have misread when I ported the original last(1) source code.
Instead of only processing the last 1024 entries, it reads them in in
chucks of 1024 entries at a time.
Unfortunately we cannot walk through the log file in reverse order,
which means we have to allocate a piece of memory to hold all the
entries. Call realloc() for each 128 entries we read.
Reported by: Andrzej Tobola <ato iem pw edu pl>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Basically there are three major things I changed about last(1):
- It should use ut_type instead of determining by hand what type of
record was given.
- It should now keep track of ut_id's instead of TTYs. This means the
ttylist has been renamed to the idlist, storing all the ut_id's it has
processed until the next reboot.
- I've removed the signal handler. Because our wtmp is rotated so often,
it makes little sense. Even on a simple piece of hardware it should be
capable of grinding through megabytes of logs in a second.
|
|
|
|
| |
Also add some missing $FreeBSD$ to keep svn happy.
|
| |
|
| |
|
|
|
|
| |
Submitted by: Xin LI <delphij@frontfree.net>
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
System V and consistency with other utilities. Document the new form
instead of the old form in the manual page.
PR: 54661
|
|
|
|
|
|
| |
PR: bin/44583
Reported by: Amit Chakradeo <sdbug@spam.chakradeo.net>
MFC after: 3 days
|
|
|
|
|
|
|
|
|
| |
Add some constness to avoid some warnings.
Remove use register keyword.
Deal with missing/unneeded extern/prototypes.
Some minor type changes/casts to avoid warnings.
Reviewed by: md5
|
|
|
|
|
|
| |
Use .Pa for wtmp.
Submitted by: horikawa
|
| |
|
|
|
|
|
|
|
| |
using sizeof() anyway. Use slightly more consistent (per-file) error
reporting for malloc(3) returning NULL. If "malloc failed" was being printed,
don't use err(3). If a NULL format is being used, use err(3). In one case
errx(3) was being used with strerror(3), so just use err(3).
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
duplication.
|
|
|
|
| |
help the GCC3 transition and CURRENT in general.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
utmp-related commits). fixed.
|
|
|
|
| |
Submitted by: Martin Kammerhofer <mkamm@sbox.tu-graz.ac.at>
|
| |
|
| |
|
|
|
|
|
|
| |
assume that time_t is a long. Clamp down with WARNS=2.
Not objected to by: -audit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
who was logged in at a certain time and date.
Obtained from: OpenBSD
|
| |
|
| |
|
|
|
|
| |
Submitted by: ben
|
| |
|
|
|
|
| |
getopt returns -1 not EOF.
|
| |
|
|
|
|
|
|
| |
It was not discussed and should probably not happen.
Requested by: msmith and others
|
|
|
|
|
|
|
|
| |
the type argument to *_HEAD and *_ENTRY is a struct.
Suggested by: phk
Reviewed by: phk
Approved by: mdodd
|
|
|
|
|
| |
of the typeset output, tend to make diffs harder to read and provide
bad examples for new-comers to mdoc.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Add s and w flags to show duration in or with seconds.
|
|
|
|
| |
to time().
|