#
331722 |
|
29-Mar-2018 |
eadler |
Revert r330897:
This was intended to be a non-functional change. It wasn't. The commit message was thus wrong. In addition it broke arm, and merged crypto related code.
Revert with prejudice.
This revert skips files touched in r316370 since that commit was since MFCed. This revert also skips files that require $FreeBSD$ property changes.
Thank you to those who helped me get out of this mess including but not limited to gonzo, kevans, rgrimes.
Requested by: gjb (re)
|
#
330897 |
|
14-Mar-2018 |
eadler |
Partial merge of the SPDX changes
These changes are incomplete but are making it difficult to determine what other changes can/should be merged.
No objections from: pfg
|
#
321975 |
|
03-Aug-2017 |
mav |
MFC r321620: Fix singular/plural "users" output.
It was broken during libxo'fication.
PR: 221039 Submitted by: timur@
|
#
317062 |
|
17-Apr-2017 |
araujo |
MFC r314987-r314989, r314993-r314994, r315046-r315049, r315102
r314987: Use nitems() from sys/param.h.
Reviewed by: asomers MFC after: 3 weeks. Differential Revision: https://reviews.freebsd.org/D9944
r314988: Use nitems() from sys/param.h.
Reviewed by: ume MFC after: 3 weeks. Differential Revision: https://reviews.freebsd.org/D9938
r314989: Use nitems() from sys/param.h and also remove the cast.
Reviewed by: markj MFC after: 3 weeks. Differential Revision: https://reviews.freebsd.org/D9937
r314993: Use nitems() from sys/param.h.
Reviewed by: ngie MFC after: 3 weeks. Differential Revision: https://reviews.freebsd.org/D9936
r314994: Use nitems() from sys/param.h.
Reviewed by: ngie MFC after: 3 weeks. Differential Revision: https://reviews.freebsd.org/D9940
r315046: Use nitems() from sys/param.h
Reviewed by: jhb MFC after: 3 weeks. Differential Revision: https://reviews.freebsd.org/D9941
r315047: Use nitems() from sys/param.h.
Reviewed by: np MFC after: 3 weeks. Differential Revision: https://reviews.freebsd.org/D9945
r315048: Use nitems() from sys/param.h.
MFC after: 3 weeks.
r315049: Bring back the cast removed in my previous commit to allow us build vmstat with WARNS 2. This cast was first introduced at r87690.
Reported by: bde, pfg and ngie MFC after: 3 weeks.
r315102: Use nitems() from sys/param.h.
Reviewed by: ngie Differential Revision: https://reviews.freebsd.org/D9943
|
#
302408 |
|
07-Jul-2016 |
gjb |
Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle. Prune svn:mergeinfo from the new branch, as nothing has been merged here.
Additional commits post-branch will follow.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
#
287590 |
|
09-Sep-2015 |
delphij |
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
|
#
285550 |
|
14-Jul-2015 |
markm |
Widen the host field so that a full IPv6 address will be seen.
|
#
281625 |
|
16-Apr-2015 |
allanjude |
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.
|
#
279800 |
|
09-Mar-2015 |
markj |
Call xo_finish(3) before exiting in usage().
|
#
278541 |
|
10-Feb-2015 |
grembo |
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
|
#
274406 |
|
11-Nov-2014 |
marcel |
Fix text output for the uptime command.
Reported by: "Max N. Boyarov" <zotrix@bsd.by>, ae@
|
#
274151 |
|
05-Nov-2014 |
marcel |
Convert to use libxo.
Obtained from: Phil Shafer <phil@juniper.net> Sponsored by: Juniper Networks, Inc.
|
#
272728 |
|
08-Oct-2014 |
eadler |
don't reinvent the wheel: rely on basename(3)
Reviewed by: nwhitehorn
|
#
253750 |
|
28-Jul-2013 |
avg |
Revert r253748,253749
This WIP should not have been committed yet.
Pointyhat to: avg
|
#
253749 |
|
28-Jul-2013 |
avg |
remove needless inclusion of machine/cpu.h in userland
MFC after: 21 days
|
#
245635 |
|
18-Jan-2013 |
jhb |
- Move 'showthreads' check out of fmt.c. - Update shadow copy of fmt_argv() prototype in w.c and fix calls for additional parameter.
|
#
245633 |
|
18-Jan-2013 |
delphij |
Set showthread = 0 for w(1).
X-MFC: together with r245610
|
#
241484 |
|
12-Oct-2012 |
emaste |
Use CLOCK_UPTIME to get the uptime.
|
#
227199 |
|
06-Nov-2011 |
ed |
Add missing static keywords to w(1)
|
#
223786 |
|
05-Jul-2011 |
ed |
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.
|
#
216370 |
|
11-Dec-2010 |
joel |
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
|
#
203688 |
|
08-Feb-2010 |
brucec |
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
|
#
202199 |
|
13-Jan-2010 |
ed |
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.
|
#
201611 |
|
05-Jan-2010 |
dwmalone |
Shuffle parens to avoid type-punning warning.
|
#
200462 |
|
13-Dec-2009 |
delphij |
Revert most part of 200420 as requested, as more review and polish is needed.
|
#
200420 |
|
11-Dec-2009 |
delphij |
Remove unneeded header includes from usr.bin/ except contributed code.
Tested with: make universe
|
#
200172 |
|
05-Dec-2009 |
ed |
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.
|
#
199655 |
|
22-Nov-2009 |
ume |
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
|
#
196652 |
|
30-Aug-2009 |
ume |
Fix the problem that the entry broke into two lines with multi-byte AM/PM format.
Reported by: takawata
|
#
158444 |
|
11-May-2006 |
phk |
Use sysctlbyname
|
#
151417 |
|
17-Oct-2005 |
andre |
Obtain true uptime through clock_gettime(CLOCK_MONOTONIC, struct *timespec) instead of subtracting 'bootime' from 'now'.
Sponsored by: TCP/IP Optimization Fundraise 2005
|
#
146983 |
|
04-Jun-2005 |
gad |
Use the ki_udata field that was recently-added to kinfo_proc, instead of stealing ki_spare[0] to hold a pointer.
|
#
119854 |
|
07-Sep-2003 |
charnier |
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.
|
#
116998 |
|
28-Jun-2003 |
peter |
utmp.ut_time is not a time_t, do not pass a pointer to it to pr_attime().
|
#
102300 |
|
23-Aug-2002 |
seanc |
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
|
#
97981 |
|
06-Jun-2002 |
jmallett |
ANSI style function declarations.
|
#
92922 |
|
21-Mar-2002 |
imp |
remove __P
|
#
91837 |
|
07-Mar-2002 |
obrien |
Back out part of rev 1.51. The lesser impact fix is to just remove the unused global var.
|
#
87674 |
|
11-Dec-2001 |
markm |
WARNS=2 fix, use __FBSDID() and sort includes.
WARNS=2 not added to Makefile as it is to become default.
|
#
84768 |
|
10-Oct-2001 |
bde |
Compensate for "Compensate for header dethreading" by backing it out.
|
#
83815 |
|
22-Sep-2001 |
cjc |
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
|
#
80407 |
|
26-Jul-2001 |
brian |
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).
|
#
77367 |
|
28-May-2001 |
phk |
Call kvm_close() before exit for consistency.
PR: 24654 Submitted by: Daniel Hemmerich zartik@yahoo.com
|
#
77212 |
|
25-May-2001 |
tmm |
Fix the error buffer passed to kvm_openfiles to have a correct length of _POSIX2_LINE_MAX.
MFC after: 1 week
|
#
76169 |
|
01-May-2001 |
markm |
Compensate for header dethreading.
|
#
73385 |
|
03-Mar-2001 |
ache |
Preserve comma as separator when it is not equal to radix character
|
#
73368 |
|
02-Mar-2001 |
ache |
Don't use "," as load avg. separator because it can be precision point in some locales, so leads to confusion
|
#
73365 |
|
02-Mar-2001 |
ache |
Use AM/PM time only when available in locale
|
#
70272 |
|
22-Dec-2000 |
brian |
Hostnames are case-insensitive
|
#
70242 |
|
20-Dec-2000 |
brian |
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
|
#
69896 |
|
12-Dec-2000 |
mckusick |
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.
|
#
53279 |
|
17-Nov-1999 |
peter |
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)
|
#
50477 |
|
27-Aug-1999 |
peter |
$Id$ -> $FreeBSD$
|
#
49177 |
|
28-Jul-1999 |
green |
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
|
#
48566 |
|
04-Jul-1999 |
billf |
Clean up some ambiguous nested if/elses.
|
#
45946 |
|
22-Apr-1999 |
ache |
fix -n with 16-chars hostnames, modified patch from PR
PR: 11286 Submitted by: Hans Huebner <hans@chaosradio.berlin.ccc.de>
|
#
45201 |
|
31-Mar-1999 |
brian |
Get things right for tty names of length UT_LINESIZE. Cosmetic: Don't shadow the `p' variable. Remove two unused variables. PR: 3638
|
#
42481 |
|
10-Jan-1999 |
peter |
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.
|
#
42055 |
|
24-Dec-1998 |
dillon |
No __profname bozoness, no strstr() bozoness... test argv[0] against "uptime" the right way. Sheesh.
|
#
42050 |
|
24-Dec-1998 |
steve |
Since argv is in scope, use argv[0] instead of __progname.
Suggested by: bde
|
#
41022 |
|
08-Nov-1998 |
steve |
Do a better job of determining if we were called as uptime(1).
PR: 8593
|
#
36793 |
|
09-Jun-1998 |
imp |
Remove unused strvisx.
|
#
36276 |
|
21-May-1998 |
jkoshy |
Cosmetic fix. Compute header field widths from UT_{HOST,LINE,NAME}SIZE instead of hardcoding header line.
PR: 6325
|
#
36031 |
|
14-May-1998 |
jkoshy |
Allow `w' to treat a corrupted "utmp" as a non fatal error.
PR: bin/2832
|
#
35309 |
|
19-Apr-1998 |
phk |
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>
|
#
30389 |
|
13-Oct-1997 |
ache |
If uptime < 1 min print in in secs otherwise we got confusing message "up 1 user"
|
#
29311 |
|
12-Sep-1997 |
ache |
Document newly added -d option and fix usage string
|
#
29310 |
|
12-Sep-1997 |
ache |
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
|
#
28694 |
|
25-Aug-1997 |
charnier |
Typo in usage(). Err -> errx when testing allocations.
|
#
24360 |
|
29-Mar-1997 |
imp |
compare return value from getopt against -1 rather than EOF, per the final posix standard on the topic.
|
#
23493 |
|
07-Mar-1997 |
yokota |
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.
|
#
22558 |
|
11-Feb-1997 |
danny |
Reduce the command field width by one when idle time is > 9 days, to eliminate unsightly blank line.
Possibly a 2.2 candidate.
|
#
20155 |
|
05-Dec-1996 |
ache |
Increase username field to reflect utmp changes
|
#
16455 |
|
17-Jun-1996 |
ache |
Do not print herror message, if w -n gethostname failed to be 100% compatible with any program Suggested by: peter
|
#
16446 |
|
17-Jun-1996 |
ache |
Fix xterm/screen/(any program using just :xxx form) compatibility
|
#
16443 |
|
17-Jun-1996 |
ache |
Don't try convert "-" to numeric form for -n option
|
#
16436 |
|
17-Jun-1996 |
ache |
Fix w -n to really show numeric addresses, close PR 402 Partially submitted by: henrich@msu.edu (Charles Henrich)
|
#
15993 |
|
30-May-1996 |
pst |
Drop privileges if not using standard namelist or kernel file. Submitted by: smpatel (Sujal Patel)
|
#
11811 |
|
26-Oct-1995 |
ache |
Change locale to LC_ALL, there is no bitmask
|
#
11755 |
|
24-Oct-1995 |
ache |
Add setlocale LC_TIME|LC_CTYPE
|
#
10553 |
|
03-Sep-1995 |
peter |
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.
|
#
9987 |
|
07-Aug-1995 |
wollman |
Delete bogus referneces to timezone code internal header file `tzfile.h', which is no longer bogusly installed in /usr/include.
|
#
9573 |
|
18-Jul-1995 |
peter |
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
|
#
9555 |
|
17-Jul-1995 |
peter |
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:
|
#
8874 |
|
30-May-1995 |
rgrimes |
Remove trailing whitespace.
|
#
8555 |
|
16-May-1995 |
dg |
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
|
#
6542 |
|
18-Feb-1995 |
smace |
Correct the grammar for the label of the number of users. It is plural when zero and >1 users are logged in.
|
#
3138 |
|
26-Sep-1994 |
ache |
idle time == 0 printed now as "-" like in good old BSD skip cua* 3 chars as tty* 3 lchars
|
#
1591 |
|
27-May-1994 |
rgrimes |
This commit was generated by cvs2svn to compensate for changes in r1590, which included commits to RCS files with non-trunk default branches.
|
#
1590 |
|
27-May-1994 |
rgrimes |
BSD 4.4 Lite Usr.bin Sources
|