Commit graph

93 commits

Author SHA1 Message Date
Warner Losh 0b8224d1cc 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
2023-11-26 22:23:58 -07:00
Warner Losh bdcbfde31e 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
2023-11-26 22:23:30 -07:00
Warner Losh b2c76c41be Remove $FreeBSD$: one-line nroff pattern
Remove /^\.\\"\s*\$FreeBSD\$$\n/
2023-08-16 11:55:15 -06:00
Warner Losh d0b2dbfa0e Remove $FreeBSD$: one-line sh pattern
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
2023-08-16 11:55:03 -06:00
Warner Losh 1d386b48a5 Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
2023-08-16 11:54:42 -06:00
Simon J. Gerraty d9a4274795 Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
Gordon Bergling 1190b82c22 last(1): Remove double words in source code comments
- s/on on/on/
- s/we we/we/

MFC after:	5 days
2023-04-18 07:14:53 +02:00
Emmanuel Vadot 0c6b2a9179 pkgbase: Put accounting utilities in the acct package 2022-08-16 21:15:19 +02:00
Piotr Pawel Stefaniak 8da2705253 last: improve non-UTF8 locale output after libxo support was added
Some strftime(3) conversion specifications will generate strings encoded
with the current locale, not necessarily UTF8. As per xo_format.5, use
the h string modifier so that libxo interprets it appropriately.

Reviewed by:	eugen, philip
Differential Revision:	https://reviews.freebsd.org/D32437
2021-10-11 19:02:12 +02:00
Piotr Pawel Stefaniak 902cde5d0a Revert "last(1): unbreak for 8-bit locales"
This reverts commits 8e67c427b5 (unbreak for 8-bit locales), 0ca58ca151
(correction after r351413), and f424ec1b80 (fix style after r351459).

A simpler fix can be done by using the h modifier for strings that are
encoded with the current locale.

Reviewed by:	eugen, philip
Differential Revision:	https://reviews.freebsd.org/D32437
2021-10-11 19:01:57 +02:00
Fernando Apesteguía 53c8d22495 last(1): Add EXAMPLES section
Add two simple examples showing the use of the flags: d, n, s, t
While here, reorder cross references properly by section
Bump .Dd

Approved by: manpages (gbe@)
Differential Revision: https://reviews.freebsd.org/D27540

last(1): Bump .Dd
2021-01-09 18:37:25 +01:00
Eugene Grosbein f424ec1b80 last(1): fix style after r351459
Reported by:	cem
MFC after:	2 weeks
X-MFC-With:	351459
2019-08-25 01:05:01 +00:00
Eugene Grosbein 0ca58ca151 last(1): correction after r351413
Make that change no-op for C/POSIX locale just like for UTF-8
that it superset of US-ASCII.

MFC after:	2 weeks
X-MFC-With:	r351413
2019-08-24 15:50:13 +00:00
Eugene Grosbein 8e67c427b5 last(1): unbreak for 8-bit locales
Ouput format of last(1) is broken for non UTF-8 locales
since it got libxo(3) support. It uses strftime(3) that produces
non UTF-8 strings passed to xo_emit(3) with wrong %s format -
it should be %hs in this case, so xo_emit(3) produces empty output.

This change is basically no-op when locale is of UTF-8 type,
f.e. en_GB.UTF-8 or ru_RU.UTF-8 or sr_RS.UTF-8@latin.
It fixes output for other locales.

MFC after:	2 weeks
2019-08-23 01:25:38 +00:00
Benedict Reuschling 6aca7aa44b A single comma was missing to separate the "see also" items in
last.1 and lastlogin.8. Add it back.

PR:		231187
Submitted by:	david.marec@davenulle.org
2018-10-20 17:22:04 +00:00
Philip Paeps c7c5d8e387 Add libxo(3) support to last(1).
Reviewed by:	kp
Approved by:	re (gjb)
MFC after:	1 week
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D16922
2018-08-28 17:10:19 +00:00
Mariusz Zaborski 7672a0148f Convert cap_enter() < 0 && errno != ENOSYS to caph_enter() < 0.
No functional change intended.
2018-06-19 23:43:14 +00:00
Conrad Meyer 3181398b92 Update other man pages to match leap second reality
Missed these in r334501; see justification there:

https://svnweb.freebsd.org/base?view=revision&revision=334501

Sponsored by:	Dell EMC Isilon
2018-06-01 22:37:59 +00:00
Pedro F. Giffuni 8a16b7a18f 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.
2017-11-20 19:49:47 +00:00
Bryan Drewery ea825d0274 DIRDEPS_BUILD: Update dependencies.
Sponsored by:	Dell EMC Isilon
2017-10-31 00:07:04 +00:00
Stephen J. Kiernan e2005cef7f Fix a memory leak with last
free memory allocated to 'buf'

