History log of /freebsd-current/usr.bin/w/w.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


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

Remove $FreeBSD$: two-line .c pattern

Remove /^#include\s+<sys/cdefs.h>.*$\n\s+__FBSDID\("\$FreeBSD\$"\);\n/


# 6fc1bbbf 25-Jan-2023 Dag-Erling Smørgrav <des@FreeBSD.org>

w: Unlike err(3), xo_err(3) won't accept a null format string.

MFC after: 1 week
X-MFC-with: d90ff31ae5cd
Sponsored by: Klara, Inc.
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D38192


# d90ff31a 24-Jan-2023 Dag-Erling Smørgrav <des@FreeBSD.org>

w: Complete libxo transition.

MFC after: 1 week
Sponsred by: Klara, Inc.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D38172


# deb2f1b6 24-Oct-2022 Dag-Erling Smørgrav <des@FreeBSD.org>

w: Fix premature rounding.

If the system has been up more longer than a minute, we add 30 seconds to
the uptime so that subsequent calculations will round to the nearest minute
rather than truncate. However, since the introduction of libxo, we output
the raw value after performing the adjustment. Rewrite so that we output
the raw value first, then perform the adjustment and recalculate before
outputting the humanized value.

While there, reduce stack usage and avoid needless allocations.

Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D37128


# 04f6b9cb 21-Oct-2022 Dag-Erling Smørgrav <des@FreeBSD.org>

w: cosmetic fixes.

Sponsored by: Klara, Inc.


# 30762584 07-Oct-2022 Kristof Provost <kp@FreeBSD.org>

w: don't truncate if we're writing libxo json/xml

If we're writing structured output (i.e. json or xml) we shouldn't worry
about terminal width, and instead always output full width information.

This means that, for example, if we're called from crontab with 'w
--libxo json' we'll provide full the command field rather than
pointlessly truncating it.

Suggested by: Phil Shafer
Event: Aberdeen Hackathon 2022
Differential Revision: https://reviews.freebsd.org/D25013


# 2d3725d6 21-Jun-2020 Yuri Pankov <yuripv@FreeBSD.org>

w: use locale-based string format specifiers

Use locale-based string format specifiers when printing
the process names/arguments.

Reviewed by: pstef
Differential Revision: https://reviews.freebsd.org/D25174


# ae335351 28-Aug-2019 Mike Karels <karels@FreeBSD.org>

Fix address annotation in xml output from w

The libxo xml feature of adding an annotation with the "original"
address from the utmpx file if it is different than the final "from"
field was broken by r351379. This was pointed out by the gcc error
that save_p might be used uninitialized. Save the original address
as needed in each entry, don't just use the last one from the previous
loop.

Reviewed by: marcel@
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D21390


# fada5125 22-Aug-2019 Bjoern A. Zeeb <bz@FreeBSD.org>

w: initialize save_p to silence 'may be used uninitilized'

After r351379 save_p may be used uninitialized. Set it to NULL before
first assignment so that a later NULL check will work correctly.

Reported by: CI system for gcc platforms
MFC after: 1 week
X-MFC with: 351379 (karels)


# ec9801de 21-Aug-2019 Mike Karels <karels@FreeBSD.org>

Change w(1) to compute FROM (host) field size dynamically

It's nice to be able to display a full IPv6 host address if
needed, but it's also nice to display more than 3 characters of a command
line. Compute the needed size for the FROM column in an earlier pass,
and determine the maximum, then print what fits for the command.

Reviewed by: marcel@ (markm@ previous revision)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D21211


# 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.


# ba86ca7c 27-Jul-2017 Alexander Motin <mav@FreeBSD.org>

Fix singular/plural "users" output.

It was broken during libxo'fication.

PR: 221039
Submitted by: timur@
MFC after: 1 week


# 807bd0d9 09-Mar-2017 Marcelo Araujo <araujo@FreeBSD.org>

Use nitems() from sys/param.h.

