| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
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().
|
|
|
|
|
| |
PR: 6421
Submitted by: phk
|
|
|
|
| |
posix standard on the topic.
|
|
|
|
| |
like in who, rwho, w, etc.
|
|
|
|
| |
Closes PR bin/1909: 'last' coredumps if MALLOC_OPTIONS...
|
| |
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
| |
which is no longer bogusly installed in /usr/include.
|
|
|