aboutsummaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/bmake/Makefile.config2
-rw-r--r--usr.bin/bmake/unit-tests/Makefile7
-rw-r--r--usr.bin/calendar/calendars/calendar.freebsd1
-rw-r--r--usr.bin/du/du.16
-rw-r--r--usr.bin/find/find.12
-rw-r--r--usr.bin/fortune/datfiles/freebsd-tips2
-rw-r--r--usr.bin/iscsictl/iscsictl.86
-rw-r--r--usr.bin/kyua/Makefile2
-rw-r--r--usr.bin/last/last.16
-rwxr-xr-xusr.bin/man/man.sh13
-rw-r--r--usr.bin/netstat/netstat.136
-rw-r--r--usr.bin/nfsstat/nfsstat.14
-rw-r--r--usr.bin/procstat/procstat.16
-rw-r--r--usr.bin/sed/sed.111
-rw-r--r--usr.bin/sockstat/sockstat.16
-rw-r--r--usr.bin/sockstat/sockstat.c74
-rw-r--r--usr.bin/top/top.13
-rw-r--r--usr.bin/vmstat/vmstat.86
-rw-r--r--usr.bin/w/w.16
-rw-r--r--usr.bin/wc/wc.16
20 files changed, 113 insertions, 92 deletions
diff --git a/usr.bin/bmake/Makefile.config b/usr.bin/bmake/Makefile.config
index 78babc2f1382..8ff6c81b8c78 100644
--- a/usr.bin/bmake/Makefile.config
+++ b/usr.bin/bmake/Makefile.config
@@ -6,7 +6,7 @@ SRCTOP?= ${.CURDIR:H:H}
# things set by configure
-_MAKE_VERSION?=20250618
+_MAKE_VERSION?=20250707
prefix?= /usr
srcdir= ${SRCTOP}/contrib/bmake
diff --git a/usr.bin/bmake/unit-tests/Makefile b/usr.bin/bmake/unit-tests/Makefile
index 1b9a47febe11..d4ee6f33f862 100644
--- a/usr.bin/bmake/unit-tests/Makefile
+++ b/usr.bin/bmake/unit-tests/Makefile
@@ -1,9 +1,9 @@
# This is a generated file, do NOT edit!
# See contrib/bmake/bsd.after-import.mk
#
-# $Id: Makefile,v 1.239 2025/06/15 21:32:16 sjg Exp $
+# $Id: Makefile,v 1.240 2025/06/30 18:40:54 sjg Exp $
#
-# $NetBSD: Makefile,v 1.367 2025/06/13 20:23:16 rillig Exp $
+# $NetBSD: Makefile,v 1.369 2025/06/29 09:40:13 rillig Exp $
#
# Unit tests for make(1)
#
@@ -61,6 +61,7 @@ rm-tmpdir: .NOMETA
# src/tests/usr.bin/make/t_make.sh as well.
#TESTS+= archive
#TESTS+= archive-suffix
+TESTS+= char-005c-reverse-solidus
TESTS+= cmd-errors
TESTS+= cmd-errors-jobs
TESTS+= cmd-errors-lint
@@ -416,6 +417,7 @@ TESTS+= varmod-to-upper
TESTS+= varmod-undefined
TESTS+= varmod-unique
TESTS+= varname
+TESTS+= varname-circumflex
TESTS+= varname-dollar
TESTS+= varname-dot-alltargets
TESTS+= varname-dot-curdir
@@ -544,7 +546,6 @@ TESTS:= ${TESTS:${BROKEN_TESTS:S,^,N,:ts:}}
# Ideas for more tests:
# char-0020-space.mk
-# char-005C-backslash.mk
# escape-cond-str.mk
# escape-cond-func-arg.mk
# escape-varmod.mk
diff --git a/usr.bin/calendar/calendars/calendar.freebsd b/usr.bin/calendar/calendars/calendar.freebsd
index 0b1a37f43723..1ca63b371f65 100644
--- a/usr.bin/calendar/calendars/calendar.freebsd
+++ b/usr.bin/calendar/calendars/calendar.freebsd
@@ -259,6 +259,7 @@
06/11 Alonso Cardenas Marquez <acm@FreeBSD.org> born in Arequipa, Peru, 1979
06/14 Josh Paetzel <jpaetzel@FreeBSD.org> born in Minneapolis, Minnesota, United States, 1973
06/15 Second quarterly status reports are due on 06/30
+06/15 Aymeric Wibo <obiwac@FreeBSD.org> born in Plaistow, London, United Kingdom, 2004
06/17 Tilman Linneweh <arved@FreeBSD.org> born in Weinheim, Baden-Wuerttemberg, Germany, 1978
06/18 Li-Wen Hsu <lwhsu@FreeBSD.org> born in Taipei, Taiwan, Republic of China, 1984
06/18 Roman Bogorodskiy <novel@FreeBSD.org> born in Saratov, Russian Federation, 1986
diff --git a/usr.bin/du/du.1 b/usr.bin/du/du.1
index 37f7d7837b11..1b6d800b0285 100644
--- a/usr.bin/du/du.1
+++ b/usr.bin/du/du.1
@@ -25,7 +25,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd April 29, 2024
+.Dd July 16, 2025
.Dt DU 1
.Os
.Sh NAME
@@ -58,7 +58,7 @@ Generate output via
.Xr libxo 3
in a selection of different human and machine readable formats.
See
-.Xr xo_parse_args 3
+.Xr xo_options 7
for details on command line arguments.
.It Fl A
Display the apparent size instead of the disk usage.
@@ -225,7 +225,7 @@ Also display a grand total at the end:
.Xr chflags 2 ,
.Xr fts 3 ,
.Xr libxo 3 ,
-.Xr xo_parse_args 3 ,
+.Xr xo_options 7 ,
.Xr symlink 7 ,
.Xr quot 8
.Sh STANDARDS
diff --git a/usr.bin/find/find.1 b/usr.bin/find/find.1
index eb3fd4d0dbde..8c2d8624a82a 100644
--- a/usr.bin/find/find.1
+++ b/usr.bin/find/find.1
@@ -1156,7 +1156,7 @@ and was removed in
.At v3 .
It was rewritten for
.At v5
-and later be enhanced for the Programmer's Workbench (PWB).
+and was later enhanced for the Programmer's Workbench (PWB).
These changes were later incorporated in
.At v7 .
.Sh BUGS
diff --git a/usr.bin/fortune/datfiles/freebsd-tips b/usr.bin/fortune/datfiles/freebsd-tips
index 1e9501e3a6fb..6a2b59ff5fa7 100644
--- a/usr.bin/fortune/datfiles/freebsd-tips
+++ b/usr.bin/fortune/datfiles/freebsd-tips
@@ -555,7 +555,7 @@ Use "sysrc name=value" to add an entry and "sysrc -x name" to delete an entry.
You can upload the dmesg of your system to help developers get an overview of commonly
used hardware and peripherals for FreeBSD. Use the curl package to upload it like this:
curl -v -d "nickname=$USER" -d "description=FreeBSD/$(uname -m) on \
-$(kenv smbios.system.maker) $(kenv smbios.system.product)" -d "do=addd" \
+$(kenv smbios.system.maker) $(kenv smbios.system.product)" -d "do=add" \
--data-urlencode 'dmesg@/var/run/dmesg.boot' http://dmesgd.nycbug.org/index.cgi
%
Want to know how much memory (in bytes) your machine has installed? Let
diff --git a/usr.bin/iscsictl/iscsictl.8 b/usr.bin/iscsictl/iscsictl.8
index 74394063a007..88c79c297848 100644
--- a/usr.bin/iscsictl/iscsictl.8
+++ b/usr.bin/iscsictl/iscsictl.8
@@ -24,7 +24,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd December 27, 2018
+.Dd July 16, 2025
.Dt ISCSICTL 8
.Os
.Sh NAME
@@ -88,7 +88,7 @@ Generate output via
.Xr libxo 3
in a selection of different human and machine readable formats.
See
-.Xr xo_parse_args 3
+.Xr xo_options 7
for details on command line arguments.
.It Fl A
Add session.
@@ -190,7 +190,7 @@ Disconnect all iSCSI sessions:
.Dl Nm Fl Ra
.Sh SEE ALSO
.Xr libxo 3 ,
-.Xr xo_parse_args 3 ,
+.Xr xo_options 7 ,
.Xr iscsi 4 ,
.Xr iscsi.conf 5 ,
.Xr iscsid 8
diff --git a/usr.bin/kyua/Makefile b/usr.bin/kyua/Makefile
index d3a7b9b61f64..a4f95f1106d9 100644
--- a/usr.bin/kyua/Makefile
+++ b/usr.bin/kyua/Makefile
@@ -32,7 +32,7 @@ MAN= kyua-about.1 \
CFLAGS+= -I${KYUA_SRCDIR} -I${.CURDIR}
CFLAGS+= -I${SRCTOP}/contrib/lutok/include
-CFLAGS+= -I${SRCTOP}/contrib/sqlite3
+CFLAGS+= -I${SYSROOT:U${DESTDIR}}/${INCLUDEDIR}/private/sqlite3
CFLAGS+= -DHAVE_CONFIG_H
# We compile the kyua libraries as part of the main executable as this saves
diff --git a/usr.bin/last/last.1 b/usr.bin/last/last.1
index f3ccc6e772af..b026ed6a7921 100644
--- a/usr.bin/last/last.1
+++ b/usr.bin/last/last.1
@@ -25,7 +25,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd January 9, 2021
+.Dd July 16, 2025
.Dt LAST 1
.Os
.Sh NAME
@@ -75,7 +75,7 @@ Generate output via
.Xr libxo 3
in a selection of different human and machine readable formats.
See
-.Xr xo_parse_args 3
+.Xr xo_options 7
for details on command line arguments.
.It Fl d Ar date
Specify the snapshot date and time.
@@ -223,7 +223,7 @@ alice ttyv0 Mon Dec 7 19:18 - 22:27 (03:09)
.Xr lastcomm 1 ,
.Xr getutxent 3 ,
.Xr libxo 3 ,
-.Xr xo_parse_args 3 ,
+.Xr xo_options 7 ,
.Xr ac 8 ,
.Xr lastlogin 8
.Sh HISTORY
diff --git a/usr.bin/man/man.sh b/usr.bin/man/man.sh
index ec20fc813bf4..18595042da5f 100755
--- a/usr.bin/man/man.sh
+++ b/usr.bin/man/man.sh
@@ -313,6 +313,8 @@ manpath_warnings() {
# redirected to another source file.
man_check_for_so() {
local IFS line tstr
+ local counter_so=0
+ local counter_so_limit=32
unset IFS
if [ -n "$catpage" ]; then
@@ -320,13 +322,16 @@ man_check_for_so() {
fi
# We need to loop to accommodate multiple .so directives.
- while true
+ while [ $counter_so -lt $counter_so_limit ]
do
+ counter_so=$((counter_so + 1))
+
line=$($cattool "$manpage" 2>/dev/null | grep -E -m1 -v '^\.\\"[ ]*|^[ ]*$')
case "$line" in
'.so /'*) break ;; # ignore absolute path
'.so '*) trim "${line#.so}"
- decho "$manpage includes $tstr"
+ decho "$manpage includes $tstri level=$counter_so"
+
# Glob and check for the file.
if ! check_man "$1/$tstr" ""; then
decho " Unable to find $tstr"
@@ -337,6 +342,10 @@ man_check_for_so() {
esac
done
+ if [ $counter_so -ge $counter_so_limit ]; then
+ decho ".so include limit of $counter_so_limit reached, stop"
+ fi
+
return 0
}
diff --git a/usr.bin/netstat/netstat.1 b/usr.bin/netstat/netstat.1
index 1a2c786e90aa..1931c38a1fad 100644
--- a/usr.bin/netstat/netstat.1
+++ b/usr.bin/netstat/netstat.1
@@ -25,7 +25,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd April 30, 2025
+.Dd July 16, 2025
.Dt NETSTAT 1
.Os
.Sh NAME
@@ -166,7 +166,7 @@ Generate output via
.Xr libxo 3
in a selection of different human and machine readable formats.
See
-.Xr xo_parse_args 3
+.Xr xo_options 7
for details on command line arguments.
.It Fl 4
Show IPv4 only.
@@ -416,7 +416,8 @@ When used with
or
.Fl 6 ,
limit the output to IPv4 or IPv6 routes respectively.
-This option provides details about individual nexthop addresses used in routing decisions.
+This option provides details about individual nexthop addresses
+used in routing decisions.
.It Xo
.Bk -words
.Nm netstat
@@ -430,7 +431,8 @@ When used with
or
.Fl 6 ,
restrict the output to IPv4 or IPv6 nexthop groups respectively.
-This option shows grouped nexthop entries for multipath or load-balanced routing setups.
+This option shows grouped nexthop entries for multipath or
+load-balanced routing setups.
.It Xo
.Bk -words
.Nm
@@ -926,25 +928,25 @@ binary is not available in the
.Sh EXAMPLES
Show packet traffic information (packets, bytes, errors, packet drops, etc) for
interface re0 updated every 2 seconds and exit after 5 outputs:
-.Bd -literal -offset indent
-$ netstat -w 2 -q 5 -I re0
-.Ed
+.Pp
+.Dl netstat -w 2 -q 5 -I re0
.Pp
Show statistics for ICMP on any interface:
-.Bd -literal -offset indent
-$ netstat -s -p icmp
-.Ed
+.Pp
+.Dl netstat -s -p icmp
.Pp
Show routing tables:
-.Bd -literal -offset indent
-$ netstat -r
-.Ed
+.Pp
+.Dl netstat -r
.Pp
Same as above, but without resolving numeric addresses and port numbers to
names:
-.Bd -literal -offset indent
-$ netstat -rn
-.Ed
+.Pp
+.Dl netstat -rn
+.Pp
+Show IPv4 listening sockets:
+.Pp
+.Dl netstat -4l
.Sh SEE ALSO
.Xr fstat 1 ,
.Xr nfsstat 1 ,
@@ -952,7 +954,7 @@ $ netstat -rn
.Xr ps 1 ,
.Xr sockstat 1 ,
.Xr libxo 3 ,
-.Xr xo_parse_args 3 ,
+.Xr xo_options 7 ,
.Xr bpf 4 ,
.Xr inet 4 ,
.Xr route 4 ,
diff --git a/usr.bin/nfsstat/nfsstat.1 b/usr.bin/nfsstat/nfsstat.1
index 7d641b50f1ac..a4a00586f21b 100644
--- a/usr.bin/nfsstat/nfsstat.1
+++ b/usr.bin/nfsstat/nfsstat.1
@@ -25,7 +25,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd December 28, 2023
+.Dd July 16, 2025
.Dt NFSSTAT 1
.Os
.Sh NAME
@@ -123,7 +123,7 @@ Generate output via
.Xr libxo 3
in a selection of different human and machine readable formats.
See
-.Xr xo_parse_args 3
+.Xr xo_options 7
for details on command line arguments.
.El
.Sh SEE ALSO
diff --git a/usr.bin/procstat/procstat.1 b/usr.bin/procstat/procstat.1
index 1e05e235e619..b810abf66da7 100644
--- a/usr.bin/procstat/procstat.1
+++ b/usr.bin/procstat/procstat.1
@@ -23,7 +23,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd April 7, 2022
+.Dd July 16, 2025
.Dt PROCSTAT 1
.Os
.Sh NAME
@@ -136,7 +136,7 @@ flag is specified the output is generated via
.Xr libxo 3
in a selection of different human and machine readable formats.
See
-.Xr xo_parse_args 3
+.Xr xo_options 7
for details on command line arguments.
.Pp
The following commands are available for
@@ -870,7 +870,7 @@ procstat: procstat_getprocs()
.Xr libprocstat 3 ,
.Xr libxo 3 ,
.Xr signal 3 ,
-.Xr xo_parse_args 3 ,
+.Xr xo_options 7 ,
.Xr ddb 4 ,
.Xr divert 4 ,
.Xr icmp 4 ,
diff --git a/usr.bin/sed/sed.1 b/usr.bin/sed/sed.1
index 345f673310d8..5fd894eaf78b 100644
--- a/usr.bin/sed/sed.1
+++ b/usr.bin/sed/sed.1
@@ -1,3 +1,6 @@
+.\"
+.\" SPDX-License-Identifier: BSD-3-Clause
+.\"
.\" Copyright (c) 1992, 1993
.\" The Regents of the University of California. All rights reserved.
.\"
@@ -28,7 +31,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd December 17, 2024
+.Dd June 14, 2025
.Dt SED 1
.Os
.Sh NAME
@@ -597,17 +600,17 @@ with
.Ql baz
when piped from another command:
.Bd -literal -offset indent
-echo "An alternate word, like bar, is sometimes used in examples." | sed 's/bar/baz/'
+echo "use bar in examples" | sed 's/bar/baz/'
.Ed
.Pp
Using backlashes can sometimes be hard to read and follow:
.Bd -literal -offset indent
-echo "/home/example" | sed 's/\\/home\\/example/\\/usr\\/local\\/example/'
+echo "/bin/bash" | sed 's/\\/bin\\/bash/\\/bin\\/sh/'
.Ed
.Pp
Using a different separator can be handy when working with paths:
.Bd -literal -offset indent
-echo "/home/example" | sed 's#/home/example#/usr/local/example#'
+echo "/bin/bash" | sed 's#/bin/bash#/bin/sh#'
.Ed
.Pp
Replace all occurrences of
diff --git a/usr.bin/sockstat/sockstat.1 b/usr.bin/sockstat/sockstat.1
index da658e33e542..4832a09764fd 100644
--- a/usr.bin/sockstat/sockstat.1
+++ b/usr.bin/sockstat/sockstat.1
@@ -25,7 +25,7 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd June 27, 2025
+.Dd June 30, 2025
.Dt SOCKSTAT 1
.Os
.Sh NAME
@@ -33,7 +33,7 @@
.Nd list open sockets
.Sh SYNOPSIS
.Nm
-.Op Fl 46ACcfIiLlnqSsUuv
+.Op Fl 46ACcfIiLlnqSsUuvw
.Op Fl j Ar jail
.Op Fl p Ar ports
.Op Fl P Ar protocols
@@ -119,6 +119,8 @@ Show
sockets.
.It Fl v
Verbose mode.
+.It Fl w
+Automatically size the columns.
.El
.Pp
If neither
diff --git a/usr.bin/sockstat/sockstat.c b/usr.bin/sockstat/sockstat.c
index 1a24ff67c321..d0540c54a1aa 100644
--- a/usr.bin/sockstat/sockstat.c
+++ b/usr.bin/sockstat/sockstat.c
@@ -97,6 +97,7 @@ static bool opt_s; /* Show protocol state if applicable */
static bool opt_U; /* Show remote UDP encapsulation port number */
static bool opt_u; /* Show Unix domain sockets */
static u_int opt_v; /* Verbose mode */
+static bool opt_w; /* Automatically size the columns */
/*
* Default protocols to use if no -P was defined.
@@ -1101,7 +1102,7 @@ format_unix_faddr(struct addr *faddr, char *buf, size_t bufsize) {
/* Remote peer we connect(2) to, if any. */
if (faddr->conn != 0) {
struct sock *p;
- pos += strlcpy(buf, "-> ", bufsize);
+ pos += strlcpy(SAFEBUF, "-> ", SAFESIZE);
p = RB_FIND(pcbs_t, &pcbs,
&(struct sock){ .pcb = faddr->conn });
if (__predict_false(p == NULL)) {
@@ -1132,8 +1133,7 @@ format_unix_faddr(struct addr *faddr, char *buf, size_t bufsize) {
while ((p = RB_FIND(pcbs_t, &pcbs,
&(struct sock){ .pcb = ref })) != 0) {
f = RB_FIND(files_t, &ftree,
- &(struct file){ .xf_data =
- p->socket });
+ &(struct file){ .xf_data = p->socket });
if (f != NULL) {
pos += snprintf(SAFEBUF, SAFESIZE,
"%s[%lu %d]", fref ? "" : ",",
@@ -1178,13 +1178,10 @@ calculate_sock_column_widths(struct col_widths *cw, struct sock *s)
len = strlen(s->protoname);
if (s->vflag & (INP_IPV4 | INP_IPV6))
len += 1;
- if (laddr != NULL && faddr != NULL && s->family == AF_UNIX &&
- laddr->address.ss_len == 0 && faddr->conn == 0)
- len += strlen(" (not connected)");
cw->proto = MAX(cw->proto, len);
while (laddr != NULL || faddr != NULL) {
- if (s->family == AF_UNIX) {
+ if (opt_w && s->family == AF_UNIX) {
if ((laddr == NULL) || (faddr == NULL))
errx(1, "laddr = %p or faddr = %p is NULL",
(void *)laddr, (void *)faddr);
@@ -1193,7 +1190,7 @@ calculate_sock_column_widths(struct col_widths *cw, struct sock *s)
cw->local_addr = MAX(cw->local_addr, len);
len = format_unix_faddr(faddr, NULL, 0);
cw->foreign_addr = MAX(cw->foreign_addr, len);
- } else {
+ } else if (opt_w) {
if (laddr != NULL) {
len = formataddr(&laddr->address, NULL, 0);
cw->local_addr = MAX(cw->local_addr, len);
@@ -1296,23 +1293,6 @@ calculate_sock_column_widths(struct col_widths *cw, struct sock *s)
static void
calculate_column_widths(struct col_widths *cw)
{
- cw->user = 4;
- cw->command = 10;
- cw->pid = 3;
- cw->fd = 2;
- cw->proto = 5;
- cw->local_addr = 13;
- cw->foreign_addr = 15;
- cw->pcb_kva = 18;
- cw->fib = 3;
- cw->splice_address = 14;
- cw->inp_gencnt = 2;
- cw->encaps = 6;
- cw->path_state = 10;
- cw->conn_state = 10;
- cw->stack = 5;
- cw->cc = 2;
-
int n, len;
struct file *xf;
struct sock *s;
@@ -1366,13 +1346,10 @@ display_sock(struct sock *s, struct col_widths *cw, char *buf, size_t bufsize)
faddr = s->faddr;
first = true;
- snprintf(buf, bufsize, "%s%s%s%s",
+ snprintf(buf, bufsize, "%s%s%s",
s->protoname,
s->vflag & INP_IPV4 ? "4" : "",
- s->vflag & INP_IPV6 ? "6" : "",
- (laddr != NULL && faddr != NULL &&
- s->family == AF_UNIX && laddr->address.ss_len == 0 &&
- faddr->conn == 0) ? " (not connected)" : "");
+ s->vflag & INP_IPV6 ? "6" : "");
printf(" %-*s", cw->proto, buf);
while (laddr != NULL || faddr != NULL) {
if (s->family == AF_UNIX) {
@@ -1381,23 +1358,27 @@ display_sock(struct sock *s, struct col_widths *cw, char *buf, size_t bufsize)
(void *)laddr, (void *)faddr);
if (laddr->address.ss_len > 0)
formataddr(&laddr->address, buf, bufsize);
+ else if (laddr->address.ss_len == 0 && faddr->conn == 0)
+ strlcpy(buf, "(not connected)", bufsize);
else
strlcpy(buf, "??", bufsize);
- printf(" %-*s", cw->local_addr, buf);
+ printf(" %-*.*s", cw->local_addr, cw->local_addr, buf);
if (format_unix_faddr(faddr, buf, bufsize) == 0)
strlcpy(buf, "??", bufsize);
- printf(" %-*s", cw->foreign_addr, buf);
+ printf(" %-*.*s", cw->foreign_addr,
+ cw->foreign_addr, buf);
} else {
if (laddr != NULL)
formataddr(&laddr->address, buf, bufsize);
else
strlcpy(buf, "??", bufsize);
- printf(" %-*s", cw->local_addr, buf);
+ printf(" %-*.*s", cw->local_addr, cw->local_addr, buf);
if (faddr != NULL)
formataddr(&faddr->address, buf, bufsize);
else
strlcpy(buf, "??", bufsize);
- printf(" %-*s", cw->foreign_addr, buf);
+ printf(" %-*.*s", cw->foreign_addr,
+ cw->foreign_addr, buf);
}
if (opt_A)
printf(" %#*" PRIx64, cw->pcb_kva, s->pcb);
@@ -1411,6 +1392,8 @@ display_sock(struct sock *s, struct col_widths *cw, char *buf, size_t bufsize)
if (sp != NULL)
formataddr(&sp->laddr->address,
buf, bufsize);
+ else
+ strlcpy(buf, "??", bufsize);
} else
strlcpy(buf, "??", bufsize);
printf(" %-*s", cw->splice_address, buf);
@@ -1510,6 +1493,25 @@ display(void)
err(1, "malloc()");
return;
}
+
+ cw = (struct col_widths) {
+ .user = strlen("USER"),
+ .command = 10,
+ .pid = strlen("PID"),
+ .fd = strlen("FD"),
+ .proto = strlen("PROTO"),
+ .local_addr = opt_w ? strlen("LOCAL ADDRESS") : 21,
+ .foreign_addr = opt_w ? strlen("FOREIGN ADDRESS") : 21,
+ .pcb_kva = 18,
+ .fib = strlen("FIB"),
+ .splice_address = strlen("SPLICE ADDRESS"),
+ .inp_gencnt = strlen("ID"),
+ .encaps = strlen("ENCAPS"),
+ .path_state = strlen("PATH STATE"),
+ .conn_state = strlen("CONN STATE"),
+ .stack = strlen("STACK"),
+ .cc = strlen("CC"),
+ };
calculate_column_widths(&cw);
if (!opt_q) {
@@ -1642,7 +1644,7 @@ static void
usage(void)
{
errx(1,
- "usage: sockstat [-46ACcfIiLlnqSsUuv] [-j jid] [-p ports] [-P protocols]");
+ "usage: sockstat [-46ACcfIiLlnqSsUuvw] [-j jid] [-p ports] [-P protocols]");
}
int
@@ -1721,7 +1723,7 @@ main(int argc, char *argv[])
++opt_v;
break;
case 'w':
- /* left for backward compatibility. */
+ opt_w = true;
break;
default:
usage();
diff --git a/usr.bin/top/top.1 b/usr.bin/top/top.1
index d8ef763e7a34..53b078839526 100644
--- a/usr.bin/top/top.1
+++ b/usr.bin/top/top.1
@@ -1,4 +1,4 @@
-.Dd April 1, 2025
+.Dd June 9, 2025
.Dt TOP 1
.Os
.Sh NAME
@@ -398,6 +398,7 @@ ID corresponding to the process,
USERNAME is the name of the process's owner (if
.Fl u
is specified, a UID column will be substituted for USERNAME),
+THR is the thread count, showing the number of threads a process has,
PRI is the current priority of the process,
NICE is the
.Xr nice 1
diff --git a/usr.bin/vmstat/vmstat.8 b/usr.bin/vmstat/vmstat.8
index de4176c9361c..80facb05cc35 100644
--- a/usr.bin/vmstat/vmstat.8
+++ b/usr.bin/vmstat/vmstat.8
@@ -25,7 +25,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd June 21, 2021
+.Dd July 16, 2025
.Dt VMSTAT 8
.Os
.Sh NAME
@@ -71,7 +71,7 @@ Generate output via
.Xr libxo 3
in a selection of different human and machine readable formats.
See
-.Xr xo_parse_args 3
+.Xr xo_options 7
for details on command line arguments.
.It Fl a
When used with
@@ -371,7 +371,7 @@ statistics every second.
.Xr systat 1 ,
.Xr libmemstat 3 ,
.Xr libxo 3 ,
-.Xr xo_parse_args 3 ,
+.Xr xo_options 7 ,
.Xr gstat 8 ,
.Xr iostat 8 ,
.Xr pstat 8 ,
diff --git a/usr.bin/w/w.1 b/usr.bin/w/w.1
index a92edc6f0059..159eb3370c8c 100644
--- a/usr.bin/w/w.1
+++ b/usr.bin/w/w.1
@@ -25,7 +25,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd August 24, 2020
+.Dd July 16, 2025
.Dt W 1
.Os
.Sh NAME
@@ -61,7 +61,7 @@ Generate output via
.Xr libxo 3
in a selection of different human and machine readable formats.
See
-.Xr xo_parse_args 3
+.Xr xo_options 7
for details on command line arguments.
.It Fl d
dumps out the entire process list on a per controlling
@@ -145,7 +145,7 @@ flags are no longer supported.
.Xr uptime 1 ,
.Xr who 1 ,
.Xr libxo 3 ,
-.Xr xo_parse_args 3
+.Xr xo_options 7
.Sh HISTORY
The
.Nm
diff --git a/usr.bin/wc/wc.1 b/usr.bin/wc/wc.1
index 482145c8f01f..656408794950 100644
--- a/usr.bin/wc/wc.1
+++ b/usr.bin/wc/wc.1
@@ -28,7 +28,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd April 11, 2020
+.Dd July 16, 2025
.Dt WC 1
.Os
.Sh NAME
@@ -70,7 +70,7 @@ Generate output via
.Xr libxo 3
in a selection of different human and machine readable formats.
See
-.Xr xo_parse_args 3
+.Xr xo_options 7
for details on command line arguments.
.It Fl L
Write the length of the line containing the most bytes (default) or characters
@@ -196,7 +196,7 @@ utility.
.Sh SEE ALSO
.Xr iswspace 3 ,
.Xr libxo 3 ,
-.Xr xo_parse_args 3
+.Xr xo_options 7
.Sh STANDARDS
The
.Nm