Reviewed by: ume
MFC after: 3 weeks.
Differential Revision: https://reviews.freebsd.org/D9938


# 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


# 2279a9a4 02-Sep-2016 Hajimu UMEMOTO <ume@FreeBSD.org>

When -n is specified, don't make bogus DNS queries. Instead,
when -n is specified more than once, hostnames stored in utmp
are attempted to resolve to display them as network addresses.

PR: 212272


# ab9cee11 08-Sep-2015 Xin LI <delphij@FreeBSD.org>

w(1) is not setgid binary since r53279, so remove the setgid() call.

Reviewed By: wollman
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D3541


# 339ce033 14-Jul-2015 Mark Murray <markm@FreeBSD.org>

Widen the host field so that a full IPv6 address will be seen.


# 630a02da 16-Apr-2015 Allan Jude <allanjude@FreeBSD.org>

Fix libxo output from uptime command

the libxo output for uptime returned multiple 'uptime' keys, one each for number of days, hours, and minutes of uptime.
This is invalid JSON.
This patch makes the output the raw number of seconds, as well as adding keys for the individual unit values
A string of the original output from the plain-text uptime command is also added

Differential Revision: https://reviews.freebsd.org/D2063
Reviewed by: jmg
Approved by: marcel
Sponsored by: ScaleEngine Inc.


# 10b92369 08-Mar-2015 Mark Johnston <markj@FreeBSD.org>

Call xo_finish(3) before exiting in usage().


# 441ee032 10-Feb-2015 Michael Gmelin <grembo@FreeBSD.org>

Add xo_finish() to w.c in case it's invoked as uptime

Reviewed by: marcel
Approved by: marcel
Differential Revision: https://reviews.freebsd.org/D1821


# bab05582 11-Nov-2014 Marcel Moolenaar <marcel@FreeBSD.org>

Fix text output for the uptime command.

Reported by: "Max N. Boyarov" <zotrix@bsd.by>, ae@


# 76c0abf1 05-Nov-2014 Marcel Moolenaar <marcel@FreeBSD.org>

Convert to use libxo.

Obtained from: Phil Shafer <phil@juniper.net>
Sponsored by: Juniper Networks, Inc.


# 920aa23d 07-Oct-2014 Eitan Adler <eadler@FreeBSD.org>

don't reinvent the wheel: rely on basename(3)

Reviewed by: nwhitehorn


# a29cc9a3 28-Jul-2013 Andriy Gapon <avg@FreeBSD.org>

Revert r253748,253749

This WIP should not have been committed yet.

Pointyhat to: avg


# c722ec3a 28-Jul-2013 Andriy Gapon <avg@FreeBSD.org>

remove needless inclusion of machine/cpu.h in userland

MFC after: 21 days


# 9f0b6e5e 18-Jan-2013 John Baldwin <jhb@FreeBSD.org>

- Move 'showthreads' check out of fmt.c.
- Update shadow copy of fmt_argv() prototype in w.c and fix calls for
additional parameter.


# c3a1bb32 18-Jan-2013 Xin LI <delphij@FreeBSD.org>

Set showthread = 0 for w(1).

X-MFC: together with r245610


# b6eec535 12-Oct-2012 Ed Maste <emaste@FreeBSD.org>

Use CLOCK_UPTIME to get the uptime.


# d11cba9c 06-Nov-2011 Ed Schouten <ed@FreeBSD.org>

Add missing static keywords to w(1)


# 21632754 05-Jul-2011 Ed Schouten <ed@FreeBSD.org>

Only print entries for which ut_host points to a character device.

Now that we use utmpx, we more often have entries for which the ut_line
is left blank. To prevent us from returning struct stat for "/dev/",
check that the resulting stat structure belongs to a character device.


# 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.


# b9d3fd67 18-Feb-2010 Rebecca Cran <brucec@FreeBSD.org>

MFC r203688:

Initialize the execfile argument to NULL instead of _PATH_DEVNULL. This allows
the -M option to be used without specifying -N.

