History log of /freebsd-current/usr.bin/lastcomm/lastcomm.c
Revision Date Author Comments
# 0b8224d1 24-Nov-2023 Warner Losh <imp@FreeBSD.org>

Remove copyright strings ifdef'd out

We've ifdef'd out the copyright strings for some time now. Go ahead and
remove the ifdefs. Plus whatever other detritis was left over from other
recent removals. These copyright strings are present in the comments and
are largely from CSRG's attempt at adding their copyright to every
binary file (which modern interpretations of the license doesn't
require).

Sponsored by: Netflix


# bdcbfde3 23-Nov-2023 Warner Losh <imp@FreeBSD.org>

usr.bin: Remove ancient SCCS tags.

Remove ancient SCCS tags from the tree, automated scripting, with two
minor fixup to keep things compiling. All the common forms in the tree
were removed with a perl script.

Sponsored by: Netflix


# 6f4ce7e8 27-Jul-2023 Michael Paepcke <git@paepcke.de>

lastcomm: improve timestamp display

Adjust the lastcomm command to output timestamps with a precision of
seconds.

Reported by: Dr. Andreas Longwitz
Reviewed by: emaste
Relnotes: Yes
Sponsored by: DSS Gmbh
Pull Request: https://github.com/freebsd/freebsd-src/pull/802


# 1d386b48 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# 8a16b7a1 20-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

General further adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 3-Clause license.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.


# 69921123 23-May-2017 Konstantin Belousov <kib@FreeBSD.org>

Commit the 64-bit inode project.

Extend the ino_t, dev_t, nlink_t types to 64-bit ints. Modify
struct dirent layout to add d_off, increase the size of d_fileno
to 64-bits, increase the size of d_namlen to 16-bits, and change
the required alignment. Increase struct statfs f_mntfromname[] and
f_mntonname[] array length MNAMELEN to 1024.

ABI breakage is mitigated by providing compatibility using versioned
symbols, ingenious use of the existing padding in structures, and
by employing other tricks. Unfortunately, not everything can be
fixed, especially outside the base system. For instance, third-party
APIs which pass struct stat around are broken in backward and
forward incompatible ways.

Kinfo sysctl MIBs ABI is changed in backward-compatible way, but
there is no general mechanism to handle other sysctl MIBS which
return structures where the layout has changed. It was considered
that the breakage is either in the management interfaces, where we
usually allow ABI slip, or is not important.

Struct xvnode changed layout, no compat shims are provided.

For struct xtty, dev_t tty device member was reduced to uint32_t.
It was decided that keeping ABI compat in this case is more useful
than reporting 64-bit dev_t, for the sake of pstat.

Update note: strictly follow the instructions in UPDATING. Build
and install the new kernel with COMPAT_FREEBSD11 option enabled,
then reboot, and only then install new world.

Credits: The 64-bit inode project, also known as ino64, started life
many years ago as a project by Gleb Kurtsou (gleb). Kirk McKusick
(mckusick) then picked up and updated the patch, and acted as a
flag-waver. Feedback, suggestions, and discussions were carried
by Ed Maste (emaste), John Baldwin (jhb), Jilles Tjoelker (jilles),
and Rick Macklem (rmacklem). Kris Moore (kris) performed an initial
ports investigation followed by an exp-run by Antoine Brodin (antoine).
Essential and all-embracing testing was done by Peter Holm (pho).
The heavy lifting of coordinating all these efforts and bringing the
project to completion were done by Konstantin Belousov (kib).

Sponsored by: The FreeBSD Foundation (emaste, kib)
Differential revision: https://reviews.freebsd.org/D10439


# fbbd9655 28-Feb-2017 Warner Losh <imp@FreeBSD.org>

Renumber copyright clause 4

Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is too pedantic, so give up on that point.

Submitted by: Jan Schaumann <jschauma@stevens.edu>
Pull Request: https://github.com/freebsd/freebsd/pull/96


# 6fe3ecc3 17-May-2012 Konstantin Belousov <kib@FreeBSD.org>

Allow to specify strftime(3) format for process start end exit times.

Submitted by: Andrey Zonov <andrey zonov org>
MFC after: 1 week


# b5615799 21-Jun-2011 Xin LI <delphij@FreeBSD.org>

Remove unneeded headers.

MFC after: 2 weeks


# da52b4ca 11-Dec-2010 Joel Dahl <joel@FreeBSD.org>

Remove the advertising clause from UCB copyrighted files in usr.bin. This
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


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# fe0506d7 09-Mar-2010 Marcel Moolenaar <marcel@FreeBSD.org>

Create the altix project branch. The altix project will add support
for the SGI Altix 350 to FreeBSD/ia64. The hardware used for porting
is a two-module system, consisting of a base compute module and a
CPU expansion module. SGI's NUMAFlex architecture can be an excellent
platform to test CPU affinity and NUMA-aware features in FreeBSD.


# 85277f13 10-Jan-2010 Ed Schouten <ed@FreeBSD.org>

Let lastcomm(1) build without <utmp.h>.

Use MAXLOGNAME - 1 instead of UTNAMESIZE. There is no definition for TTY
name sizes, at least not as low as 8, so hardcode it for now.


# 821df508 12-Dec-2009 Xin LI <delphij@FreeBSD.org>

Revert most part of 200420 as requested, as more review and polish is
needed.


# 6f2d3221 11-Dec-2009 Xin LI <delphij@FreeBSD.org>

Remove unneeded header includes from usr.bin/ except contributed code.

Tested with: make universe