Submitted by:	Thomas Rix <trix@juniper.net>
Reviewed by:	ed
Approved by:	sjg (mentor)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D9850
2017-06-02 20:25:25 +00:00
Bryan Drewery 07676084ec DIRDEPS_BUILD: Update dependencies.
Sponsored by:	Dell EMC Isilon
2017-05-09 01:48:23 +00:00
Warner Losh fbbd9655e5 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
2017-02-28 23:42:47 +00:00
Conrad Meyer 941e22d17d Capsicumify last(1)
Reviewed by:	ed (earlier version), emaste (earlier version)
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D8001
2016-12-16 01:47:08 +00:00
Ed Schouten 46e834d780 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@
MFC after:	1 month
2015-07-21 10:52:05 +00:00
Simon J. Gerraty ccfb965433 Add META_MODE support.
Off by default, build behaves normally.
WITH_META_MODE we get auto objdir creation, the ability to
start build from anywhere in the tree.

Still need to add real targets under targets/ to build packages.

Differential Revision:       D2796
Reviewed by: brooks imp
2015-06-13 19:20:56 +00:00
Simon J. Gerraty 44d314f704 dirdeps.mk now sets DEP_RELDIR 2015-06-08 23:35:17 +00:00
Baptiste Daroussin 490f43697b Fix history, add AUTHORS section
Obtained from:	OpenBSD (by schwarze@)
2015-06-06 12:04:38 +00:00
Simon J. Gerraty 98e0ffaefb Merge sync of head 2015-05-27 01:19:58 +00:00
Joel Dahl 914f6e6290 mdoc: sort SEE ALSO. 2014-12-26 21:56:23 +00:00
Simon J. Gerraty fae50821ae Updated dependencies 2014-05-16 14:09:51 +00:00
Simon J. Gerraty 76b28ad6ab Updated dependencies 2014-05-10 05:16:28 +00:00
Simon J. Gerraty 7cf3a1c6b2 Updated dependencies 2013-03-11 17:21:52 +00:00
Simon J. Gerraty f5f7c05209 Updated dependencies 2013-02-16 01:23:54 +00:00
Simon J. Gerraty 23090366f7 Sync from head 2012-11-04 02:52:03 +00:00
Eitan Adler eae8be706e Bump date missed in r202756
PR:		docs/171624
Submitted by:	bdrewery
Approved by:	gabor
MFC after:	3 days
2012-09-14 17:50:42 +00:00
Ed Schouten 8f8f476390 Switch batch to an SLIST.
This code requires none of the features of LIST.
2012-09-12 22:16:31 +00:00
Marcel Moolenaar 7750ad47a9 Sync FreeBSD's bmake branch with Juniper's internal bmake branch.
Requested by: Simon Gerraty <sjg@juniper.net>
2012-08-22 19:25:57 +00:00
Hiroki Sato 9549f74201 - Replace "wtmp" with "utx.log" because last(1) no longer reads wtmp.
- 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
2012-01-22 11:34:24 +00:00
Ed Schouten 7f3271b68c Add missing static keywords to last(1) 2011-11-06 08:15:41 +00:00
Ed Schouten 51b671f6de Build last(1) and leave(1) with WARNS=6.
These ports were only built with WARNS=1, because they use certain
format extensions. We can use NO_WFORMAT for that instead.
2011-10-14 07:26:20 +00:00
Joel Dahl da52b4caaf 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
2010-12-11 08:32:16 +00:00
Ed Schouten 0806dd9238 Remove stale references to utmp(5) and its corresponding filenames.
I removed utmp and its manpage, but not other manpages referring to it.
2010-01-21 17:25:12 +00:00
Ed Schouten 6628ca0a98 Make last(1) display the full log file.
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>
2010-01-19 19:53:05 +00:00
Ed Schouten 561f61e25d Port last(1) to use utmpx.
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.
2010-01-13 18:06:31 +00:00
Ed Schouten b7946da96b Build usr.bin/ with WARNS=6 by default.
Also add some missing $FreeBSD$ to keep svn happy.
2010-01-02 10:27:05 +00:00
Ruslan Ermilov 0227791b40 Expand *n't contractions. 2005-02-13 22:25:33 +00:00
Ruslan Ermilov 6c7216df78 Sort sections. 2005-01-18 13:43:56 +00:00
David Malone 7e6990487d s/FALLTHOUGH/FALLTHROUGH/
Submitted by:	Xin LI <delphij@frontfree.net>
2004-08-08 18:59:19 +00:00
David Malone baa8d9176f Include timeconv.h for _int_to_time and _time_to_int. 2004-02-15 21:52:59 +00:00