PR: bin/138146
Approved by: rrs (mentor)


# c08dcaf1 08-Feb-2010 Rebecca Cran <brucec@FreeBSD.org>

Initialize the execfile argument to NULL instead of _PATH_DEVNULL. This allows the -M option to be used without specifying -N.

PR: bin/138146
Approved by: rrs (mentor)
MFC after: 3 days


# 1131779f 13-Jan-2010 Ed Schouten <ed@FreeBSD.org>

Port w(1) to utmpx.

Let it print "-" when the TTY string is empty. In this case, it must
also make sure it doesn't match processes who also have no controlling
TTY. Otherwise it will print random kernel processes when trying to pick
the best matching process.

Eventually it should look at the value of ut_pid as well.


# 02f56376 05-Jan-2010 David Malone <dwmalone@FreeBSD.org>

Shuffle parens to avoid type-punning warning.


# 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


# dc65bcac 05-Dec-2009 Ed Schouten <ed@FreeBSD.org>

Let w(1) use utmpx.

We don't have UT_*SIZE anymore. One of the reasons for that is because
all strings are null terminated, there is no need for apps to copy
strings out of the utmpx structure. This means we can define W_DISP*SIZE
lengths for all columns.

While there, adjust the sizes a little. Steal some bytes from the
username column, while extending the hostname column quite a bit.


# b94f6865 22-Nov-2009 Hajimu UMEMOTO <ume@FreeBSD.org>

When -n is specified, attempt to turn hostnames found in utmp into IP
addresses, again. However, change a hostname into an IP address, only
when a host has just one A/AAAA RR.

Requested by: candy__at__kgc.co.jp
MFC after: 2 weeks


# 285c40cb 13-Sep-2009 Hajimu UMEMOTO <ume@FreeBSD.org>

MFC r196652: Fix the problem that the entry broke into two lines
with multi-byte AM/PM date format.

Approved by: re (kib)


# 34903a55 30-Aug-2009 Hajimu UMEMOTO <ume@FreeBSD.org>

Fix the problem that the entry broke into two lines with multi-byte
AM/PM format.

Reported by: takawata


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

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


# bec1fa86 11-May-2006 Poul-Henning Kamp <phk@FreeBSD.org>

Use sysctlbyname


# a21cbcb8 17-Oct-2005 Andre Oppermann <andre@FreeBSD.org>

Obtain true uptime through clock_gettime(CLOCK_MONOTONIC, struct *timespec)
instead of subtracting 'bootime' from 'now'.

Sponsored by: TCP/IP Optimization Fundraise 2005


# b8eb1ecc 04-Jun-2005 Garance A Drosehn <gad@FreeBSD.org>

Use the ki_udata field that was recently-added to kinfo_proc, instead of
stealing ki_spare[0] to hold a pointer.


# 69fe77ce 07-Sep-2003 Philippe Charnier <charnier@FreeBSD.org>

Do not print the result of strftime() in case of failure, the content is
indeterminate in such a case. The correct value for 2nd argument is
sizeof(buf). Do not NUL-terminate the result string, strftime() will do it
for us.


# c76b41b7 28-Jun-2003 Peter Wemm <peter@FreeBSD.org>

utmp.ut_time is not a time_t, do not pass a pointer to it to pr_attime().


# d0d0355e 22-Aug-2002 Sean Chittenden <seanc@FreeBSD.org>

Fix warning when calling w(1) when logged in via xdm/kdm. This is
really a problem with utmp/wtmp, but takes the same approach as who(1).

Reviewed by: knu (mentor), mini, silence on -audit
Approved by: knu (mentor), mini


# e8e649cc 06-Jun-2002 Juli Mallett <jmallett@FreeBSD.org>

ANSI style function declarations.


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

remove __P


# 716ced0b 07-Mar-2002 David E. O'Brien <obrien@FreeBSD.org>

Back out part of rev 1.51. The lesser impact fix is to just remove
the unused global var.