# d7f03759 19-Oct-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Import the HEAD csup code which is the basis for the cvsmode work.


# fdbe5bab 22-May-2007 Diomidis Spinellis <dds@FreeBSD.org>

Increase precision of time values in the process accounting
structure, while maintaining backward compatibility with legacy
file and record formats.


# e91843d4 14-May-2007 Diomidis Spinellis <dds@FreeBSD.org>

Backout revisions 1.16-1.14.
Backwards compatibility with the new acct(5) format will be
implemented through the explicit versioning of acct records,
not through an export/import procedure.


# 61f31ed6 03-May-2007 David Malone <dwmalone@FreeBSD.org>

Initialise variable size so that reading stdin works deterministically.

Add missing include.

Default to WARNS=6.


# b7dd80b8 18-Apr-2007 Diomidis Spinellis <dds@FreeBSD.org>

Change the export option from -w (write) to -X.
While implementing import it became apparent that write as a mnemonic
is ambiguous and confusing.

MFC after: 8 days


# 3f863a9a 18-Apr-2007 Diomidis Spinellis <dds@FreeBSD.org>

Complain on write errors.
Use correct type for write_text.

MFC after: 8 days


# 947ef7f1 18-Apr-2007 Diomidis Spinellis <dds@FreeBSD.org>

Add export capability through the new -w flag.

Discussed in: -arch
MFC after: 8 days


# 44c900af 04-Apr-2007 Diomidis Spinellis <dds@FreeBSD.org>

A dash as an argument to the -f option will now cause lastcomm to
read data from the standard input. This allows tail -f to pipe
data to lastcomm, and thereby real-time monitoring of executed
commands. The manual page includes the exact incantation.

MFC after: 2 weeks


# f682f10c 21-May-2005 Ruslan Ermilov <ru@FreeBSD.org>

Sync program's usage() with manpage's SYNOPSIS.


# 151e36fc 20-May-2004 Hiten Pandya <hmp@FreeBSD.org>

Remove unneeded lseek(2) hack to position past the 2GB point,
use fseeko(3) instead.

This commit fixes breakage when `lastcomm matchstring` is run.

PR: bin/66765, bin/64568
Submitted by: Dan Nelson <dnelson at allantgroup.com>


# 6841d8b9 27-Jan-2003 Bill Fenner <fenner@FreeBSD.org>

Don't try to fseek before the beginning of the file; POSIX requires that
this return an error.
This re-enables display of the first entry in /var/account/acct instead
of the error "lastcomm: /var/account/acct: Invalid argument"


# f4ac32de 04-Sep-2002 David Malone <dwmalone@FreeBSD.org>

ANSIify function definitions.
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


# e026a48c 29-Jun-2002 David E. O'Brien <obrien@FreeBSD.org>

Consistently use FBSDID


# f1bb2cd2 21-Mar-2002 Warner Losh <imp@FreeBSD.org>

remove __P


# 576541a9 18-Feb-2002 Warner Losh <imp@FreeBSD.org>

Fixed divots that I created when I moved prototypes of group_from_gid
and user_from_uid to grp.h and pwd.h. Update the man pages.

Submitted by: David Malone
Pointy hat to: imp


# fd8879d3 26-Jun-2001 Dima Dorfman <dd@FreeBSD.org>

Staticize, constize, de-registerize; don't shadow global definitions;
set WARNS=2.

Submitted by: Mike Barcroft <mike@q9media.com>


# d763a510 16-Jun-2001 Mike Heffner <mikeh@FreeBSD.org>

Print spaces on the leading edge rather than the trailing edge of each
field to avoid trailing spaces.

PR: bin/16649
MFC after: 2 weeks


# f90e81f9 22-Oct-2000 Poul-Henning Kamp <phk@FreeBSD.org>

Avoid using the semi-bogus include <struct.h>

All uses of fldsiz() in this file were wrong anyway.


# c3aac50f 27-Aug-1999 Peter Wemm <peter@FreeBSD.org>

$Id$ -> $FreeBSD$


# 342548bf 20-Jul-1997 Philippe Charnier <charnier@FreeBSD.org>

Cosmetic in usage string.


# c44252b6 06-Jul-1997 Bruce Evans <bde@FreeBSD.org>

Finish importing Lite2's src/usr.bin, except for ex, diff, grep, mail,
pascal and vmstat.sparc. All changed files on the vendor branch should
already have been imported.


# 5b65033c 23-Jun-1997 Tor Egge <tegge@FreeBSD.org>

Long command names are not NUL terminated. Force truncation in format string.


# 1c8af878 28-Mar-1997 Warner Losh <imp@FreeBSD.org>

compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.


# c115df18 22-Feb-1997 Peter Wemm <peter@FreeBSD.org>

Revert $FreeBSD$ to $Id$


# 1130b656 14-Jan-1997 Jordan K. Hubbard <jkh@FreeBSD.org>

Make the long-awaited change from $Id$ to $FreeBSD$

This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore. This update would have been
insane otherwise.


# 0309b92b 30-Jun-1996 Wolfram Schneider <wosch@FreeBSD.org>

Add some options which makes lastcomm(1) a better debug tool.


# 7799f52a 30-May-1995 Rodney W. Grimes <rgrimes@FreeBSD.org>

Remove trailing whitespace.


# 7970bd10 11-Apr-1995 Andrey A. Chernov <ache@FreeBSD.org>

Fix output field range
Submitted by: edward@edcom.com


# 9b50d902 26-May-1994 Rodney W. Grimes <rgrimes@FreeBSD.org>

BSD 4.4 Lite Usr.bin Sources