aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/w
Commit message (Collapse)AuthorAgeFilesLines
* Revert r253748,253749Andriy Gapon2013-07-281-0/+1
| | | | | | | | | This WIP should not have been committed yet. Pointyhat to: avg Notes: svn path=/head/; revision=253750
* remove needless inclusion of machine/cpu.h in userlandAndriy Gapon2013-07-281-1/+0
| | | | | | | MFC after: 21 days Notes: svn path=/head/; revision=253749
* - Move 'showthreads' check out of fmt.c.John Baldwin2013-01-191-4/+3
| | | | | | | | - Update shadow copy of fmt_argv() prototype in w.c and fix calls for additional parameter. Notes: svn path=/head/; revision=245635
* Set showthread = 0 for w(1).Xin LI2013-01-181-0/+1
| | | | | | | X-MFC: together with r245610 Notes: svn path=/head/; revision=245633
* Fix whitespace.Ed Schouten2012-11-172-7/+6
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=243183
* Use CLOCK_UPTIME to get the uptime.Ed Maste2012-10-121-1/+1
| | | | Notes: svn path=/head/; revision=241484
* Bump date missed in r202756Eitan Adler2012-09-141-1/+1
| | | | | | | | | | PR: docs/171624 Submitted by: bdrewery Approved by: gabor MFC after: 3 days Notes: svn path=/head/; revision=240506
* Add missing static keywords to w(1)Ed Schouten2011-11-061-14/+13
| | | | Notes: svn path=/head/; revision=227199
* Only print entries for which ut_host points to a character device.Ed Schouten2011-07-051-1/+1
| | | | | | | | | 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. Notes: svn path=/head/; revision=223786
* Remove the advertising clause from UCB copyrighted files in usr.bin. ThisJoel Dahl2010-12-116-24/+0
| | | | | | | | | | | | 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 Notes: svn path=/head/; revision=216370
* Initialize the execfile argument to NULL instead of _PATH_DEVNULL. This ↵Rebecca Cran2010-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 Notes: svn path=/head/; revision=203688
* Remove stale references to utmp(5) and its corresponding filenames.Ed Schouten2010-01-211-2/+2
| | | | | | | I removed utmp and its manpage, but not other manpages referring to it. Notes: svn path=/head/; revision=202756
* Port w(1) to utmpx.Ed Schouten2010-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. Notes: svn path=/head/; revision=202199
* This now passes a make universe with WARNS=6.David Malone2010-01-071-2/+0
| | | | Notes: svn path=/head/; revision=201727
* Shuffle parens to avoid type-punning warning.David Malone2010-01-051-1/+1
| | | | Notes: svn path=/head/; revision=201611
* Build usr.bin/ with WARNS=6 by default.Ed Schouten2010-01-021-0/+2
| | | | | | | Also add some missing $FreeBSD$ to keep svn happy. Notes: svn path=/head/; revision=201386
* Revert most part of 200420 as requested, as more review and polish isXin LI2009-12-132-0/+4
| | | | | | | needed. Notes: svn path=/head/; revision=200462
* Remove unneeded header includes from usr.bin/ except contributed code.Xin LI2009-12-112-4/+0
| | | | | | | Tested with: make universe Notes: svn path=/head/; revision=200420
* Let w(1) use utmpx.Ed Schouten2009-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. Notes: svn path=/head/; revision=200172
* When -n is specified, attempt to turn hostnames found in utmp into IPHajimu UMEMOTO2009-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 Notes: svn path=/head/; revision=199655
* Constify format string pointer, otherwise this would trigger warning whenXin LI2009-09-081-1/+1
| | | | | | | higher warning level is enabled. Notes: svn path=/head/; revision=196956
* Fix the problem that the entry broke into two lines with multi-byteHajimu UMEMOTO2009-08-303-12/+24
| | | | | | | | | AM/PM format. Reported by: takawata Notes: svn path=/head/; revision=196652
* w(1) uses strftime %b with to print the abbreviated month nameAndrey A. Chernov2008-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> Notes: svn path=/head/; revision=181922
* Fix markup.Ruslan Ermilov2006-12-141-7/+10
| | | | Notes: svn path=/head/; revision=165226
* Use sysctlbynamePoul-Henning Kamp2006-05-111-6/+1
| | | | Notes: svn path=/head/; revision=158444
* Obtain true uptime through clock_gettime(CLOCK_MONOTONIC, struct *timespec)Andre Oppermann2005-10-171-9/+3
| | | | | | | | | instead of subtracting 'bootime' from 'now'. Sponsored by: TCP/IP Optimization Fundraise 2005 Notes: svn path=/head/; revision=151417
* Use the ki_udata field that was recently-added to kinfo_proc, instead ofGarance A Drosehn2005-06-041-1/+1
| | | | | | | stealing ki_spare[0] to hold a pointer. Notes: svn path=/head/; revision=146983
* Expand *n't contractions.Ruslan Ermilov2005-02-131-1/+1
| | | | Notes: svn path=/head/; revision=141846
* Sort sections.Ruslan Ermilov2005-01-181-13/+13
| | | | Notes: svn path=/head/; revision=140420
* Include <sys/proc.h> instead of depending on namespace pollution inBruce Evans2004-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). Notes: svn path=/head/; revision=128231
* Do not print the result of strftime() in case of failure, the content isPhilippe Charnier2003-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. Notes: svn path=/head/; revision=119854
* utmp.ut_time is not a time_t, do not pass a pointer to it to pr_attime().Peter Wemm2003-06-281-1/+4
| | | | Notes: svn path=/head/; revision=116998
* Fix warning when calling w(1) when logged in via xdm/kdm. This isSean Chittenden2002-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 Notes: svn path=/head/; revision=102300
* ANSI style function declarations.Juli Mallett2002-06-073-19/+8
| | | | Notes: svn path=/head/; revision=97981
* Replace /kernel with /boot/kernel/kernel.Josef Karthauser2002-05-092-3/+3
| | | | | | | | PR: docs/37757 Submitted by: Hiten Pandya <hiten@uk.FreeBSD.org> Notes: svn path=/head/; revision=96247
* remove __PWarner Losh2002-03-222-8/+8
| | | | Notes: svn path=/head/; revision=92922
* Back out part of rev 1.51. The lesser impact fix is to just removeDavid E. O'Brien2002-03-071-11/+10
| | | | | | | the unused global var. Notes: svn path=/head/; revision=91837
* WARNS=2 fix, use __FBSDID() and sort includes.Mark Murray2001-12-113-44/+46
| | | | | | | WARNS=2 not added to Makefile as it is to become default. Notes: svn path=/head/; revision=87674
* Compensate for "Compensate for header dethreading" by backing it out.Bruce Evans2001-10-102-2/+0
| | | | Notes: svn path=/head/; revision=84768
* Fixing a bug that causes very short uptimes (less than one minute) toCrist J. Clark2001-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 Notes: svn path=/head/; revision=83815
* KSE Milestone 2Julian Elischer2001-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 Notes: svn path=/head/; revision=83366
* When -n is specified, don't attempt to turn hostnames found in utmpBrian Somers2001-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). Notes: svn path=/head/; revision=80407
* Remove whitespace at EOL.Dima Dorfman2001-07-152-2/+2
| | | | Notes: svn path=/head/; revision=79755
* mdoc(7) police: removed HISTORY info from the .Os call.Ruslan Ermilov2001-07-102-2/+2
| | | | Notes: svn path=/head/; revision=79535
* Call kvm_close() before exit for consistency.Poul-Henning Kamp2001-05-281-1/+4
| | | | | | | | PR: 24654 Submitted by: Daniel Hemmerich zartik@yahoo.com Notes: svn path=/head/; revision=77367
* Fix the error buffer passed to kvm_openfiles to have a correct lengthThomas Moestl2001-05-261-1/+2
| | | | | | | | | of _POSIX2_LINE_MAX. MFC after: 1 week Notes: svn path=/head/; revision=77212
* Compensate for header dethreading.Mark Murray2001-05-012-0/+2
| | | | Notes: svn path=/head/; revision=76169
* MAN[1-9] -> MAN.Ruslan Ermilov2001-03-271-1/+1
| | | | Notes: svn path=/head/; revision=74848
* Fix width for printing timeAndrey A. Chernov2001-03-211-5/+4
| | | | Notes: svn path=/head/; revision=74603
* Preserve comma as separator when it is not equal to radix characterAndrey A. Chernov2001-03-031-2/+7
| | | | Notes: svn path=/head/; revision=73385