# 8b56c58b 11-Dec-2001 Mark Murray <markm@FreeBSD.org>

WARNS=2 fix, use __FBSDID() and sort includes.

WARNS=2 not added to Makefile as it is to become default.


# 6eabd845 10-Oct-2001 Bruce Evans <bde@FreeBSD.org>

Compensate for "Compensate for header dethreading" by backing it out.


# cfd848db 22-Sep-2001 Crist J. Clark <cjc@FreeBSD.org>

Fixing a bug that causes very short uptimes (less than one minute) to
be 30 seconds off. (Thanks to Vladimir B.Grebenschikov
<vova@express.ru> for the PR and ru for a more elegant fix.)

PR: bin/30680
Approved by: ru


# 5b718312 26-Jul-2001 Brian Somers <brian@FreeBSD.org>

When -n is specified, don't attempt to turn hostnames found in utmp
into addresses as we have no idea what address family they belong to.

When -n is not specified, resolve IPv6 as well as IPv4 addresses found
in the host field of utmp. Use realhostname_sa() to resolve addresses
(the old code was wrong).

Rename ``x'' to ``x_suffix'' to avoid confusion.

Hard code the host column width to 16 (against the imminent increase
of UT_HOSTSIZE in utmp.h).


# c59c7f97 28-May-2001 Poul-Henning Kamp <phk@FreeBSD.org>

Call kvm_close() before exit for consistency.

PR: 24654
Submitted by: Daniel Hemmerich zartik@yahoo.com


# af943f55 25-May-2001 Thomas Moestl <tmm@FreeBSD.org>

Fix the error buffer passed to kvm_openfiles to have a correct length
of _POSIX2_LINE_MAX.

MFC after: 1 week


# 6e547eab 01-May-2001 Mark Murray <markm@FreeBSD.org>

Compensate for header dethreading.


# 2742fc8e 03-Mar-2001 Andrey A. Chernov <ache@FreeBSD.org>

Preserve comma as separator when it is not equal to radix character


# e25fd27c 02-Mar-2001 Andrey A. Chernov <ache@FreeBSD.org>

Don't use "," as load avg. separator because it can be precision point in some
locales, so leads to confusion


# 00034645 02-Mar-2001 Andrey A. Chernov <ache@FreeBSD.org>

Use AM/PM time only when available in locale


# 3b93c743 22-Dec-2000 Brian Somers <brian@FreeBSD.org>

Hostnames are case-insensitive


# 3bebe991 20-Dec-2000 Brian Somers <brian@FreeBSD.org>

If the utmp login time is greater than the tty atime, use it to calculate
the idle time instead of the atime.

This makes entries for people that have logged in but done nothing
else show up correctly.

Reviewed by: markk@knigma.org


# 1f7d2501 12-Dec-2000 Kirk McKusick <mckusick@FreeBSD.org>

Change the proc information returned from the kernel so that it
no longer contains kernel specific data structures, but rather
only scalar values and structures that are already part of the
kernel/user interface, specifically rusage and rtprio. It no
longer contains proc, session, pcred, ucred, procsig, vmspace,
pstats, mtx, sigiolst, klist, callout, pasleep, or mdproc. If
any of these changed in size, ps, w, fstat, gcore, systat, and
top would all stop working. The new structure has over 200 bytes
of unassigned space for future values to be added, yet is nearly
100 bytes smaller per entry than the structure that it replaced.


# 6ff4ec18 17-Nov-1999 Peter Wemm <peter@FreeBSD.org>

Use the same technique as ps(1) to avoid the need for setgid. (ie: use
/dev/null as the default kernel and /dev/mem filenames, but still allow
the usual overrides)


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

$Id$ -> $FreeBSD$


# ac3cd520 28-Jul-1999 Brian Feldman <green@FreeBSD.org>

New w ability: you can list multiple users on the command line and it will
match with all of them, rather than only supporting a single user.

