summaryrefslogtreecommitdiffstats
path: root/usr.bin/who/who.c
Commit message (Collapse)AuthorAgeFilesLines
* And of course, I forgot to add -a to the usage.ed2012-02-111-1/+1
|
* Attempt to implement who -a.ed2012-02-111-20/+9
| | | | | | 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.
* Add the XSI option -b to show date of the last reboot.pluknet2011-10-281-6/+27
| | | | | | | 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
* Perform all trivial ports to utmpx for usr.bin/.ed2010-01-131-3/+2
| | | | | They were already converted to use libulog, so it's easy to convert them to utmpx.
* Several refinements to libulog's API.ed2009-12-261-1/+1
| | | | | | | | | - 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.
* Revert most part of 200420 as requested, as more review and polish isdelphij2009-12-131-0/+1
| | | | needed.
* Remove unneeded header includes from usr.bin/ except contributed code.delphij2009-12-111-1/+0
| | | | Tested with: make universe
* Port who(1) to utmpx.ed2009-12-051-58/+50
| | | | | | | | | | (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.
* In wall and who, check that the utmp entry isn't stalled, as it is done in w.cognet2006-02-211-3/+21
| | | | | | | 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>
* Move variable initialization to reduce compiler warning.charnier2005-05-291-2/+2
|
* Fix a warning that showed up on 64 bit systems. It was actually a realpeter2003-10-261-1/+1
| | | | bug that had been swept under the carpet.
* Remove unimplemented System V options from the getopt() option string.tjr2002-12-211-1/+1
|
* utmp.ut_time and lastlog.ll_time are explicitly int32_t rather thanpeter2002-11-151-3/+5
| | | | | | | | | | | | 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)
* Style: put static qualifier on definition of static functions.tjr2002-06-201-7/+7
|
* Respect the setting of the COLUMNS environment variable, use it instead oftjr2002-06-041-6/+16
| | | | the TTY width obtained by ioctl() when set & non-null. (SUSv3)
* Write "FROM" heading above the hostname column, like NetBSD and GNU do.tjr2002-05-281-0/+1
|
* Reimplement the who(1) utility to add some features required by SUSv3:tjr2002-05-091-107/+220
| | | | | | | | | | | -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
* remove __Pimp2002-03-221-3/+3
|
* WARNS=2 fix, use __FBSDID().markm2001-12-111-11/+13
| | | | WARNS=2 is not in Makefile, as this will be the default.
* Include missing header files which define functions for which gcc hasdd2001-06-241-0/+1
| | | | builtins (e.g., exit, strcmp).
* Don't attempt to parse %cache2001-03-211-3/+9
|
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Back out Steve's fix, as this was already fixed by me in revision 1.6des1998-05-251-4/+0
|
* Only allow 'who' and 'who am i' as valid usages.steve1998-05-251-1/+5
| | | | | PR: 6294 Submitted by: Ruslan Ermilov <ru@ucb.crimea.ua>
* Check that user really typed "who am {I,i}", and that no straydes1998-04-261-1/+5
| | | | | | | | | 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)
* Use err(3). Add usage().charnier1997-08-261-15/+31
|
* Made sure the string formated by strftime() is properlyyokota1997-03-071-1/+2
| | | | | | | | | | | 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.
* Add setlocale LC_TIMEache1995-10-241-0/+3
|
* Replace ctime by strftime %c to use national date representation nowache1995-08-071-4/+4
|
* BSD 4.4 Lite Usr.bin Sourcesrgrimes1994-05-271-0/+135
OpenPOWER on IntegriCloud