Prefer ${SRCTOP}/foo over ${.CURDIR}/../../foo and ${SRCTOP}/usr.bin/foo
over ${.CURDIR}/../foo for paths in Makefiles.
Differential Revision: https://reviews.freebsd.org/D9932
Sponsored by: Netflix
Silence on: arch@ (twice)
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.
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.
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.
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).