Commit Graph

46 Commits

Author SHA1 Message Date
gjb
c12b44c606 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
351878d3ba And of course, I forgot to add -a to the usage. 2012-02-11 21:50:44 +00:00
ed
fbfd1ac8bc 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
pluknet
e43df010f9 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
29af67e52c 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
b28da9a61e 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
a618bd1a15 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
9b380e30d4 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
2062dc2dbf 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
delphij
0842b7d53f Revert most part of 200420 as requested, as more review and polish is
needed.
2009-12-13 03:14:06 +00:00
delphij
b963db4652 Remove unneeded header includes from usr.bin/ except contributed code.
Tested with:	make universe
2009-12-11 23:35:38 +00:00
ed
0ff95c5da2 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
cognet
06cfdceb6c 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
charnier
00bccc99ec Move variable initialization to reduce compiler warning. 2005-05-29 15:52:48 +00:00
ru
6cc4b6c220 Added the EXIT STATUS section where appropriate. 2005-01-17 07:44:44 +00:00
ru
fb1d8b3724 Mechanically kill hard sentence breaks. 2004-07-02 22:22:35 +00:00
peter
a4f43a8a53 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
tjr
db60a5d963 Remove unimplemented System V options from the getopt() option string. 2002-12-21 00:38:14 +00:00
ru
b67068895d mdoc(7) police: markup polishing.
Approved by:	re
2002-11-26 17:33:37 +00:00
peter
97526c738c 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
tjr
b36022fd55 Style: put static qualifier on definition of static functions. 2002-06-20 07:36:22 +00:00
tjr
385a534007 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
tjr
f91c8f40be 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
ru
8c5e6481e1 mdoc(7) police: lint. 2002-05-30 06:44:27 +00:00
tjr
8daf14c02a Write "FROM" heading above the hostname column, like NetBSD and GNU do. 2002-05-28 06:36:46 +00:00
tjr
1894db5ac7 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
imp
0b20191705 remove __P 2002-03-22 01:42:45 +00:00
markm
ff1e6296f0 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
dd
911ca14c87 Remove whitespace at EOL. 2001-07-15 08:06:20 +00:00
dd
4cbc233a90 Correct path to wtmp.
PR:		28433
Submitted by:	Joseph Mallett <jmallett@xMach.org>
2001-06-27 06:00:26 +00:00
dd
dc0185a459 Include missing header files which define functions for which gcc has
builtins (e.g., exit, strcmp).
2001-06-24 19:50:42 +00:00
ache
b84641bbc8 Don't attempt to parse %c 2001-03-21 19:16:41 +00:00
ru
0d1334ca0c mdoc(7) police: use the new features of the Nm macro. 2000-11-20 19:21:22 +00:00
peter
3b842d34e8 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
des
60d78a8916 Back out Steve's fix, as this was already fixed by me in revision 1.6 1998-05-25 12:04:47 +00:00
steve
538a485014 Only allow 'who' and 'who am i' as valid usages.
PR:		6294
Submitted by:	Ruslan Ermilov <ru@ucb.crimea.ua>
1998-05-25 07:19:07 +00:00
des
b7cdb32ea9 Check that user really typed "who am {I,i}", and that no stray
arguments are given.
Note that usage() and the manpage disagree...

PR:		bin/6294
Suggested by:	Ruslan Ermilov and Bruce Evans
Submitted by:	Ruslan Ermilov (partly)
1998-04-26 19:10:51 +00:00
phk
ced7ca4b35 Better SYNOPSIS
PR:		6294
Reviewed by:	bde, phk
Submitted by:	Ruslan Ermilov <ru@ucb.crimea.ua>
1998-04-14 06:42:18 +00:00
charnier
a5eee593ac Use err(3). Add usage(). 1997-08-26 11:14:57 +00:00
yokota
e2b0343661 Made sure the string formated by strftime() is properly
null-terminated.

Fixed a wrong if statement which should test a string is
empty where in fact it tested the string pointer was NULL.

Should go to RELENG_2_1 and RELENG_2_2.

Reviewed by guido@freebsd.org.
1997-03-07 11:04:01 +00:00
peter
f390c26dd9 Revert $FreeBSD$ to $Id$ 1997-02-22 19:58:13 +00:00
jkh
808a36ef65 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.
1997-01-14 07:20:47 +00:00
wosch
ab0ebe585d [HISTORY] command appeared in Version 1 AT&T UNIX
Obtained from: A Quarter Century of UNIX, Peter H. Salus, page 41
1996-08-29 18:06:19 +00:00
ache
f3587c7ea3 Add setlocale LC_TIME 1995-10-24 04:06:02 +00:00
ache
97b1928185 Replace ctime by strftime %c to use national date representation now 1995-08-07 23:39:58 +00:00
rgrimes
f9ab90d9d6 BSD 4.4 Lite Usr.bin Sources 1994-05-27 12:33:43 +00:00