summaryrefslogtreecommitdiffstats
path: root/usr.bin/w
Commit message (Collapse)AuthorAgeFilesLines
* Initialize the execfile argument to NULL instead of _PATH_DEVNULL. This ↵brucec2010-02-081-1/+2
| | | | | | | | allows the -M option to be used without specifying -N. PR: bin/138146 Approved by: rrs (mentor) MFC after: 3 days
* Remove stale references to utmp(5) and its corresponding filenames.ed2010-01-211-2/+2
| | | | I removed utmp and its manpage, but not other manpages referring to it.
* Port w(1) to utmpx.ed2010-01-132-7/+8
| | | | | | | | | 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.
* This now passes a make universe with WARNS=6.dwmalone2010-01-071-2/+0
|
* Shuffle parens to avoid type-punning warning.dwmalone2010-01-051-1/+1
|
* Build usr.bin/ with WARNS=6 by default.ed2010-01-021-0/+2
| | | | Also add some missing $FreeBSD$ to keep svn happy.
* Revert most part of 200420 as requested, as more review and polish isdelphij2009-12-132-0/+4
| | | | needed.
* Remove unneeded header includes from usr.bin/ except contributed code.delphij2009-12-112-4/+0
| | | | Tested with: make universe
* Let w(1) use utmpx.ed2009-12-062-31/+28
| | | | | | | | | | 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.
* When -n is specified, attempt to turn hostnames found in utmp into IPume2009-11-221-11/+31
| | | | | | | | 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
* Constify format string pointer, otherwise this would trigger warning whendelphij2009-09-081-1/+1
| | | | higher warning level is enabled.
* Fix the problem that the entry broke into two lines with multi-byteume2009-08-303-12/+24
| | | | | | AM/PM format. Reported by: takawata
* w(1) uses strftime %b with to print the abbreviated month nameache2008-08-201-1/+2
| | | | | | | | | | if a user logged in more than a week ago. This may contain multibyte characters (e.g. when using UTF-8). This string is then aligned on byte-length rathern than char-length, resulting in misalignment and unfinished multibyte characters. PR: 126657 Submitted by: Johan van Selst <johans@stack.nl>
* Fix markup.ru2006-12-141-7/+10
|
* Use sysctlbynamephk2006-05-111-6/+1
|
* Obtain true uptime through clock_gettime(CLOCK_MONOTONIC, struct *timespec)andre2005-10-171-9/+3
| | | | | | instead of subtracting 'bootime' from 'now'. Sponsored by: TCP/IP Optimization Fundraise 2005
* Use the ki_udata field that was recently-added to kinfo_proc, instead ofgad2005-06-041-1/+1
| | | | stealing ki_spare[0] to hold a pointer.
* Expand *n't contractions.ru2005-02-131-1/+1
|
* Sort sections.ru2005-01-181-13/+13
|
* Include <sys/proc.h> instead of depending on namespace pollution inbde2004-04-141-11/+9
| | | | | | | | | | | <sys/user.h> for the definition of TDF_SINTR. Fixed anachronous spelling of TDF_SINTR in a comment Demangled VCS ids. There were 2 misplaced copies of $FreeBSD$ and of the include before it. The vendor id infrastructure was edited. Fixed the only other remaining style bug since rev.1.1 (expansion of struct member names made a line too long).
* Do not print the result of strftime() in case of failure, the content ischarnier2003-09-071-5/+3
| | | | | | 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.
* utmp.ut_time is not a time_t, do not pass a pointer to it to pr_attime().peter2003-06-281-1/+4
|
* Fix warning when calling w(1) when logged in via xdm/kdm. This isseanc2002-08-231-4/+3
| | | | | | | 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
* ANSI style function declarations.jmallett2002-06-073-19/+8
|
* Replace /kernel with /boot/kernel/kernel.joe2002-05-092-3/+3
| | | | | PR: docs/37757 Submitted by: Hiten Pandya <hiten@uk.FreeBSD.org>
* remove __Pimp2002-03-222-8/+8
|
* Back out part of rev 1.51. The lesser impact fix is to just removeobrien2002-03-071-11/+10
| | | | the unused global var.
* WARNS=2 fix, use __FBSDID() and sort includes.markm2001-12-113-44/+46
| | | | WARNS=2 not added to Makefile as it is to become default.
* Compensate for "Compensate for header dethreading" by backing it out.bde2001-10-102-2/+0
|
* Fixing a bug that causes very short uptimes (less than one minute) tocjc2001-09-221-1/+2
| | | | | | | | 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
* KSE Milestone 2julian2001-09-121-2/+2
| | | | | | | | | | | | | | Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha
* When -n is specified, don't attempt to turn hostnames found in utmpbrian2001-07-263-43/+42
| | | | | | | | | | | | | 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).
* Remove whitespace at EOL.dd2001-07-152-2/+2
|
* mdoc(7) police: removed HISTORY info from the .Os call.ru2001-07-102-2/+2
|
* Call kvm_close() before exit for consistency.phk2001-05-281-1/+4
| | | | | PR: 24654 Submitted by: Daniel Hemmerich zartik@yahoo.com
* Fix the error buffer passed to kvm_openfiles to have a correct lengthtmm2001-05-261-1/+2
| | | | | | of _POSIX2_LINE_MAX. MFC after: 1 week
* Compensate for header dethreading.markm2001-05-012-0/+2
|
* MAN[1-9] -> MAN.ru2001-03-271-1/+1
|
* Fix width for printing timeache2001-03-211-5/+4
|
* Preserve comma as separator when it is not equal to radix characterache2001-03-031-2/+7
|
* Don't use "," as load avg. separator because it can be precision point in someache2001-03-031-1/+1
| | | | locales, so leads to confusion
* Oops, remove tabs sneaked in wrong placeache2001-03-021-2/+2
|
* Use AM/PM time only when available in localeache2001-03-023-7/+10
|
* Catch up to proc flag changes.jhb2001-01-241-3/+3
|
* Hostnames are case-insensitivebrian2000-12-221-1/+2
|
* If the utmp login time is greater than the tty atime, use it to calculatebrian2000-12-211-1/+7
| | | | | | | | | 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
* Prepare for mdoc(7)NG.ru2000-12-191-1/+1
|
* Change the proc information returned from the kernel so that itmckusick2000-12-123-28/+30
| | | | | | | | | | | | 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.
* mdoc(7) police: use the new features of the Nm macro.ru2000-11-201-1/+1
|
* Use the same technique as ps(1) to avoid the need for setgid. (ie: usepeter1999-11-172-5/+9
| | | | | /dev/null as the default kernel and /dev/mem filenames, but still allow the usual overrides)
OpenPOWER on IntegriCloud