PR: 11121
Kinda submitted by: James Howard <howardjp@byzantine.student.umd.edu>
Reviewed by: DES


# 9ef5c48b 04-Jul-1999 Bill Fumerola <billf@FreeBSD.org>

Clean up some ambiguous nested if/elses.


# 9587fac0 22-Apr-1999 Andrey A. Chernov <ache@FreeBSD.org>

fix -n with 16-chars hostnames, modified patch from PR

PR: 11286
Submitted by: Hans Huebner <hans@chaosradio.berlin.ccc.de>


# 0cadb9ca 31-Mar-1999 Brian Somers <brian@FreeBSD.org>

Get things right for tty names of length UT_LINESIZE.
Cosmetic: Don't shadow the `p' variable.
Remove two unused variables.
PR: 3638


# 69b41093 10-Jan-1999 Peter Wemm <peter@FreeBSD.org>

Fix the annoying bug introduced in rev 1.18 that caused each line to be
one character shorter than the previous in a stairstep fashion when long
idle times were involved.

A couple of nits:
- spelling/typo fix.
- some of the easier style(9) fixes where it was bothering me.
- Handle 100+ days idle time (ha!). Probably the right thing to do is
to do a snprintf into a buffer and strlen the result rather than doing
hackery on magic numbers.

XXX the wide (and mostly unused) username and tty columns annoy me since
it it could be used for more useful information for the command. We should
actually count the largest username and tty and adjust like 'ls -l' does.


# a4f33f43 24-Dec-1998 Matthew Dillon <dillon@FreeBSD.org>

No __profname bozoness, no strstr() bozoness... test argv[0] against
"uptime" the right way. Sheesh.


# 0d5ad2d7 24-Dec-1998 Steve Price <steve@FreeBSD.org>

Since argv is in scope, use argv[0] instead of __progname.

Suggested by: bde


# a288ccca 08-Nov-1998 Steve Price <steve@FreeBSD.org>

Do a better job of determining if we were called as uptime(1).

PR: 8593


# fd67e2c5 08-Jun-1998 Warner Losh <imp@FreeBSD.org>

Remove unused strvisx.


# a88d7a82 21-May-1998 Joseph Koshy <jkoshy@FreeBSD.org>

Cosmetic fix. Compute header field widths from UT_{HOST,LINE,NAME}SIZE
instead of hardcoding header line.

PR: 6325


# bc53c0a6 14-May-1998 Joseph Koshy <jkoshy@FreeBSD.org>

