Commit Graph

62 Commits

Author SHA1 Message Date
Simon J. Gerraty
d9a4274795 Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
Emmanuel Vadot
0c6b2a9179 pkgbase: Put accounting utilities in the acct package 2022-08-16 21:15:19 +02:00
Steve Wills
db11c57a6c usr.bin/who.c: Fix boot time checking
The boot time entry doesn't have a tty specified, so don't check it.
While here, make ttystat handle that case.

Approved by:	kevans (src)
Differential Revision:	https://reviews.freebsd.org/D34524
2022-03-12 11:49:49 -05:00
Fernando Apesteguía
25641c7ccc who(1): Add EXAMPLES section
Add EXAMPLES section covering all the flags except -m and -bTu covered by
other flags.

Approved by:	manpages (bcr@)
Differential Revision:	https://reviews.freebsd.org/D26219
2020-08-30 17:40:59 +00:00
Pedro F. Giffuni
1de7b4b805 various: general adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

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.

No functional change intended.
2017-11-27 15:37:16 +00:00
Bryan Drewery
ea825d0274 DIRDEPS_BUILD: Update dependencies.
Sponsored by:	Dell EMC Isilon
2017-10-31 00:07:04 +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
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
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
Joel Dahl
aee53c332e Remove contractions. 2012-10-07 20:01:41 +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
Glen Barber
2fccbf04cc General mdoc(7) and typo fixes.
PR:		167696
Submitted by:	Nobuyuki Koganemaru (kogane!jp.freebsd.org)
MFC after:	3 days
2012-05-10 02:07:00 +00:00
Ed Schouten
bab1d5b81b And of course, I forgot to add -a to the usage. 2012-02-11 21:50:44 +00:00
Ed Schouten
79625d00a2 Attempt to implement who -a.
According to POSIX, -a is equal to -bdlprtTu.  It seems this is not true
in practice, as -b normally restricts the output to BOOT_TIME entries
and all implementations that I know of don't.
2012-02-11 21:49:23 +00:00
Sergey Kandaurov
85714224ae Add the XSI option -b to show date of the last reboot.
That required to increase the LINE field to fit the output of -b.
While here, change the row() function to take a const argument.

In collaboration with:	ed
2011-10-28 12:47:37 +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
ab90a4d1e2 Perform all trivial ports to utmpx for usr.bin/.
They were already converted to use libulog, so it's easy to convert them
to utmpx.
2010-01-13 18:09:54 +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
Ed Schouten
444999a314 Several refinements to libulog's API.
- Only set the fields in the ulog_utmpx structure that are valid for the
  command in question. This means that strings like "shutdown" or "~"
  are not visible to the user anymore.
- Rename UTXF_* to UTXI_*, indicating the indexation, instead of using
  the `antique' filename. If we ever get rid of utmp, it makes little
  sense calling it by its old name.
2009-12-26 22:36:05 +00:00
Xin LI
821df508e8 Revert most part of 200420 as requested, as more review and polish is
needed.
2009-12-13 03:14:06 +00:00
Xin LI
6f2d322192 Remove unneeded header includes from usr.bin/ except contributed code.
Tested with:	make universe
2009-12-11 23:35:38 +00:00
Ed Schouten
b911cea8ff Port who(1) to utmpx.
(Un)fortunately there is no standardized interface to switch between
utmp database files, so we must call ulog_setutxfile() here.

I'm also changing the column widths to magic numbers here. Display
layout should in this case not be derived from structure fields sizes.
Because I don't want struct utmpx ever to become too small, the fields
are too big to reserve all the space.
2009-12-05 20:44:19 +00:00
Olivier Houchard
b457a3e19c In wall and who, check that the utmp entry isn't stalled, as it is done in w.
Apparently with the new pts code stalled entries are printed, when they are
not with the BSD ptys.

Submitted by:	Michal Mertl <mime at traveller dot cz>
2006-02-21 13:01:00 +00:00
Philippe Charnier
8a9d84b4a6 Move variable initialization to reduce compiler warning. 2005-05-29 15:52:48 +00:00
Ruslan Ermilov
a866e17077 Added the EXIT STATUS section where appropriate. 2005-01-17 07:44:44 +00:00
Ruslan Ermilov
6a3e8b0adc Mechanically kill hard sentence breaks. 2004-07-02 22:22:35 +00:00
Peter Wemm
10ebb45ae0 Fix a warning that showed up on 64 bit systems. It was actually a real
bug that had been swept under the carpet.
2003-10-26 05:05:48 +00:00
Tim J. Robbins
aed62c0980 Remove unimplemented System V options from the getopt() option string. 2002-12-21 00:38:14 +00:00
Ruslan Ermilov
06e482e60a mdoc(7) police: markup polishing.
Approved by:	re
2002-11-26 17:33:37 +00:00
Peter Wemm
6ceeb6902a utmp.ut_time and lastlog.ll_time are explicitly int32_t rather than
time_t.  Deal with the possibility that time_t != int32_t.  This boils
down to this sort of thing:
 -   time(&ut.ut_time);
 +   ut.ut_time = time(NULL);
and similar for ctime(3) etc.  I've kept it minimal for the stuff
that may need to be portable (or 3rd party code), but used Matt's time32
stuff for cases where that isn't as much of a concern.

Approved by: re (jhb)
2002-11-15 22:42:00 +00:00
Tim J. Robbins
d2979f5673 Style: put static qualifier on definition of static functions. 2002-06-20 07:36:22 +00:00
Tim J. Robbins
850a1deb0c Refer to environ(7) for description of COLUMNS. Note the effects of LANG,
LC_ALL and LC_TIME upon the utility.
2002-06-07 00:50:22 +00:00
Tim J. Robbins
8358edb6c7 Respect the setting of the COLUMNS environment variable, use it instead of
the TTY width obtained by ioctl() when set & non-null. (SUSv3)
2002-06-04 09:52:30 +00:00
Ruslan Ermilov
8c756f116f mdoc(7) police: lint. 2002-05-30 06:44:27 +00:00
Tim J. Robbins
1a94013869 Write "FROM" heading above the hostname column, like NetBSD and GNU do. 2002-05-28 06:36:46 +00:00
Tim J. Robbins
38a9994201 Reimplement the who(1) utility to add some features required by SUSv3:
-H option (show column headings),
-T (show mesg(1) state),
-m (same as "am I"),
-u (show idle time),
-q (quick mode; list names in columns).

PR:		36128
Reviewed by:	mike
2002-05-09 23:04:40 +00:00
Warner Losh
3f330d7d1a remove __P 2002-03-22 01:42:45 +00:00
Mark Murray
2c062c85e5 WARNS=2 fix, use __FBSDID().
WARNS=2 is not in Makefile, as this will be the default.
2001-12-11 22:29:53 +00:00
Dima Dorfman
f247324df7 Remove whitespace at EOL. 2001-07-15 08:06:20 +00:00
Dima Dorfman
1807222dac Correct path to wtmp.
PR:		28433
Submitted by:	Joseph Mallett <jmallett@xMach.org>
2001-06-27 06:00:26 +00:00
Dima Dorfman
7a19d1bbb9 Include missing header files which define functions for which gcc has
builtins (e.g., exit, strcmp).
2001-06-24 19:50:42 +00:00
Andrey A. Chernov
e36de81ee2 Don't attempt to parse %c 2001-03-21 19:16:41 +00:00
Ruslan Ermilov
8fe908ef0c mdoc(7) police: use the new features of the Nm macro. 2000-11-20 19:21:22 +00:00
Peter Wemm
c3aac50f28 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00