Allow `w' to treat a corrupted "utmp" as a non fatal error.

PR: bin/2832


# 3d65e4d1 19-Apr-1998 Poul-Henning Kamp <phk@FreeBSD.org>

Like most Unices FreeBSD should have a larger tty field at least
as large as UT_LINESIZE (/usr/include/utmp.h). If the tty name is logged
with this size why isn't the w command reporting it?

(We should probably report the tty/cua prefix then as well ? /phk)

PR: 4187
Reviewed by: phk
Submitted by: Jorge M. Goncalves <ee96199@tom.fe.up.pt>


# 9d8c91b7 13-Oct-1997 Andrey A. Chernov <ache@FreeBSD.org>

If uptime < 1 min print in in secs otherwise we got confusing message
"up 1 user"


# 7860b557 11-Sep-1997 Andrey A. Chernov <ache@FreeBSD.org>

Document newly added -d option and fix usage string


# 1bb32253 11-Sep-1997 Andrey A. Chernov <ache@FreeBSD.org>

The "-d" option dumps out the entire process list on a per controlling
tty basis, instead of just the top level process.
Submitted by: terry


# 90389da9 25-Aug-1997 Philippe Charnier <charnier@FreeBSD.org>

Typo in usage(). Err -> errx when testing allocations.


# 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.


# 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.


# 6d7977a7 07-Mar-1997 Kazutaka YOKOTA <yokota@FreeBSD.org>

Made sure the string formated by strftime() is properly
null-terminated.

Should go to RELENG_2_1 and RELENG_2_2.

Reviewed by guido@freebsd.org.


# 70498d5a 11-Feb-1997 Daniel O'Callaghan <danny@FreeBSD.org>

Reduce the command field width by one when idle time is > 9 days, to
eliminate unsightly blank line.

Possibly a 2.2 candidate.


# d9162167 05-Dec-1996 Andrey A. Chernov <ache@FreeBSD.org>

Increase username field to reflect utmp changes


# c54481c1 17-Jun-1996 Andrey A. Chernov <ache@FreeBSD.org>

Do not print herror message, if w -n gethostname failed to be 100%
compatible with any program
Suggested by: peter


# 1694c5cb 17-Jun-1996 Andrey A. Chernov <ache@FreeBSD.org>

Fix xterm/screen/(any program using just :xxx form) compatibility


# 0fd06e5d 17-Jun-1996 Andrey A. Chernov <ache@FreeBSD.org>

Don't try convert "-" to numeric form for -n option


# 66b12529 17-Jun-1996 Andrey A. Chernov <ache@FreeBSD.org>

Fix w -n to really show numeric addresses, close PR 402
Partially submitted by: henrich@msu.edu (Charles Henrich)


# 66e5b18f 29-May-1996 Paul Traina <pst@FreeBSD.org>

Drop privileges if not using standard namelist or kernel file.
Submitted by: smpatel (Sujal Patel)


# d1b2ad1a 26-Oct-1995 Andrey A. Chernov <ache@FreeBSD.org>

Change locale to LC_ALL, there is no bitmask


# baf72ec1 23-Oct-1995 Andrey A. Chernov <ache@FreeBSD.org>

Add setlocale LC_TIME|LC_CTYPE


# 69267920 03-Sep-1995 Peter Wemm <peter@FreeBSD.org>

Increase the tty column width from 2 to 3 characters.

This gives us more room to breath with tty names, especially with drivers
that support large numbers of ports.. eg: specialix and digiboard.

This does not actually change the current tty names, it just allows room
for reporting more characters if the drivers use them.


# 656dcd43 07-Aug-1995 Garrett Wollman <wollman@FreeBSD.org>

Delete bogus referneces to timezone code internal header file `tzfile.h',
which is no longer bogusly installed in /usr/include.


# 6367cd09 17-Jul-1995 Peter Wemm <peter@FreeBSD.org>

When 'w' finds an IP address in the ut_host field, it attempts to do
a gethostbyname() on it. That can take a long time... (especially
if the reason the IP address is in there in the first place is because
login/rlogind/telnetd couldn't find it either....)
This patch reduces the gethostbyaddr lookup time to 2 seconds, the idea being
that if the local nameserver knows the answer, it'll answer within that time,
otherwise we dont care... :-)
This change doesn't do anything about whether or not w should do this in the
first place, but at least it will make the current behavior less painful.
Reviewed by: David Greenman


# 0812a2b4 16-Jul-1995 Peter Wemm <peter@FreeBSD.org>

Fix the 'w' command so that the -h option correctly supresses the heading
as per the manual page. Closes PR578.
Reviewed by:
Submitted by: Kenneth D. Merry
Obtained from:


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

Remove trailing whitespace.


# 92172c87 16-May-1995 David Greenman <dg@FreeBSD.org>

If an ut_host field in an utmp entry contains a ':' (e.g. for an xterm session)
w doesn't handle the non-'\0' terminated char arrays in struct utmp properly.

Submitted by: jarle@idt.unit.no


# 1b0c06d9 18-Feb-1995 Scott Mace <smace@FreeBSD.org>

Correct the grammar for the label of the number of users.
It is plural when zero and >1 users are logged in.


# 255318a8 26-Sep-1994 Andrey A. Chernov <ache@FreeBSD.org>

idle time == 0 printed now as "-" like in good old BSD
skip cua* 3 chars as tty* 3 lchars


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

BSD 4.4 Lite Usr.bin Sources