aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/Makefile2
-rw-r--r--usr.sbin/acpi/acpidump/acpi.c9
-rw-r--r--usr.sbin/apm/Makefile1
-rw-r--r--usr.sbin/apm/apm.89
-rw-r--r--usr.sbin/arp/arp.c32
-rw-r--r--usr.sbin/arp/arp.h9
-rw-r--r--usr.sbin/arp/arp_netlink.c20
-rw-r--r--usr.sbin/bhyve/bhyve.826
-rw-r--r--usr.sbin/bhyve/net_backends.c19
-rw-r--r--usr.sbin/blacklistctl/Makefile7
-rw-r--r--usr.sbin/blacklistd/Makefile9
-rw-r--r--usr.sbin/blacklistd/blacklistd.conf10
-rw-r--r--usr.sbin/blocklistctl/Makefile22
-rw-r--r--usr.sbin/blocklistctl/Makefile.depend18
-rw-r--r--usr.sbin/blocklistd/Makefile23
-rw-r--r--usr.sbin/blocklistd/Makefile.depend18
-rw-r--r--usr.sbin/blocklistd/blocklistd.conf16
-rw-r--r--usr.sbin/bluetooth/rtlbtfw/main.c5
-rw-r--r--usr.sbin/bluetooth/rtlbtfw/rtlbtfw.conf10
-rw-r--r--usr.sbin/bsdinstall/Makefile3
-rw-r--r--usr.sbin/bsdinstall/bsdinstall.84
-rw-r--r--usr.sbin/bsdinstall/partedit/gpart_ops.c14
-rw-r--r--usr.sbin/bsdinstall/partedit/part_wizard.c25
-rwxr-xr-xusr.sbin/bsdinstall/scripts/auto6
-rwxr-xr-xusr.sbin/bsdinstall/scripts/bootconfig2
-rwxr-xr-xusr.sbin/bsdinstall/scripts/jail8
-rwxr-xr-xusr.sbin/bsdinstall/scripts/keymap2
-rwxr-xr-xusr.sbin/bsdinstall/scripts/script2
-rwxr-xr-xusr.sbin/bsdinstall/scripts/zfsboot4
-rw-r--r--usr.sbin/bsnmpd/bsnmpd/Makefile203
-rw-r--r--usr.sbin/certctl/certctl.86
-rw-r--r--usr.sbin/cron/lib/env.c5
-rw-r--r--usr.sbin/ctld/ctld.cc5
-rw-r--r--usr.sbin/ctld/ctld.hh1
-rw-r--r--usr.sbin/ctld/nvmf.cc77
-rw-r--r--usr.sbin/ctld/nvmf.hh16
-rw-r--r--usr.sbin/cxgbetool/reg_defs_t7.c126
-rw-r--r--usr.sbin/cxgbetool/tcbshowt7.c2
-rw-r--r--usr.sbin/dumpcis/dumpcis.83
-rw-r--r--usr.sbin/freebsd-update/freebsd-update.sh2
-rw-r--r--usr.sbin/fwcontrol/fwcontrol.c2
-rw-r--r--usr.sbin/fwget/pci/pci_network_mediatek36
-rw-r--r--usr.sbin/inetd/inetd.840
-rw-r--r--usr.sbin/iovctl/iovctl.82
-rw-r--r--usr.sbin/jail/jail.831
-rw-r--r--usr.sbin/mixer/mixer.844
-rw-r--r--usr.sbin/nfsuserd/nfsuserd.c16
-rwxr-xr-xusr.sbin/periodic/etc/security/520.pfdenied2
-rw-r--r--usr.sbin/periodic/etc/weekly/Makefile11
-rw-r--r--usr.sbin/pkg/Makefile1
-rw-r--r--usr.sbin/pmcstat/pmcpl_callgraph.c2
-rw-r--r--usr.sbin/pmcstat/pmcstat.c9
-rw-r--r--usr.sbin/pw/pwupd.c2
-rw-r--r--usr.sbin/quot/Makefile8
-rw-r--r--usr.sbin/quot/quot.89
-rw-r--r--usr.sbin/quot/quot.c339
-rw-r--r--usr.sbin/quot/tests/Makefile4
-rw-r--r--usr.sbin/quot/tests/quot_test.sh102
-rw-r--r--usr.sbin/rpc.tlsservd/rpc.tlsservd.c7
-rw-r--r--usr.sbin/sndctl/sndctl.c4
-rw-r--r--usr.sbin/sysrc/sysrc.889
-rw-r--r--usr.sbin/unbound/Makefile.inc2
-rwxr-xr-xusr.sbin/unbound/setup/local-unbound-setup.sh1
-rw-r--r--usr.sbin/utx/utx.82
-rw-r--r--usr.sbin/virtual_oss/virtual_bt_speaker/bt_speaker.c1
-rw-r--r--usr.sbin/virtual_oss/virtual_oss/int.h3
-rw-r--r--usr.sbin/virtual_oss/virtual_oss/main.c42
-rw-r--r--usr.sbin/virtual_oss/virtual_oss/utils.h31
68 files changed, 884 insertions, 739 deletions
diff --git a/usr.sbin/Makefile b/usr.sbin/Makefile
index 3c5fd0973a43..44679ca290a5 100644
--- a/usr.sbin/Makefile
+++ b/usr.sbin/Makefile
@@ -121,6 +121,8 @@ SUBDIR.${MK_AUTHPF}+= authpf
SUBDIR.${MK_AUTOFS}+= autofs
SUBDIR.${MK_BLACKLIST}+= blacklistctl
SUBDIR.${MK_BLACKLIST}+= blacklistd
+SUBDIR.${MK_BLOCKLIST}+= blocklistctl
+SUBDIR.${MK_BLOCKLIST}+= blocklistd
SUBDIR.${MK_BLUETOOTH}+= bluetooth
SUBDIR.${MK_BOOTPARAMD}+= bootparamd
SUBDIR.${MK_BSDINSTALL}+= bsdinstall
diff --git a/usr.sbin/acpi/acpidump/acpi.c b/usr.sbin/acpi/acpidump/acpi.c
index 63613d5a4707..026795118832 100644
--- a/usr.sbin/acpi/acpidump/acpi.c
+++ b/usr.sbin/acpi/acpidump/acpi.c
@@ -1913,16 +1913,19 @@ acpi_handle_ivrs_ivmd_type(ACPI_IVRS_MEMORY *addr)
static void
acpi_handle_ivrs_ivmd(ACPI_IVRS_MEMORY *addr)
{
+ UINT16 x16;
+
printf("\tMem Type=%#x(%s) ",
addr->Header.Type, acpi_handle_ivrs_ivmd_type(addr));
switch (addr->Header.Type) {
case ACPI_IVRS_TYPE_MEMORY2:
- printf("Id=%#06x PCISeg=%#x ", addr->Header.DeviceId,
- *(UINT16 *)&addr->Reserved);
+ memcpy(&x16, &addr->Reserved, sizeof(x16));
+ printf("Id=%#06x PCISeg=%#x ", addr->Header.DeviceId, x16);
break;
case ACPI_IVRS_TYPE_MEMORY3:
+ memcpy(&x16, &addr->Reserved, sizeof(x16));
printf("Id=%#06x-%#06x PCISeg=%#x", addr->Header.DeviceId,
- addr->AuxData, *(UINT16 *)&addr->Reserved);
+ addr->AuxData, x16);
break;
}
printf("Start=%#18jx Length=%#jx Flags=",
diff --git a/usr.sbin/apm/Makefile b/usr.sbin/apm/Makefile
index f6c42194401f..f9b3e11d22fa 100644
--- a/usr.sbin/apm/Makefile
+++ b/usr.sbin/apm/Makefile
@@ -1,6 +1,5 @@
PROG= apm
MAN= apm.8
-MLINKS= apm.8 apmconf.8
MANSUBDIR= /${MACHINE_CPUARCH}
PACKAGE=apm
diff --git a/usr.sbin/apm/apm.8 b/usr.sbin/apm/apm.8
index d6ede22066da..e295ec989a73 100644
--- a/usr.sbin/apm/apm.8
+++ b/usr.sbin/apm/apm.8
@@ -9,7 +9,7 @@
.\" the author assume any responsibility for damages incurred with its
.\" use.
.\"
-.Dd December 22, 2009
+.Dd November 12, 2025
.Dt APM 8 i386
.Os
.Sh NAME
@@ -120,13 +120,6 @@ If no options are specified,
displays information and current status of APM in verbose mode.
If multiple display options are given, the values are displayed one
per line in the order given here.
-.Sh NOTES
-.Xr apmconf 8
-has been merged in
-.Nm
-and thus
-.Nm
-replaces all of its functionality.
.Sh SEE ALSO
.Xr apm 4 ,
.Xr zzz 8
diff --git a/usr.sbin/arp/arp.c b/usr.sbin/arp/arp.c
index ee4236b5299b..055ef2ffe225 100644
--- a/usr.sbin/arp/arp.c
+++ b/usr.sbin/arp/arp.c
@@ -81,7 +81,6 @@ static int get(char *host);
static int file(char *name);
static struct rt_msghdr *rtmsg(int cmd,
struct sockaddr_in *dst, struct sockaddr_dl *sdl);
-static int get_ether_addr(in_addr_t ipaddr, struct ether_addr *hwaddr);
static int set_rtsock(struct sockaddr_in *dst, struct sockaddr_dl *sdl_m,
char *host);
@@ -143,7 +142,8 @@ main(int argc, char *argv[])
if (!func)
func = F_GET;
if (opts.rifname) {
- if (func != F_GET && func != F_SET && !(func == F_DELETE && opts.aflag))
+ if (func != F_GET && func != F_SET && func != F_REPLACE &&
+ !(func == F_DELETE && opts.aflag))
xo_errx(1, "-i not applicable to this operation");
if ((opts.rifindex = if_nametoindex(opts.rifname)) == 0) {
if (errno == ENXIO)
@@ -273,7 +273,6 @@ getaddr(char *host)
return (&reply);
}
-int valid_type(int type);
/*
* Returns true if the type is a valid one for ARP.
*/
@@ -357,11 +356,14 @@ set(int argc, char **argv)
}
ea = (struct ether_addr *)LLADDR(&sdl_m);
if ((opts.flags & RTF_ANNOUNCE) && !strcmp(eaddr, "auto")) {
- if (!get_ether_addr(dst->sin_addr.s_addr, ea)) {
+ uint32_t ifindex;
+ if (!get_ifinfo(dst->sin_addr.s_addr, ea, &ifindex)) {
xo_warnx("no interface found for %s",
- inet_ntoa(dst->sin_addr));
+ inet_ntoa(dst->sin_addr));
return (1);
}
+ if (opts.rifindex == 0)
+ opts.rifindex = ifindex;
sdl_m.sdl_alen = ETHER_ADDR_LEN;
} else {
struct ether_addr *ea1 = ether_aton(eaddr);
@@ -375,7 +377,7 @@ set(int argc, char **argv)
}
}
#ifndef WITHOUT_NETLINK
- return (set_nl(opts.rifindex, dst, &sdl_m, host));
+ return (set_nl(dst, &sdl_m, host));
#else
return (set_rtsock(dst, &sdl_m, host));
#endif
@@ -522,7 +524,7 @@ delete(char *host)
#ifdef WITHOUT_NETLINK
return (delete_rtsock(host));
#else
- return (delete_nl(0, host));
+ return (delete_nl(host));
#endif
}
@@ -819,11 +821,11 @@ doit:
}
/*
- * get_ether_addr - get the hardware address of an interface on the
- * same subnet as ipaddr.
+ * get_ifinfo - get the hardware address and if_index of an interface
+ * on the same subnet as ipaddr.
*/
-static int
-get_ether_addr(in_addr_t ipaddr, struct ether_addr *hwaddr)
+int
+get_ifinfo(in_addr_t ipaddr, struct ether_addr *hwaddr, uint32_t *pifindex)
{
struct ifaddrs *ifa, *ifd, *ifas = NULL;
in_addr_t ina, mask;
@@ -862,7 +864,13 @@ get_ether_addr(in_addr_t ipaddr, struct ether_addr *hwaddr)
}
if (ifa == NULL)
goto done;
-
+ if (pifindex != NULL)
+ *pifindex = if_nametoindex(ifa->ifa_name);
+ if (hwaddr == NULL) {
+ /* ether addr is not required */
+ retval = ETHER_ADDR_LEN;
+ goto done;
+ }
/*
* Now scan through again looking for a link-level address
* for this interface.
diff --git a/usr.sbin/arp/arp.h b/usr.sbin/arp/arp.h
index 487863be43e7..512a238df425 100644
--- a/usr.sbin/arp/arp.h
+++ b/usr.sbin/arp/arp.h
@@ -2,8 +2,8 @@
#define _USR_SBIN_ARP_ARP_H_
int valid_type(int type);
+int get_ifinfo(in_addr_t ipaddr, struct ether_addr *hwaddr, uint32_t *pifindex);
struct sockaddr_in *getaddr(char *host);
-int print_entries_nl(uint32_t ifindex, struct in_addr addr);
struct arp_opts {
bool aflag;
@@ -11,13 +11,12 @@ struct arp_opts {
time_t expire_time;
int flags;
char *rifname;
- unsigned int rifindex;
+ uint32_t rifindex;
};
extern struct arp_opts opts;
int print_entries_nl(uint32_t ifindex, struct in_addr addr);
-int delete_nl(uint32_t ifindex, char *host);
-int set_nl(uint32_t ifindex, struct sockaddr_in *dst, struct sockaddr_dl *sdl,
- char *host);
+int delete_nl(char *host);
+int set_nl(struct sockaddr_in *dst, struct sockaddr_dl *sdl, char *host);
#endif
diff --git a/usr.sbin/arp/arp_netlink.c b/usr.sbin/arp/arp_netlink.c
index db1ef775dea2..34f21cf96f4f 100644
--- a/usr.sbin/arp/arp_netlink.c
+++ b/usr.sbin/arp/arp_netlink.c
@@ -79,13 +79,15 @@ get_link_info(struct snl_state *ss, uint32_t ifindex,
static bool
-has_l2(struct snl_state *ss, uint32_t ifindex)
+has_l2(struct snl_state *ss, uint32_t ifindex, uint32_t *pflags)
{
struct snl_parsed_link_simple link = {};
+ *pflags = 0;
if (!get_link_info(ss, ifindex, &link))
return (false);
+ *pflags = link.ifi_flags;
return (valid_type(link.ifi_type) != 0);
}
@@ -104,6 +106,7 @@ static int
guess_ifindex(struct snl_state *ss, uint32_t fibnum, struct in_addr addr)
{
struct snl_writer nw;
+ uint32_t ifindex, ifflags;
snl_init_writer(ss, &nw);
@@ -133,9 +136,16 @@ guess_ifindex(struct snl_state *ss, uint32_t fibnum, struct in_addr addr)
return (0);
/* Check if the interface is of supported type */
- if (has_l2(ss, r.rta_oif))
+ if (has_l2(ss, r.rta_oif, &ifflags))
return (r.rta_oif);
+ /* Check if we are doing proxy arp for P2P interface */
+ if (ifflags & IFF_POINTOPOINT) {
+ /* Guess interface by dst prefix */
+ if (get_ifinfo(addr.s_addr, NULL, &ifindex))
+ return (ifindex);
+ }
+
/* Check the case when we matched the loopback route for P2P */
snl_init_writer(ss, &nw);
hdr = snl_create_msg_request(&nw, RTM_GETNEXTHOP);
@@ -326,11 +336,12 @@ print_entries_nl(uint32_t ifindex, struct in_addr addr)
}
int
-delete_nl(uint32_t ifindex, char *host)
+delete_nl(char *host)
{
struct snl_state ss = {};
struct snl_writer nw;
struct sockaddr_in *dst;
+ uint32_t ifindex = opts.rifindex;
dst = getaddr(host);
if (dst == NULL)
@@ -375,10 +386,11 @@ delete_nl(uint32_t ifindex, char *host)
}
int
-set_nl(uint32_t ifindex, struct sockaddr_in *dst, struct sockaddr_dl *sdl, char *host)
+set_nl(struct sockaddr_in *dst, struct sockaddr_dl *sdl, char *host)
{
struct snl_state ss = {};
struct snl_writer nw;
+ uint32_t ifindex = opts.rifindex;
nl_init_socket(&ss);
diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8
index c902c265da9e..27e067f50394 100644
--- a/usr.sbin/bhyve/bhyve.8
+++ b/usr.sbin/bhyve/bhyve.8
@@ -1,3 +1,6 @@
+.\"
+.\" SPDX-License-Identifier: BSD-2-Clause
+.\"
.\" Copyright (c) 2013 Peter Grehan
.\" All rights reserved.
.\"
@@ -22,7 +25,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd August 21, 2024
+.Dd October 28, 2025
.Dt BHYVE 8
.Os
.Sh NAME
@@ -125,7 +128,7 @@ xAPIC mode is the default setting so this option is redundant.
It will be deprecated in a future version.
.It Fl C
Include guest memory in core files.
-.It Fl c Op Ar setting ...
+.It Fl c Oo Oo Cm cpus= Oc Ns Ar numcpus Oc Ns Oo Cm ,sockets= Ns Ar n Oc Ns Oo Cm ,cores= Ns Ar n Oc Ns Oo Cm ,threads= Ns Ar n Oc
Number of guest virtual CPUs
and/or the CPU topology.
The default value for each of
@@ -518,6 +521,8 @@ considered unconnected.
.Op Cm \&,mtu= Ar N
.Xc
.It
+.Cm ngd Ar N
+.It
.Xo
.Cm netgraph,path= Ar ADDRESS Cm \&,peerhook= Ar HOOK
.Op Cm \&,socket= Ar NAME
@@ -542,6 +547,19 @@ The MAC address is an ASCII string in
.Xr ethers 5
format.
.Pp
+A
+.Cm ngd
+device can be used to connect a guest to a
+.Xr netgraph 4
+through a
+.Xr ng_device 4
+node.
+This can be used to run bhyve in a
+.Xr VNET 9
+jail, and give it access to the host's netgraph, that cannot be reached
+directly, by exposing the ng_device through
+.Xr devfs 8 .
+.Pp
With
.Cm virtio-net
devices, the
@@ -572,7 +590,9 @@ must comply with
.Xr netgraph 4
addressing rules.
.Pp
-The slirp backend can be used to provide a NATed network to the guest.
+The
+.Cm slirp
+backend can be used to provide a NATed network to the guest.
This backend has poor performance but does not require any network
configuration on the host system.
It depends on the
diff --git a/usr.sbin/bhyve/net_backends.c b/usr.sbin/bhyve/net_backends.c
index 2d11c45f217a..95909d1f8ea2 100644
--- a/usr.sbin/bhyve/net_backends.c
+++ b/usr.sbin/bhyve/net_backends.c
@@ -119,7 +119,8 @@ tap_init(struct net_backend *be, const char *devname,
goto error;
}
- if (ioctl(be->fd, VMIO_SIOCSIFFLAGS, up)) {
+ if (strncmp("ngd", be->prefix, 3) &&
+ ioctl(be->fd, VMIO_SIOCSIFFLAGS, up)) {
EPRINTLN("tap device link up failed");
goto error;
}
@@ -273,8 +274,24 @@ static struct net_backend vmnet_backend = {
.set_cap = tap_set_cap,
};
+/* A clone of the tap backend, with a different prefix. */
+static struct net_backend ngd_backend = {
+ .prefix = "ngd",
+ .priv_size = sizeof(struct tap_priv),
+ .init = tap_init,
+ .cleanup = tap_cleanup,
+ .send = tap_send,
+ .peek_recvlen = tap_peek_recvlen,
+ .recv = tap_recv,
+ .recv_enable = tap_recv_enable,
+ .recv_disable = tap_recv_disable,
+ .get_cap = tap_get_cap,
+ .set_cap = tap_set_cap,
+};
+
DATA_SET(net_backend_set, tap_backend);
DATA_SET(net_backend_set, vmnet_backend);
+DATA_SET(net_backend_set, ngd_backend);
int
netbe_legacy_config(nvlist_t *nvl, const char *opts)
diff --git a/usr.sbin/blacklistctl/Makefile b/usr.sbin/blacklistctl/Makefile
index 7bdff4158bb4..41c5f44b072b 100644
--- a/usr.sbin/blacklistctl/Makefile
+++ b/usr.sbin/blacklistctl/Makefile
@@ -4,19 +4,20 @@ BLOCKLIST_DIR=${SRCTOP}/contrib/blocklist
PACKAGE= blocklist
PROG= blacklistctl
-SRCS= blacklistctl.c conf.c state.c support.c internal.c \
+SRCS= blacklistctl.c conf.c state.c support.c old_internal.c \
sockaddr_snprintf.c pidfile.c strtoi.c popenve.c
MAN= blacklistctl.8
LDFLAGS+=-L${LIBBLACKLISTDIR}
-LIBADD+= blacklist util
+LIBADD+= blocklist util
CFLAGS+=-I${BLOCKLIST_DIR}/include -I${BLOCKLIST_DIR}/port \
+ -D_PATH_BLCONF=\"/etc/blacklistd.conf\" \
-D_PATH_BLCONTROL=\"/usr/libexec/blacklistd-helper\" \
-DHAVE_CONFIG_H -DHAVE_DB_H -DHAVE_LIBUTIL_H \
-DHAVE_CLOCK_GETTIME -DHAVE_FGETLN -DHAVE_FPARSELN \
-DHAVE_GETPROGNAME -DHAVE_STRLCAT -DHAVE_STRLCPY \
- -DHAVE_STRUCT_SOCKADDR_SA_LEN
+ -DHAVE_STRUCT_SOCKADDR_SA_LEN -DHAVE_SYS_CDEFS_H
# CFLAGS+= -D_REENTRANT
.include <bsd.prog.mk>
diff --git a/usr.sbin/blacklistd/Makefile b/usr.sbin/blacklistd/Makefile
index e0a3ddd80881..490b12d46968 100644
--- a/usr.sbin/blacklistd/Makefile
+++ b/usr.sbin/blacklistd/Makefile
@@ -5,19 +5,20 @@ PACKAGE= blocklist
CONFS= blacklistd.conf
PROG= blacklistd
-SRCS= blacklistd.c conf.c run.c state.c support.c internal.c \
- sockaddr_snprintf.c pidfile.c strtoi.c popenve.c
+SRCS= blacklistd.c conf.c run.c state.c support.c old_internal.c \
+ sockaddr_snprintf.c pidfile.c strtoi.c popenve.c vsyslog_r.c
MAN= blacklistd.8 blacklistd.conf.5
LDFLAGS+=-L${LIBBLACKLISTDIR}
-LIBADD+= blacklist util
+LIBADD+= blocklist util
CFLAGS+=-I${BLOCKLIST_DIR}/include -I${BLOCKLIST_DIR}/port \
+ -D_PATH_BLCONF=\"/etc/blacklistd.conf\" \
-D_PATH_BLCONTROL=\"/usr/libexec/blacklistd-helper\" \
-DHAVE_CONFIG_H -DHAVE_DB_H -DHAVE_LIBUTIL_H \
-DHAVE_CLOCK_GETTIME -DHAVE_FGETLN -DHAVE_FPARSELN \
-DHAVE_GETPROGNAME -DHAVE_STRLCAT -DHAVE_STRLCPY \
- -DHAVE_STRUCT_SOCKADDR_SA_LEN
+ -DHAVE_STRUCT_SOCKADDR_SA_LEN -DHAVE_SYS_CDEFS_H
# CFLAGS+= -D_REENTRANT
.include <bsd.prog.mk>
diff --git a/usr.sbin/blacklistd/blacklistd.conf b/usr.sbin/blacklistd/blacklistd.conf
index b8dee6768cc7..ec995e038574 100644
--- a/usr.sbin/blacklistd/blacklistd.conf
+++ b/usr.sbin/blacklistd/blacklistd.conf
@@ -1,6 +1,9 @@
-#
+# @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+# @ The file blacklistd.conf has been renamed to blocklistd.conf @
+# @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+
# Blacklist rule
-# adr/mask:port type proto owner name nfail disable
+# adr/mask:port type proto owner name nfail duration
[local]
ssh stream * * * 3 24h
ftp stream * * * 3 24h
@@ -9,8 +12,9 @@ submission stream * * * 3 24h
#6161 stream tcp6 christos * 2 10m
* * * * * 3 60
-# adr/mask:port type proto owner name nfail disable
+# adr/mask:port type proto owner name nfail duration
[remote]
#129.168.0.0/16 * * * = * *
+#[2001:db8::]/32:ssh * * * = * *
#6161 = = = =/24 = =
#* stream tcp * = = =
diff --git a/usr.sbin/blocklistctl/Makefile b/usr.sbin/blocklistctl/Makefile
new file mode 100644
index 000000000000..55891bfb2670
--- /dev/null
+++ b/usr.sbin/blocklistctl/Makefile
@@ -0,0 +1,22 @@
+BLOCKLIST_DIR=${SRCTOP}/contrib/blocklist
+.PATH: ${BLOCKLIST_DIR}/bin ${BLOCKLIST_DIR}/port
+
+PACKAGE= blocklist
+
+PROG= blocklistctl
+SRCS= blocklistctl.c conf.c state.c support.c internal.c \
+ sockaddr_snprintf.c pidfile.c strtoi.c popenve.c
+MAN= blocklistctl.8
+
+LDFLAGS+=-L${LIBBLOCKLISTDIR}
+LIBADD+= blocklist util
+
+CFLAGS+=-I${BLOCKLIST_DIR}/include -I${BLOCKLIST_DIR}/port \
+ -D_PATH_BLCONTROL=\"/usr/libexec/blocklistd-helper\" \
+ -DHAVE_CONFIG_H -DHAVE_DB_H -DHAVE_LIBUTIL_H \
+ -DHAVE_CLOCK_GETTIME -DHAVE_FGETLN -DHAVE_FPARSELN \
+ -DHAVE_GETPROGNAME -DHAVE_STRLCAT -DHAVE_STRLCPY \
+ -DHAVE_STRUCT_SOCKADDR_SA_LEN -DHAVE_SYS_CDEFS_H
+# CFLAGS+= -D_REENTRANT
+
+.include <bsd.prog.mk>
diff --git a/usr.sbin/blocklistctl/Makefile.depend b/usr.sbin/blocklistctl/Makefile.depend
new file mode 100644
index 000000000000..6b74110bfe08
--- /dev/null
+++ b/usr.sbin/blocklistctl/Makefile.depend
@@ -0,0 +1,18 @@
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ include \
+ include/arpa \
+ include/xlocale \
+ lib/${CSU_DIR} \
+ lib/libblocklist \
+ lib/libc \
+ lib/libcompiler_rt \
+ lib/libutil \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/usr.sbin/blocklistd/Makefile b/usr.sbin/blocklistd/Makefile
new file mode 100644
index 000000000000..ccee9637e208
--- /dev/null
+++ b/usr.sbin/blocklistd/Makefile
@@ -0,0 +1,23 @@
+BLOCKLIST_DIR=${SRCTOP}/contrib/blocklist
+.PATH: ${BLOCKLIST_DIR}/bin ${BLOCKLIST_DIR}/port
+
+PACKAGE= blocklist
+
+CONFS= blocklistd.conf
+PROG= blocklistd
+SRCS= blocklistd.c conf.c run.c state.c support.c internal.c \
+ sockaddr_snprintf.c pidfile.c strtoi.c popenve.c vsyslog_r.c
+MAN= blocklistd.8 blocklistd.conf.5
+
+LDFLAGS+=-L${LIBBLOCKLISTDIR}
+LIBADD+= blocklist util
+
+CFLAGS+=-I${BLOCKLIST_DIR}/include -I${BLOCKLIST_DIR}/port \
+ -D_PATH_BLCONTROL=\"/usr/libexec/blocklistd-helper\" \
+ -DHAVE_CONFIG_H -DHAVE_DB_H -DHAVE_LIBUTIL_H \
+ -DHAVE_CLOCK_GETTIME -DHAVE_FGETLN -DHAVE_FPARSELN \
+ -DHAVE_GETPROGNAME -DHAVE_STRLCAT -DHAVE_STRLCPY \
+ -DHAVE_STRUCT_SOCKADDR_SA_LEN -DHAVE_SYS_CDEFS_H
+# CFLAGS+= -D_REENTRANT
+
+.include <bsd.prog.mk>
diff --git a/usr.sbin/blocklistd/Makefile.depend b/usr.sbin/blocklistd/Makefile.depend
new file mode 100644
index 000000000000..6b74110bfe08
--- /dev/null
+++ b/usr.sbin/blocklistd/Makefile.depend
@@ -0,0 +1,18 @@
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ include \
+ include/arpa \
+ include/xlocale \
+ lib/${CSU_DIR} \
+ lib/libblocklist \
+ lib/libc \
+ lib/libcompiler_rt \
+ lib/libutil \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/usr.sbin/blocklistd/blocklistd.conf b/usr.sbin/blocklistd/blocklistd.conf
new file mode 100644
index 000000000000..c6c7f7c2fafc
--- /dev/null
+++ b/usr.sbin/blocklistd/blocklistd.conf
@@ -0,0 +1,16 @@
+# Blocklist rule
+# adr/mask:port type proto owner name nfail duration
+[local]
+ssh stream * * * 3 24h
+ftp stream * * * 3 24h
+smtp stream * * * 3 24h
+submission stream * * * 3 24h
+#6161 stream tcp6 christos * 2 10m
+* * * * * 3 60
+
+# adr/mask:port type proto owner name nfail duration
+[remote]
+#129.168.0.0/16 * * * = * *
+#[2001:db8::]/32:ssh * * * = * *
+#6161 = = = =/24 = =
+#* stream tcp * = = =
diff --git a/usr.sbin/bluetooth/rtlbtfw/main.c b/usr.sbin/bluetooth/rtlbtfw/main.c
index e87a98036265..58503b8087b5 100644
--- a/usr.sbin/bluetooth/rtlbtfw/main.c
+++ b/usr.sbin/bluetooth/rtlbtfw/main.c
@@ -64,9 +64,6 @@ static struct rtlbt_devid rtlbt_list[] = {
{ .vendor_id = 0x0bda, .product_id = 0xb00c },
{ .vendor_id = 0x0bda, .product_id = 0xc822 },
- /* Realtek 8822CU Bluetooth devices */
- { .vendor_id = 0x13d3, .product_id = 0x3549 },
-
/* Realtek 8851BE Bluetooth devices */
{ .vendor_id = 0x13d3, .product_id = 0x3600 },
@@ -482,7 +479,7 @@ main(int argc, char *argv[])
} else
r = rtlbt_parse_fwfile_v1(&fw, rom_version);
if (r < 0) {
- rtlbt_err("Parseing firmware file failed");
+ rtlbt_err("Parsing firmware file failed");
goto shutdown;
}
diff --git a/usr.sbin/bluetooth/rtlbtfw/rtlbtfw.conf b/usr.sbin/bluetooth/rtlbtfw/rtlbtfw.conf
index 61ae53db8f39..2ef56d2af93a 100644
--- a/usr.sbin/bluetooth/rtlbtfw/rtlbtfw.conf
+++ b/usr.sbin/bluetooth/rtlbtfw/rtlbtfw.conf
@@ -36,16 +36,6 @@ notify 100 {
action "/usr/sbin/rtlbtfw -d $cdev -f /usr/local/share/rtlbt-firmware";
};
-# Realtek 8822CU Bluetooth devices
-notify 100 {
- match "system" "USB";
- match "subsystem" "DEVICE";
- match "type" "ATTACH";
- match "vendor" "0x13d3";
- match "product" "0x3549";
- action "/usr/sbin/rtlbtfw -d $cdev -f /usr/local/share/rtlbt-firmware";
-};
-
# Realtek 8851BE Bluetooth devices
notify 100 {
match "system" "USB";
diff --git a/usr.sbin/bsdinstall/Makefile b/usr.sbin/bsdinstall/Makefile
index e5bb3197fa05..5d7be97ed7cf 100644
--- a/usr.sbin/bsdinstall/Makefile
+++ b/usr.sbin/bsdinstall/Makefile
@@ -22,7 +22,8 @@ REVISION?= ${_REVISION}
.if ${BRANCH} == CURRENT || ${BRANCH} == STABLE
SUBURL= base_latest
-.elif ${BRANCH} == RELEASE
+.elif ${BRANCH} == RELEASE || ${BRANCH:C/[0-9]+$//} == BETA || \
+ ${BRANCH:C/[0-9]+$//} == RC
SUBURL= base_release_${REVISION:C/[0-9]+\.//}
.else
.warning Invalid branch "${BRANCH}"
diff --git a/usr.sbin/bsdinstall/bsdinstall.8 b/usr.sbin/bsdinstall/bsdinstall.8
index 6175d26b4fd3..ee141e1d4296 100644
--- a/usr.sbin/bsdinstall/bsdinstall.8
+++ b/usr.sbin/bsdinstall/bsdinstall.8
@@ -247,7 +247,7 @@ Extracts the distributions listed in
.Ev DISTRIBUTIONS
into
.Ev BSDINSTALL_CHROOT .
-.It Cm pkgbase Op Fl --jail
+.It Cm pkgbase Op Fl -jail
Fetch and install base system packages to
.Ev BSDINSTALL_CHROOT .
Packages are fetched according to repository configuration in
@@ -256,7 +256,7 @@ if set, or
.Lk pkg.freebsd.org
otherwise.
If the
-.Fl --jail
+.Fl -jail
option is passed, no kernel is installed, and the
.Dq jail
variant of each package set will be selected where applicable.
diff --git a/usr.sbin/bsdinstall/partedit/gpart_ops.c b/usr.sbin/bsdinstall/partedit/gpart_ops.c
index 0bcd17950daf..8da85a805545 100644
--- a/usr.sbin/bsdinstall/partedit/gpart_ops.c
+++ b/usr.sbin/bsdinstall/partedit/gpart_ops.c
@@ -139,16 +139,16 @@ newfs_command(const char *fstype, int use_default)
} else if (strcmp(fstype, "freebsd-zfs") == 0) {
int i;
struct bsddialog_menuitem items[] = {
- {"", 0, true, "fletcher4", "checksum algorithm: fletcher4",
+ {"", true, 0, "fletcher4", "checksum algorithm: fletcher4",
"Use fletcher4 for data integrity checking. "
"(default)"},
- {"", 0, false, "fletcher2", "checksum algorithm: fletcher2",
+ {"", false, 0, "fletcher2", "checksum algorithm: fletcher2",
"Use fletcher2 for data integrity checking. "
"(not recommended)"},
- {"", 0, false, "sha256", "checksum algorithm: sha256",
+ {"", false, 0, "sha256", "checksum algorithm: sha256",
"Use sha256 for data integrity checking. "
"(not recommended)"},
- {"", 0, false, "atime", "Update atimes for files",
+ {"", false, 0, "atime", "Update atimes for files",
"Disable atime update"},
};
@@ -188,11 +188,11 @@ newfs_command(const char *fstype, int use_default)
strcmp(fstype, "ms-basic-data") == 0) {
int i;
struct bsddialog_menuitem items[] = {
- {"", 0, true, "FAT32", "FAT Type 32",
+ {"", true, 0, "FAT32", "FAT Type 32",
"Create a FAT32 filesystem (default)"},
- {"", 0, false, "FAT16", "FAT Type 16",
+ {"", false, 0, "FAT16", "FAT Type 16",
"Create a FAT16 filesystem"},
- {"", 0, false, "FAT12", "FAT Type 12",
+ {"", false, 0, "FAT12", "FAT Type 12",
"Create a FAT12 filesystem"},
};
diff --git a/usr.sbin/bsdinstall/partedit/part_wizard.c b/usr.sbin/bsdinstall/partedit/part_wizard.c
index 90a8da1c3c9b..9146a2af782f 100644
--- a/usr.sbin/bsdinstall/partedit/part_wizard.c
+++ b/usr.sbin/bsdinstall/partedit/part_wizard.c
@@ -27,6 +27,7 @@
*/
#include <sys/param.h>
+#include <sys/sysctl.h>
#include <errno.h>
#include <inttypes.h>
@@ -34,6 +35,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <unistd.h>
#include <libgeom.h>
#include <bsddialog.h>
@@ -41,10 +43,29 @@
#include "partedit.h"
#define MIN_FREE_SPACE (1023*1024*1024) /* Just under 1 GB */
-#define SWAP_SIZE(available) MIN(available/20, 4*1024*1024*1024LL)
static char *wizard_partition(struct gmesh *mesh, const char *disk);
+/*
+ * Determine default swap (partition) size in bytes for a given amount of free
+ * disk space in bytes. The algorithm should likely be revisited in light of
+ * contemporary memory and disk sizes.
+ */
+static intmax_t
+swap_size(intmax_t available)
+{
+ intmax_t swapsize;
+ unsigned long swap_maxpages;
+ size_t sz;
+
+ swapsize = MIN(available/20, 4*1024*1024*1024LL);
+ sz = sizeof(swap_maxpages);
+ if (sysctlbyname("vm.swap_maxpages", &swap_maxpages, &sz, NULL, 0) == 0)
+ swapsize = MIN(swapsize, (intmax_t)swap_maxpages * getpagesize());
+
+ return (swapsize);
+}
+
int
part_wizard(const char *fsreq)
{
@@ -383,7 +404,7 @@ wizard_makeparts(struct gmesh *mesh, const char *disk, const char *fstype,
return (!retval); /* Editor -> return 0 */
}
- swapsize = SWAP_SIZE(available);
+ swapsize = swap_size(available);
humanize_number(swapsizestr, 7, swapsize, "B", HN_AUTOSCALE,
HN_NOSPACE | HN_DECIMAL);
humanize_number(rootsizestr, 7, available - swapsize - 1024*1024,
diff --git a/usr.sbin/bsdinstall/scripts/auto b/usr.sbin/bsdinstall/scripts/auto
index 61d52065af2a..5fefc07e4c07 100755
--- a/usr.sbin/bsdinstall/scripts/auto
+++ b/usr.sbin/bsdinstall/scripts/auto
@@ -73,7 +73,7 @@ msg_yes="YES"
# error [$msg]
#
# Display generic error message when a script fails. An optional message
-# argument can preceed the generic message. User is given the choice of
+# argument can precede the generic message. User is given the choice of
# restarting the installer or exiting.
#
error()
@@ -209,9 +209,9 @@ if [ ! -f $BSDINSTALL_DISTDIR/MANIFEST ]; then
PKGBASE=yes
else
bsddialog --backtitle "$OSNAME Installer" --title "Select Installation Type" \
- --yes-label "Traditional" --no-label "Packages (Experimental)" --yesno \
+ --yes-label "Distribution Sets" --no-label "Packages (Tech Preview)" --yesno \
$PKGBASE_DEFAULT_BUTTON \
- "Would you like to install the base system using traditional distribution sets or packages (experimental)?" 0 0
+ "Would you like to install the base system using traditional distribution sets or packages (technology preview)?" 0 0
if [ $? -eq 1 ]; then
PKGBASE=yes
fi
diff --git a/usr.sbin/bsdinstall/scripts/bootconfig b/usr.sbin/bsdinstall/scripts/bootconfig
index 6736e78b450a..9c188c1d8a91 100755
--- a/usr.sbin/bsdinstall/scripts/bootconfig
+++ b/usr.sbin/bsdinstall/scripts/bootconfig
@@ -163,7 +163,7 @@ if [ -n "$(awk '{if ($2=="/boot/efi") printf("%s\n",$1);}' $PATH_FSTAB)" ]; then
rmdir "${mntpt}"
fi
- # Try to set the UEFI NV BootXXXX variables to recod the boot location
+ # Try to set the UEFI NV BootXXXX variables to record the boot location
if [ "$BSDINSTALL_CONFIGCURRENT" ] && [ "$ARCHBOOTNAME" != ia32 ]; then
update_uefi_bootentry
fi
diff --git a/usr.sbin/bsdinstall/scripts/jail b/usr.sbin/bsdinstall/scripts/jail
index f2c7ef2b37de..e4238ac0a687 100755
--- a/usr.sbin/bsdinstall/scripts/jail
+++ b/usr.sbin/bsdinstall/scripts/jail
@@ -45,7 +45,7 @@ user_env_vars="BSDINSTALL_DISTSITE DISTRIBUTIONS"
# error [$msg]
#
# Display generic error message when a script fails. An optional message
-# argument can preceed the generic message. User is given the choice of
+# argument can precede the generic message. User is given the choice of
# restarting the installer or exiting.
#
error() {
@@ -79,7 +79,7 @@ distbase() {
: ${DISTRIBUTIONS="base.txz"}; export DISTRIBUTIONS
if [ -f $BSDINSTALL_DISTDIR/MANIFEST ]; then
- DISTMENU=`cut -f 4,5,6 $BSDINSTALL_DISTDIR/MANIFEST | grep -v -e ^kernel -e ^base`
+ DISTMENU=$(cut -f 1,5,6 $BSDINSTALL_DISTDIR/MANIFEST | grep -v -e ^kernel -e ^base | sed -E 's/\.txz//g')
if [ ! "$nonInteractive" == "YES" ]
then
@@ -175,8 +175,8 @@ fi
if [ ! "$nonInteractive" == "YES" ]; then
bsddialog --backtitle "$OSNAME Installer" --title "Select Installation Type" \
- --yes-label "Traditional" --no-label "Packages (Experimental)" --yesno \
- "Would you like to install the base system using traditional distribution sets or packages (experimental)?" 0 0
+ --yes-label "Distribution Sets" --no-label "Packages (Tech Preview)" --yesno \
+ "Would you like to install the base system using traditional distribution sets or packages (technology preview)?" 0 0
if [ $? -eq 1 ]; then
PKGBASE=yes
fi
diff --git a/usr.sbin/bsdinstall/scripts/keymap b/usr.sbin/bsdinstall/scripts/keymap
index 6f4060c0772e..669a1062df95 100755
--- a/usr.sbin/bsdinstall/scripts/keymap
+++ b/usr.sbin/bsdinstall/scripts/keymap
@@ -216,7 +216,7 @@ while :; do
n=$( eval f_dialog_menutag2index_with_help \
\"\$menu_choice\" $menu_list )
- # Turn that number ithe name of the keymap struct
+ # Turn that number into the name of the keymap struct
k=$( set -- $KEYMAPS; eval echo \"\${$(( $n - 2))}\" )
# Get actual keymap setting while we update $keymap and $KEYMAPFILE
diff --git a/usr.sbin/bsdinstall/scripts/script b/usr.sbin/bsdinstall/scripts/script
index 00ded5f8e24d..21da2ea7c366 100755
--- a/usr.sbin/bsdinstall/scripts/script
+++ b/usr.sbin/bsdinstall/scripts/script
@@ -144,7 +144,7 @@ else
#
# Work around this in an extremely lame way for the specific
# case of EFI system partitions only. This *ONLY WORKS* if
- # /boot/efi is empty and does not handle analagous problems on
+ # /boot/efi is empty and does not handle analogous problems on
# other systems (ARM, PPC64).
tar -xf "$BSDINSTALL_DISTDIR/$set" -C $BSDINSTALL_CHROOT --exclude boot/efi
mkdir -p $BSDINSTALL_CHROOT/boot/efi
diff --git a/usr.sbin/bsdinstall/scripts/zfsboot b/usr.sbin/bsdinstall/scripts/zfsboot
index 95cbba3fa131..a4c9220a709c 100755
--- a/usr.sbin/bsdinstall/scripts/zfsboot
+++ b/usr.sbin/bsdinstall/scripts/zfsboot
@@ -216,7 +216,7 @@ KLDLOAD='kldload %s'
LN_SF='ln -sf "%s" "%s"'
MKDIR_P='mkdir -p "%s"'
MOUNT_TYPE='mount -t %s "%s" "%s"'
-NEWFS_ESP='newfs_msdos "%s"'
+NEWFS_ESP='newfs_msdos -F 32 -c 1 "%s"'
PRINTF_CONF="printf '%s=\"%%s\"\\\n' %s >> \"%s\""
PRINTF_FSTAB='printf "$FSTAB_FMT" "%s" "%s" "%s" "%s" "%s" "%s" >> "%s"'
SHELL_TRUNCATE=':> "%s"'
@@ -255,7 +255,7 @@ msg_encrypt_disks="Encrypt Disks?"
msg_encrypt_disks_help="Use geli(8) to encrypt all data partitions"
msg_error="Error"
msg_force_4k_sectors="Force 4K Sectors?"
-msg_force_4k_sectors_help="Align partitions to 4K sector boundries and set vfs.zfs.vdev.min_auto_ashift=12"
+msg_force_4k_sectors_help="Align partitions to 4K sector boundaries and set vfs.zfs.vdev.min_auto_ashift=12"
msg_freebsd_installer="$OSNAME Installer"
msg_geli_password="Enter a strong passphrase, used to protect your encryption keys. You will be required to enter this passphrase each time the system is booted"
msg_geli_setup="Initializing encryption on selected disks,\n this will take several seconds per disk"
diff --git a/usr.sbin/bsnmpd/bsnmpd/Makefile b/usr.sbin/bsnmpd/bsnmpd/Makefile
index 601fc31ec475..0943c49c1ca1 100644
--- a/usr.sbin/bsnmpd/bsnmpd/Makefile
+++ b/usr.sbin/bsnmpd/bsnmpd/Makefile
@@ -17,105 +17,110 @@ XSYM= snmpMIB begemotSnmpdModuleTable begemotSnmpd begemotTrapSinkTable \
freeBSD freeBSDVersion begemotSnmpdTransInet
CLEANFILES= oid.h tree.c tree.h
-MAN= bsnmpd.1 snmpmod.3
-
-MLINKS+= snmpmod.3 FIND_OBJECT_INT.3
-MLINKS+= snmpmod.3 FIND_OBJECT_INT_LINK.3
-MLINKS+= snmpmod.3 FIND_OBJECT_INT_LINK_INDEX.3
-MLINKS+= snmpmod.3 FIND_OBJECT_OID.3
-MLINKS+= snmpmod.3 FIND_OBJECT_OID_LINK.3
-MLINKS+= snmpmod.3 FIND_OBJECT_OID_LINK_INDEX.3
-MLINKS+= snmpmod.3 INSERT_OBJECT_INT.3
-MLINKS+= snmpmod.3 INSERT_OBJECT_INT_LINK.3
-MLINKS+= snmpmod.3 INSERT_OBJECT_INT_LINK_INDEX.3
-MLINKS+= snmpmod.3 INSERT_OBJECT_OID.3
-MLINKS+= snmpmod.3 INSERT_OBJECT_OID_LINK.3
-MLINKS+= snmpmod.3 INSERT_OBJECT_OID_LINK_INDEX.3
-MLINKS+= snmpmod.3 NEXT_OBJECT_INT.3
-MLINKS+= snmpmod.3 NEXT_OBJECT_INT_LINK.3
-MLINKS+= snmpmod.3 NEXT_OBJECT_INT_LINK_INDEX.3
-MLINKS+= snmpmod.3 NEXT_OBJECT_OID.3
-MLINKS+= snmpmod.3 NEXT_OBJECT_OID_LINK.3
-MLINKS+= snmpmod.3 NEXT_OBJECT_OID_LINK_INDEX.3
-MLINKS+= snmpmod.3 bsnmpd_get_target_stats.3
-MLINKS+= snmpmod.3 bsnmpd_get_usm_stats.3
-MLINKS+= snmpmod.3 bsnmpd_reset_usm_stats.3
-MLINKS+= snmpmod.3 buf_alloc.3
-MLINKS+= snmpmod.3 buf_size.3
-MLINKS+= snmpmod.3 comm_define.3
-MLINKS+= snmpmod.3 community.3
-MLINKS+= snmpmod.3 fd_deselect.3
-MLINKS+= snmpmod.3 fd_resume.3
-MLINKS+= snmpmod.3 fd_select.3
-MLINKS+= snmpmod.3 fd_suspend.3
-MLINKS+= snmpmod.3 get_ticks.3
-MLINKS+= snmpmod.3 index_append.3
-MLINKS+= snmpmod.3 index_append_off.3
-MLINKS+= snmpmod.3 index_compare.3
-MLINKS+= snmpmod.3 index_compare_off.3
-MLINKS+= snmpmod.3 index_decode.3
-MLINKS+= snmpmod.3 ip_commit.3
-MLINKS+= snmpmod.3 ip_get.3
-MLINKS+= snmpmod.3 ip_rollback.3
-MLINKS+= snmpmod.3 ip_save.3
-MLINKS+= snmpmod.3 or_register.3
-MLINKS+= snmpmod.3 or_unregister.3
-MLINKS+= snmpmod.3 oid_commit.3
-MLINKS+= snmpmod.3 oid_get.3
-MLINKS+= snmpmod.3 oid_rollback.3
-MLINKS+= snmpmod.3 oid_save.3
-MLINKS+= snmpmod.3 oid_usmNotInTimeWindows.3
-MLINKS+= snmpmod.3 oid_usmUnknownEngineIDs.3
-MLINKS+= snmpmod.3 oid_zeroDotZero.3
-MLINKS+= snmpmod.3 reqid_allocate.3
-MLINKS+= snmpmod.3 reqid_base.3
-MLINKS+= snmpmod.3 reqid_istype.3
-MLINKS+= snmpmod.3 reqid_next.3
-MLINKS+= snmpmod.3 reqid_type.3
-MLINKS+= snmpmod.3 snmp_input_finish.3
-MLINKS+= snmpmod.3 snmp_input_start.3
-MLINKS+= snmpmod.3 snmp_output.3
-MLINKS+= snmpmod.3 snmp_pdu_auth_access.3
-MLINKS+= snmpmod.3 snmp_send_port.3
-MLINKS+= snmpmod.3 snmp_send_trap.3
-MLINKS+= snmpmod.3 snmpd_target_stat.3
-MLINKS+= snmpmod.3 snmpd_usmstats.3
-MLINKS+= snmpmod.3 start_tick.3
-MLINKS+= snmpmod.3 string_commit.3
-MLINKS+= snmpmod.3 string_free.3
-MLINKS+= snmpmod.3 string_get.3
-MLINKS+= snmpmod.3 string_get_max.3
-MLINKS+= snmpmod.3 string_rollback.3
-MLINKS+= snmpmod.3 string_save.3
-MLINKS+= snmpmod.3 systemg.3
-MLINKS+= snmpmod.3 this_tick.3
-MLINKS+= snmpmod.3 timer_start.3
-MLINKS+= snmpmod.3 timer_start_repeat.3
-MLINKS+= snmpmod.3 timer_stop.3
-MLINKS+= snmpmod.3 target_activate_address.3
-MLINKS+= snmpmod.3 target_address.3
-MLINKS+= snmpmod.3 target_delete_address.3
-MLINKS+= snmpmod.3 target_delete_notify.3
-MLINKS+= snmpmod.3 target_delete_param.3
-MLINKS+= snmpmod.3 target_first_address.3
-MLINKS+= snmpmod.3 target_first_notify.3
-MLINKS+= snmpmod.3 target_first_param.3
-MLINKS+= snmpmod.3 target_flush_all.3
-MLINKS+= snmpmod.3 target_next_address.3
-MLINKS+= snmpmod.3 target_next_notify.3
-MLINKS+= snmpmod.3 target_next_param.3
-MLINKS+= snmpmod.3 target_new_address.3
-MLINKS+= snmpmod.3 target_new_notify.3
-MLINKS+= snmpmod.3 target_new_param.3
-MLINKS+= snmpmod.3 target_notify.3
-MLINKS+= snmpmod.3 target_param.3
-MLINKS+= snmpmod.3 usm_delete_user.3
-MLINKS+= snmpmod.3 usm_find_user.3
-MLINKS+= snmpmod.3 usm_first_user.3
-MLINKS+= snmpmod.3 usm_flush_users.3
-MLINKS+= snmpmod.3 usm_next_user.3
-MLINKS+= snmpmod.3 usm_new_user.3
-MLINKS+= snmpmod.3 usm_user.3
+MANGROUPS= MAN MAN3
+
+MAN= bsnmpd.1
+
+MAN3= snmpmod.3
+MAN3SUBPACKAGE=-dev
+
+MAN3LINKS+= snmpmod.3 FIND_OBJECT_INT.3
+MAN3LINKS+= snmpmod.3 FIND_OBJECT_INT_LINK.3
+MAN3LINKS+= snmpmod.3 FIND_OBJECT_INT_LINK_INDEX.3
+MAN3LINKS+= snmpmod.3 FIND_OBJECT_OID.3
+MAN3LINKS+= snmpmod.3 FIND_OBJECT_OID_LINK.3
+MAN3LINKS+= snmpmod.3 FIND_OBJECT_OID_LINK_INDEX.3
+MAN3LINKS+= snmpmod.3 INSERT_OBJECT_INT.3
+MAN3LINKS+= snmpmod.3 INSERT_OBJECT_INT_LINK.3
+MAN3LINKS+= snmpmod.3 INSERT_OBJECT_INT_LINK_INDEX.3
+MAN3LINKS+= snmpmod.3 INSERT_OBJECT_OID.3
+MAN3LINKS+= snmpmod.3 INSERT_OBJECT_OID_LINK.3
+MAN3LINKS+= snmpmod.3 INSERT_OBJECT_OID_LINK_INDEX.3
+MAN3LINKS+= snmpmod.3 NEXT_OBJECT_INT.3
+MAN3LINKS+= snmpmod.3 NEXT_OBJECT_INT_LINK.3
+MAN3LINKS+= snmpmod.3 NEXT_OBJECT_INT_LINK_INDEX.3
+MAN3LINKS+= snmpmod.3 NEXT_OBJECT_OID.3
+MAN3LINKS+= snmpmod.3 NEXT_OBJECT_OID_LINK.3
+MAN3LINKS+= snmpmod.3 NEXT_OBJECT_OID_LINK_INDEX.3
+MAN3LINKS+= snmpmod.3 bsnmpd_get_target_stats.3
+MAN3LINKS+= snmpmod.3 bsnmpd_get_usm_stats.3
+MAN3LINKS+= snmpmod.3 bsnmpd_reset_usm_stats.3
+MAN3LINKS+= snmpmod.3 buf_alloc.3
+MAN3LINKS+= snmpmod.3 buf_size.3
+MAN3LINKS+= snmpmod.3 comm_define.3
+MAN3LINKS+= snmpmod.3 community.3
+MAN3LINKS+= snmpmod.3 fd_deselect.3
+MAN3LINKS+= snmpmod.3 fd_resume.3
+MAN3LINKS+= snmpmod.3 fd_select.3
+MAN3LINKS+= snmpmod.3 fd_suspend.3
+MAN3LINKS+= snmpmod.3 get_ticks.3
+MAN3LINKS+= snmpmod.3 index_append.3
+MAN3LINKS+= snmpmod.3 index_append_off.3
+MAN3LINKS+= snmpmod.3 index_compare.3
+MAN3LINKS+= snmpmod.3 index_compare_off.3
+MAN3LINKS+= snmpmod.3 index_decode.3
+MAN3LINKS+= snmpmod.3 ip_commit.3
+MAN3LINKS+= snmpmod.3 ip_get.3
+MAN3LINKS+= snmpmod.3 ip_rollback.3
+MAN3LINKS+= snmpmod.3 ip_save.3
+MAN3LINKS+= snmpmod.3 or_register.3
+MAN3LINKS+= snmpmod.3 or_unregister.3
+MAN3LINKS+= snmpmod.3 oid_commit.3
+MAN3LINKS+= snmpmod.3 oid_get.3
+MAN3LINKS+= snmpmod.3 oid_rollback.3
+MAN3LINKS+= snmpmod.3 oid_save.3
+MAN3LINKS+= snmpmod.3 oid_usmNotInTimeWindows.3
+MAN3LINKS+= snmpmod.3 oid_usmUnknownEngineIDs.3
+MAN3LINKS+= snmpmod.3 oid_zeroDotZero.3
+MAN3LINKS+= snmpmod.3 reqid_allocate.3
+MAN3LINKS+= snmpmod.3 reqid_base.3
+MAN3LINKS+= snmpmod.3 reqid_istype.3
+MAN3LINKS+= snmpmod.3 reqid_next.3
+MAN3LINKS+= snmpmod.3 reqid_type.3
+MAN3LINKS+= snmpmod.3 snmp_input_finish.3
+MAN3LINKS+= snmpmod.3 snmp_input_start.3
+MAN3LINKS+= snmpmod.3 snmp_output.3
+MAN3LINKS+= snmpmod.3 snmp_pdu_auth_access.3
+MAN3LINKS+= snmpmod.3 snmp_send_port.3
+MAN3LINKS+= snmpmod.3 snmp_send_trap.3
+MAN3LINKS+= snmpmod.3 snmpd_target_stat.3
+MAN3LINKS+= snmpmod.3 snmpd_usmstats.3
+MAN3LINKS+= snmpmod.3 start_tick.3
+MAN3LINKS+= snmpmod.3 string_commit.3
+MAN3LINKS+= snmpmod.3 string_free.3
+MAN3LINKS+= snmpmod.3 string_get.3
+MAN3LINKS+= snmpmod.3 string_get_max.3
+MAN3LINKS+= snmpmod.3 string_rollback.3
+MAN3LINKS+= snmpmod.3 string_save.3
+MAN3LINKS+= snmpmod.3 systemg.3
+MAN3LINKS+= snmpmod.3 this_tick.3
+MAN3LINKS+= snmpmod.3 timer_start.3
+MAN3LINKS+= snmpmod.3 timer_start_repeat.3
+MAN3LINKS+= snmpmod.3 timer_stop.3
+MAN3LINKS+= snmpmod.3 target_activate_address.3
+MAN3LINKS+= snmpmod.3 target_address.3
+MAN3LINKS+= snmpmod.3 target_delete_address.3
+MAN3LINKS+= snmpmod.3 target_delete_notify.3
+MAN3LINKS+= snmpmod.3 target_delete_param.3
+MAN3LINKS+= snmpmod.3 target_first_address.3
+MAN3LINKS+= snmpmod.3 target_first_notify.3
+MAN3LINKS+= snmpmod.3 target_first_param.3
+MAN3LINKS+= snmpmod.3 target_flush_all.3
+MAN3LINKS+= snmpmod.3 target_next_address.3
+MAN3LINKS+= snmpmod.3 target_next_notify.3
+MAN3LINKS+= snmpmod.3 target_next_param.3
+MAN3LINKS+= snmpmod.3 target_new_address.3
+MAN3LINKS+= snmpmod.3 target_new_notify.3
+MAN3LINKS+= snmpmod.3 target_new_param.3
+MAN3LINKS+= snmpmod.3 target_notify.3
+MAN3LINKS+= snmpmod.3 target_param.3
+MAN3LINKS+= snmpmod.3 usm_delete_user.3
+MAN3LINKS+= snmpmod.3 usm_find_user.3
+MAN3LINKS+= snmpmod.3 usm_first_user.3
+MAN3LINKS+= snmpmod.3 usm_flush_users.3
+MAN3LINKS+= snmpmod.3 usm_next_user.3
+MAN3LINKS+= snmpmod.3 usm_new_user.3
+MAN3LINKS+= snmpmod.3 usm_user.3
FILESGROUPS= BMIBS DEFS
diff --git a/usr.sbin/certctl/certctl.8 b/usr.sbin/certctl/certctl.8
index edf993e1361a..e58da8e7ff84 100644
--- a/usr.sbin/certctl/certctl.8
+++ b/usr.sbin/certctl/certctl.8
@@ -24,7 +24,7 @@
.\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd August 18, 2025
+.Dd October 9, 2025
.Dt CERTCTL 8
.Os
.Sh NAME
@@ -110,7 +110,7 @@ A copy of each trusted certificate is placed in
and each untrusted certificate in
.Ev UNTRUSTDESTDIR .
In addition, a bundle containing the trusted certificates is placed in
-.Ev BUNDLEFILE .
+.Ev BUNDLE .
.It Ic untrust
Add the specified file to the untrusted list.
.It Ic trust
@@ -151,6 +151,8 @@ Default:
.Pa ${DESTDIR}${DISTBASE}/etc/ssl/untrusted
.It Ev BUNDLE
File name of bundle to produce.
+Default:
+.Pa ${DESTDIR}${DISTBASE}/etc/ssl/cert.pem
.El
.Sh SEE ALSO
.Xr openssl 1
diff --git a/usr.sbin/cron/lib/env.c b/usr.sbin/cron/lib/env.c
index 287dd8636293..5a2d7ad60756 100644
--- a/usr.sbin/cron/lib/env.c
+++ b/usr.sbin/cron/lib/env.c
@@ -55,7 +55,7 @@ env_copy(char **envp)
for (count = 0; envp[count] != NULL; count++)
;
- p = (char **) malloc((count+1) * sizeof(char *)); /* 1 for the NULL */
+ p = (char **) reallocarray(NULL, count+1, sizeof(char *)); /* 1 for the NULL */
if (p == NULL) {
errno = ENOMEM;
return NULL;
@@ -112,8 +112,7 @@ env_set(char **envp, char *envstr)
* one, save our string over the old null pointer, and return resized
* array.
*/
- p = (char **) realloc((void *) envp,
- (unsigned) ((count+1) * sizeof(char *)));
+ p = (char **) reallocarray(envp, count+1, sizeof(char *));
if (p == NULL) {
/* XXX env_free(envp); */
errno = ENOMEM;
diff --git a/usr.sbin/ctld/ctld.cc b/usr.sbin/ctld/ctld.cc
index 10c12f25068e..331c029e282e 100644
--- a/usr.sbin/ctld/ctld.cc
+++ b/usr.sbin/ctld/ctld.cc
@@ -814,6 +814,11 @@ portal_group::open_sockets(struct conf &oldconf)
}
for (portal_up &portal : pg_portals) {
+ if (!portal->prepare()) {
+ cumulated_error++;
+ continue;
+ }
+
/*
* Try to find already open portal and reuse the
* listening socket. We don't care about what portal
diff --git a/usr.sbin/ctld/ctld.hh b/usr.sbin/ctld/ctld.hh
index cc88e6eb590e..3bf18f6a32c0 100644
--- a/usr.sbin/ctld/ctld.hh
+++ b/usr.sbin/ctld/ctld.hh
@@ -151,6 +151,7 @@ struct portal {
p_protocol(protocol) {}
virtual ~portal() = default;
+ virtual bool prepare() { return true; }
bool reuse_socket(portal &oldp);
bool init_socket();
virtual bool init_socket_options(int s __unused) { return true; }
diff --git a/usr.sbin/ctld/nvmf.cc b/usr.sbin/ctld/nvmf.cc
index d1240bfa4f6c..eb116903f5c1 100644
--- a/usr.sbin/ctld/nvmf.cc
+++ b/usr.sbin/ctld/nvmf.cc
@@ -34,11 +34,8 @@
struct nvmf_io_portal final : public nvmf_portal {
nvmf_io_portal(struct portal_group *pg, const char *listen,
- portal_protocol protocol, freebsd::addrinfo_up ai,
- const struct nvmf_association_params &aparams,
- nvmf_association_up na) :
- nvmf_portal(pg, listen, protocol, std::move(ai), aparams,
- std::move(na)) {}
+ portal_protocol protocol, freebsd::addrinfo_up ai) :
+ nvmf_portal(pg, listen, protocol, std::move(ai)) {}
void handle_connection(freebsd::fd_up fd, const char *host,
const struct sockaddr *client_sa) override;
@@ -63,8 +60,6 @@ struct nvmf_transport_group final : public portal_group {
override;
private:
- struct nvmf_association_params init_aparams(portal_protocol protocol);
-
static uint16_t last_port_id;
};
@@ -143,48 +138,55 @@ parse_number(const nvlist_t *nvl, const char *key, uint64_t def, uint64_t minv,
return def;
}
-struct nvmf_association_params
-nvmf_transport_group::init_aparams(portal_protocol protocol)
+bool
+nvmf_portal::prepare()
{
- struct nvmf_association_params params;
- memset(&params, 0, sizeof(params));
+ memset(&p_aparams, 0, sizeof(p_aparams));
/* Options shared between discovery and I/O associations. */
- const nvlist_t *nvl = pg_options.get();
- params.tcp.header_digests = parse_bool(nvl, "HDGST", false);
- params.tcp.data_digests = parse_bool(nvl, "DDGST", false);
- uint64_t value = parse_number(nvl, "MAXH2CDATA", DEFAULT_MAXH2CDATA,
- 4096, UINT32_MAX);
+ freebsd::nvlist_up nvl = portal_group()->options();
+ p_aparams.tcp.header_digests = parse_bool(nvl.get(), "HDGST", false);
+ p_aparams.tcp.data_digests = parse_bool(nvl.get(), "DDGST", false);
+ uint64_t value = parse_number(nvl.get(), "MAXH2CDATA",
+ DEFAULT_MAXH2CDATA, 4096, UINT32_MAX);
if (value % 4 != 0) {
log_warnx("Invalid value \"%ju\" for option MAXH2CDATA",
(uintmax_t)value);
value = DEFAULT_MAXH2CDATA;
}
- params.tcp.maxh2cdata = value;
+ p_aparams.tcp.maxh2cdata = value;
- switch (protocol) {
+ switch (protocol()) {
case portal_protocol::NVME_TCP:
- params.sq_flow_control = parse_bool(nvl, "SQFC", false);
- params.dynamic_controller_model = true;
- params.max_admin_qsize = parse_number(nvl, "max_admin_qsize",
- NVME_MAX_ADMIN_ENTRIES, NVME_MIN_ADMIN_ENTRIES,
- NVME_MAX_ADMIN_ENTRIES);
- params.max_io_qsize = parse_number(nvl, "max_io_qsize",
+ p_aparams.sq_flow_control = parse_bool(nvl.get(), "SQFC",
+ false);
+ p_aparams.dynamic_controller_model = true;
+ p_aparams.max_admin_qsize = parse_number(nvl.get(),
+ "max_admin_qsize", NVME_MAX_ADMIN_ENTRIES,
+ NVME_MIN_ADMIN_ENTRIES, NVME_MAX_ADMIN_ENTRIES);
+ p_aparams.max_io_qsize = parse_number(nvl.get(), "max_io_qsize",
NVME_MAX_IO_ENTRIES, NVME_MIN_IO_ENTRIES,
NVME_MAX_IO_ENTRIES);
- params.tcp.pda = 0;
+ p_aparams.tcp.pda = 0;
break;
case portal_protocol::NVME_DISCOVERY_TCP:
- params.sq_flow_control = false;
- params.dynamic_controller_model = true;
- params.max_admin_qsize = NVME_MAX_ADMIN_ENTRIES;
- params.tcp.pda = 0;
+ p_aparams.sq_flow_control = false;
+ p_aparams.dynamic_controller_model = true;
+ p_aparams.max_admin_qsize = NVME_MAX_ADMIN_ENTRIES;
+ p_aparams.tcp.pda = 0;
break;
default:
__assert_unreachable();
}
- return params;
+ p_association.reset(nvmf_allocate_association(NVMF_TRTYPE_TCP, true,
+ &p_aparams));
+ if (!p_association) {
+ log_warn("Failed to create NVMe controller association");
+ return false;
+ }
+
+ return true;
}
portal_group_up
@@ -209,15 +211,12 @@ bool
nvmf_transport_group::add_portal(const char *value, portal_protocol protocol)
{
freebsd::addrinfo_up ai;
- enum nvmf_trtype trtype;
switch (protocol) {
case portal_protocol::NVME_TCP:
- trtype = NVMF_TRTYPE_TCP;
ai = parse_addr_port(value, "4420");
break;
case portal_protocol::NVME_DISCOVERY_TCP:
- trtype = NVMF_TRTYPE_TCP;
ai = parse_addr_port(value, "8009");
break;
default:
@@ -230,14 +229,6 @@ nvmf_transport_group::add_portal(const char *value, portal_protocol protocol)
return false;
}
- struct nvmf_association_params aparams = init_aparams(protocol);
- nvmf_association_up association(nvmf_allocate_association(trtype, true,
- &aparams));
- if (!association) {
- log_warn("Failed to create NVMe controller association");
- return false;
- }
-
/*
* XXX: getaddrinfo(3) may return multiple addresses; we should turn
* those into multiple portals.
@@ -246,10 +237,10 @@ nvmf_transport_group::add_portal(const char *value, portal_protocol protocol)
portal_up portal;
if (protocol == portal_protocol::NVME_DISCOVERY_TCP) {
portal = std::make_unique<nvmf_discovery_portal>(this, value,
- protocol, std::move(ai), aparams, std::move(association));
+ protocol, std::move(ai));
} else {
portal = std::make_unique<nvmf_io_portal>(this, value,
- protocol, std::move(ai), aparams, std::move(association));
+ protocol, std::move(ai));
need_tcp_transport = true;
}
diff --git a/usr.sbin/ctld/nvmf.hh b/usr.sbin/ctld/nvmf.hh
index 0b4f8d45adfd..6f34a2858ef9 100644
--- a/usr.sbin/ctld/nvmf.hh
+++ b/usr.sbin/ctld/nvmf.hh
@@ -38,13 +38,12 @@ using nvmf_qpair_up = std::unique_ptr<nvmf_qpair, nvmf_qpair_deleter>;
struct nvmf_portal : public portal {
nvmf_portal(struct portal_group *pg, const char *listen,
- portal_protocol protocol, freebsd::addrinfo_up ai,
- const struct nvmf_association_params &aparams,
- nvmf_association_up na) :
- portal(pg, listen, protocol, std::move(ai)),
- p_aparams(aparams), p_association(std::move(na)) {}
+ portal_protocol protocol, freebsd::addrinfo_up ai) :
+ portal(pg, listen, protocol, std::move(ai)) {}
virtual ~nvmf_portal() override = default;
+ virtual bool prepare() override;
+
const struct nvmf_association_params *aparams() const
{ return &p_aparams; }
@@ -58,11 +57,8 @@ private:
struct nvmf_discovery_portal final : public nvmf_portal {
nvmf_discovery_portal(struct portal_group *pg, const char *listen,
- portal_protocol protocol, freebsd::addrinfo_up ai,
- const struct nvmf_association_params &aparams,
- nvmf_association_up na) :
- nvmf_portal(pg, listen, protocol, std::move(ai), aparams,
- std::move(na)) {}
+ portal_protocol protocol, freebsd::addrinfo_up ai) :
+ nvmf_portal(pg, listen, protocol, std::move(ai)) {}
void handle_connection(freebsd::fd_up fd, const char *host,
const struct sockaddr *client_sa) override;
diff --git a/usr.sbin/cxgbetool/reg_defs_t7.c b/usr.sbin/cxgbetool/reg_defs_t7.c
index 549db9c546d5..338c75946b1d 100644
--- a/usr.sbin/cxgbetool/reg_defs_t7.c
+++ b/usr.sbin/cxgbetool/reg_defs_t7.c
@@ -1,6 +1,6 @@
/* This file is automatically generated --- changes will be lost */
-/* Generation Date : Thu Sep 11 05:26:14 PM IST 2025 */
-/* Directory name: t7_reg.txt, Changeset: 5945:1487219ecb20 */
+/* Generation Date : Tue Oct 28 05:24:53 PM IST 2025 */
+/* Directory name: t7_sw_reg.txt, Changeset: 5946:0b60ff298e7d */
struct reg_info t7_sge_regs[] = {
{ "SGE_PF_KDOORBELL", 0x1e000, 0 },
@@ -1546,17 +1546,6 @@ struct reg_info t7_pcie_regs[] = {
{ "PERstTimeout", 8, 1 },
{ "PERstTimer", 0, 4 },
{ "PCIE_CFG7", 0x302c, 0 },
- { "PCIE_CFG_SPACE_REQ", 0x3060, 0 },
- { "Enable", 31, 1 },
- { "AI", 30, 1 },
- { "CS2", 29, 1 },
- { "WrBE", 25, 4 },
- { "VFVld", 24, 1 },
- { "RVF", 16, 8 },
- { "PF", 12, 3 },
- { "ExtRegister", 8, 4 },
- { "Register", 0, 8 },
- { "PCIE_CFG_SPACE_DATA", 0x3064, 0 },
{ "PCIE_MAILBOX_BASE_WIN", 0x30a4, 0 },
{ "PCIEOfst", 6, 26 },
{ "BIR", 4, 2 },
@@ -1591,15 +1580,6 @@ struct reg_info t7_pcie_regs[] = {
{ "PCIE_STATIC_CFG2", 0x30e8, 0 },
{ "PL_CONTROL", 16, 16 },
{ "STATIC_SPARE3", 0, 15 },
- { "PCIE_DBG_INDIR_REQ", 0x30ec, 0 },
- { "Enable", 31, 1 },
- { "AI", 30, 1 },
- { "Pointer", 8, 16 },
- { "Select", 0, 4 },
- { "PCIE_DBG_INDIR_DATA_0", 0x30f0, 0 },
- { "PCIE_DBG_INDIR_DATA_1", 0x30f4, 0 },
- { "PCIE_DBG_INDIR_DATA_2", 0x30f8, 0 },
- { "PCIE_DBG_INDIR_DATA_3", 0x30fc, 0 },
{ "PCIE_PF_INT_CFG", 0x3140, 0 },
{ "PBAOfst", 28, 4 },
{ "TABOfst", 24, 4 },
@@ -3136,14 +3116,6 @@ struct reg_info t7_pcie_regs[] = {
{ "PCIE_X8_CORE_PIPE_CONTROL", 0x48b8, 0 },
{ "Loopback_Enable", 31, 1 },
{ "PCIE_X8_CORE_DBI_RO_WE", 0x48bc, 0 },
- { "PCIE_X8_CFG_SPACE_REQ", 0x48c0, 0 },
- { "Enable", 31, 1 },
- { "AI", 30, 1 },
- { "CS2", 29, 1 },
- { "WrBE", 25, 4 },
- { "ExtRegister", 8, 4 },
- { "Register", 0, 8 },
- { "PCIE_X8_CFG_SPACE_DATA", 0x48c4, 0 },
{ "PCIE_X8_CFG_MPS_MRS", 0x4900, 0 },
{ "MRS", 3, 3 },
{ "MPS", 0, 3 },
@@ -3513,10 +3485,6 @@ struct reg_info t7_pcie_regs[] = {
{ "PCIE_PHY_PRESET_COEFF", 0x5be4, 0 },
{ "PCIE_PHY_PRESET_COEFF", 0x5be8, 0 },
{ "PCIE_PHY_PRESET_COEFF", 0x5bec, 0 },
- { "PCIE_PHY_INDIR_REQ", 0x5bf0, 0 },
- { "Enable", 31, 1 },
- { "RegAddr", 0, 16 },
- { "PCIE_PHY_INDIR_DATA", 0x5bf4, 0 },
{ "PCIE_STATIC_SPARE1", 0x5bf8, 0 },
{ "PCIE_STATIC_SPARE2", 0x5bfc, 0 },
{ "x8_sw_en", 30, 1 },
@@ -3606,13 +3574,6 @@ struct reg_info t7_pcie_regs[] = {
{ "Phy_Reg_Select", 22, 2 },
{ "Phy_Reg_RegAddr", 0, 16 },
{ "PCIE_MULTI_PHY_INDIR_DATA", 0x5c40, 0 },
- { "PCIE_VF_INT_INDIR_REQ", 0x5c44, 0 },
- { "Enable", 24, 1 },
- { "AI", 23, 1 },
- { "VFID", 0, 10 },
- { "PCIE_VF_INT_INDIR_DATA", 0x5c48, 0 },
- { "VecNum", 12, 10 },
- { "VecBase", 0, 12 },
{ "PCIE_VF_256_INT_CFG2", 0x5c4c, 0 },
{ "SendFLRRsp", 31, 1 },
{ "ImmFLRRsp", 24, 1 },
@@ -4300,15 +4261,6 @@ struct reg_info t7_pcie_regs[] = {
{ "ByteEnable", 26, 4 },
{ "RegAddr", 0, 15 },
{ "PCIE_SWITCH_CFG_SPACE_DATA8", 0x5f78, 0 },
- { "PCIE_SNPS_G5_PHY_CR_REQ", 0x5f7c, 0 },
- { "RegSel", 31, 1 },
- { "RdEnable", 30, 1 },
- { "WrEnable", 29, 1 },
- { "AutoIncrVal", 21, 2 },
- { "AutoIncr", 20, 1 },
- { "PhySel", 16, 4 },
- { "RegAddr", 0, 16 },
- { "PCIE_SNPS_G5_PHY_CR_DATA", 0x5f80, 0 },
{ "PCIE_SNPS_G5_PHY_SRAM_CFG", 0x5f84, 0 },
{ "phy3_sram_bootload_bypass", 27, 1 },
{ "phy3_sram_bypass", 26, 1 },
@@ -8895,10 +8847,6 @@ struct reg_info t7_mps_regs[] = {
{ "MPS_FPGA_BIST_CFG_P3", 0x912c, 0 },
{ "AddrMask", 16, 16 },
{ "BaseAddr", 0, 16 },
- { "MPS_INIC_CTL", 0x9130, 0 },
- { "RD_WRN", 16, 1 },
- { "ADDR", 0, 16 },
- { "MPS_INIC_DATA", 0x9134, 0 },
{ "MPS_RED_CTL", 0x9140, 0 },
{ "LPBK_SHIFT_0", 28, 4 },
{ "LPBK_SHIFT_1", 24, 4 },
@@ -9279,7 +9227,19 @@ struct reg_info t7_mps_regs[] = {
{ "xgmac2mps_rx0_perr", 25, 1 },
{ "xgmac2mps_rx1_perr", 24, 1 },
{ "mps2crypto_rx_intf_fifo", 20, 4 },
- { "RX_PRE_PROC_PERR", 9, 11 },
+ { "mac_rx_pproc_mps2tp_tf", 19, 1 },
+ { "mac_rx_pproc_lb_ch3", 18, 1 },
+ { "mac_rx_pproc_lb_ch2", 17, 1 },
+ { "mac_rx_pproc_lb_ch1", 16, 1 },
+ { "mac_rx_pproc_lb_ch0", 15, 1 },
+ { "mac_rx_pproc_dwrr_ch0_3", 14, 1 },
+ { "mac_rx_fifo_perr", 13, 1 },
+ { "mac2mps_pt3_perr", 12, 1 },
+ { "mac2mps_pt2_perr", 11, 1 },
+ { "mac2mps_pt1_perr", 10, 1 },
+ { "mac2mps_pt0_perr", 9, 1 },
+ { "lpbk_fifo_perr", 8, 1 },
+ { "tp2mps_tf_fifo_perr", 7, 1 },
{ "MPS_RX_PERR_INT_ENABLE2", 0x11090, 0 },
{ "crypt2mps_rx_intf_fifo", 28, 4 },
{ "inic2mps_tx0_perr", 27, 1 },
@@ -9287,7 +9247,19 @@ struct reg_info t7_mps_regs[] = {
{ "xgmac2mps_rx0_perr", 25, 1 },
{ "xgmac2mps_rx1_perr", 24, 1 },
{ "mps2crypto_rx_intf_fifo", 20, 4 },
- { "RX_PRE_PROC_PERR", 9, 11 },
+ { "mac_rx_pproc_mps2tp_tf", 19, 1 },
+ { "mac_rx_pproc_lb_ch3", 18, 1 },
+ { "mac_rx_pproc_lb_ch2", 17, 1 },
+ { "mac_rx_pproc_lb_ch1", 16, 1 },
+ { "mac_rx_pproc_lb_ch0", 15, 1 },
+ { "mac_rx_pproc_dwrr_ch0_3", 14, 1 },
+ { "mac_rx_fifo_perr", 13, 1 },
+ { "mac2mps_pt3_perr", 12, 1 },
+ { "mac2mps_pt2_perr", 11, 1 },
+ { "mac2mps_pt1_perr", 10, 1 },
+ { "mac2mps_pt0_perr", 9, 1 },
+ { "lpbk_fifo_perr", 8, 1 },
+ { "tp2mps_tf_fifo_perr", 7, 1 },
{ "MPS_RX_PERR_ENABLE2", 0x11094, 0 },
{ "crypt2mps_rx_intf_fifo", 28, 4 },
{ "inic2mps_tx0_perr", 27, 1 },
@@ -9295,7 +9267,19 @@ struct reg_info t7_mps_regs[] = {
{ "xgmac2mps_rx0_perr", 25, 1 },
{ "xgmac2mps_rx1_perr", 24, 1 },
{ "mps2crypto_rx_intf_fifo", 20, 4 },
- { "RX_PRE_PROC_PERR", 9, 11 },
+ { "mac_rx_pproc_mps2tp_tf", 19, 1 },
+ { "mac_rx_pproc_lb_ch3", 18, 1 },
+ { "mac_rx_pproc_lb_ch2", 17, 1 },
+ { "mac_rx_pproc_lb_ch1", 16, 1 },
+ { "mac_rx_pproc_lb_ch0", 15, 1 },
+ { "mac_rx_pproc_dwrr_ch0_3", 14, 1 },
+ { "mac_rx_fifo_perr", 13, 1 },
+ { "mac2mps_pt3_perr", 12, 1 },
+ { "mac2mps_pt2_perr", 11, 1 },
+ { "mac2mps_pt1_perr", 10, 1 },
+ { "mac2mps_pt0_perr", 9, 1 },
+ { "lpbk_fifo_perr", 8, 1 },
+ { "tp2mps_tf_fifo_perr", 7, 1 },
{ "MPS_RX_PERR_INT_CAUSE3", 0x11310, 0 },
{ "MPS_RX_PERR_INT_ENABLE3", 0x11314, 0 },
{ "MPS_RX_PERR_ENABLE3", 0x11318, 0 },
@@ -22654,6 +22638,14 @@ struct reg_info t7_mac_t7_regs[] = {
{ "TX_CDR_LANE_SEL", 3, 3 },
{ "RX_CDR_LANE_SEL", 0, 3 },
{ "MAC_DEBUG_PL_IF_1", 0x381c4, 0 },
+ { "MAC_HSS0_ANALOG_TEST_CTRL", 0x381d0, 0 },
+ { "MAC_HSS1_ANALOG_TEST_CTRL", 0x381d4, 0 },
+ { "MAC_HSS2_ANALOG_TEST_CTRL", 0x381d8, 0 },
+ { "MAC_HSS3_ANALOG_TEST_CTRL", 0x381dc, 0 },
+ { "MAC_HSS0_ANALOG_TEST_STATUS", 0x381e0, 0 },
+ { "MAC_HSS1_ANALOG_TEST_STATUS", 0x381e4, 0 },
+ { "MAC_HSS2_ANALOG_TEST_STATUS", 0x381e8, 0 },
+ { "MAC_HSS3_ANALOG_TEST_STATUS", 0x381ec, 0 },
{ "MAC_SIGNAL_DETECT_CTRL", 0x381f0, 0 },
{ "Signal_Det_ln7", 15, 1 },
{ "Signal_Det_ln6", 14, 1 },
@@ -24583,6 +24575,26 @@ struct reg_info t7_mac_t7_regs[] = {
{ "Q1_LOS_2_assert", 2, 1 },
{ "Q1_LOS_1_assert", 1, 1 },
{ "Q1_LOS_0_assert", 0, 1 },
+ { "MAC_HSS0_PMD_RECEIVE_SIGNAL_DETECT", 0x3a93c, 0 },
+ { "pmd_receive_signal_detect_1n3", 4, 1 },
+ { "pmd_receive_signal_detect_1n2", 3, 1 },
+ { "pmd_receive_signal_detect_ln1", 2, 1 },
+ { "pmd_receive_signal_detect_1n0", 1, 1 },
+ { "MAC_HSS1_PMD_RECEIVE_SIGNAL_DETECT", 0x3b93c, 0 },
+ { "pmd_receive_signal_detect_1n3", 4, 1 },
+ { "pmd_receive_signal_detect_1n2", 3, 1 },
+ { "pmd_receive_signal_detect_ln1", 2, 1 },
+ { "pmd_receive_signal_detect_1n0", 1, 1 },
+ { "MAC_HSS2_PMD_RECEIVE_SIGNAL_DETECT", 0x3c93c, 0 },
+ { "pmd_receive_signal_detect_1n3", 4, 1 },
+ { "pmd_receive_signal_detect_1n2", 3, 1 },
+ { "pmd_receive_signal_detect_ln1", 2, 1 },
+ { "pmd_receive_signal_detect_1n0", 1, 1 },
+ { "MAC_HSS3_PMD_RECEIVE_SIGNAL_DETECT", 0x3d93c, 0 },
+ { "pmd_receive_signal_detect_1n3", 4, 1 },
+ { "pmd_receive_signal_detect_1n2", 3, 1 },
+ { "pmd_receive_signal_detect_ln1", 2, 1 },
+ { "pmd_receive_signal_detect_1n0", 1, 1 },
{ "MAC_MTIP_PCS_1G_0_CONTROL", 0x3e000, 0 },
{ "Reset", 15, 1 },
{ "Loopback", 14, 1 },
diff --git a/usr.sbin/cxgbetool/tcbshowt7.c b/usr.sbin/cxgbetool/tcbshowt7.c
index a3397960b26b..1d4be0fbcc91 100644
--- a/usr.sbin/cxgbetool/tcbshowt7.c
+++ b/usr.sbin/cxgbetool/tcbshowt7.c
@@ -190,7 +190,7 @@ void t7_display_tcb_aux_0 (_TCBVAR *tvp, int aux)
val("rx_flow_control_ddp"));
- PR("MISCELANEOUS:\n"); /* *************************** */
+ PR("MISCELLANEOUS:\n"); /* *************************** */
PR(" pend_ctl: 0x%1x, core_bypass: 0x%x, main_slush: 0x%x\n",
((val("pend_ctl2")<<2) | (val("pend_ctl1")<<1) |
val("pend_ctl0")),
diff --git a/usr.sbin/dumpcis/dumpcis.8 b/usr.sbin/dumpcis/dumpcis.8
index c40e5fe75d40..9da5ed9f3bdf 100644
--- a/usr.sbin/dumpcis/dumpcis.8
+++ b/usr.sbin/dumpcis/dumpcis.8
@@ -38,8 +38,7 @@ The
utility translates a raw CIS stream into human readable form.
.Sh SEE ALSO
.Xr cardbus 4 ,
-.Xr cbb 4 ,
-.Xr pccard 4
+.Xr cbb 4
.Sh AUTHORS
The original version was written by
.An Warner Losh Aq Mt imp@FreeBSD.org .
diff --git a/usr.sbin/freebsd-update/freebsd-update.sh b/usr.sbin/freebsd-update/freebsd-update.sh
index 143d93a6dcc0..2a07bc1fb7bc 100644
--- a/usr.sbin/freebsd-update/freebsd-update.sh
+++ b/usr.sbin/freebsd-update/freebsd-update.sh
@@ -1103,7 +1103,7 @@ IDS_check_params () {
check_pkgbase()
{
# Packaged base requires that pkg is bootstrapped.
- if ! pkg -r ${BASEDIR} -N >/dev/null 2>/dev/null; then
+ if ! pkg -N -r ${BASEDIR} >/dev/null 2>/dev/null; then
return 1
fi
# uname(1) is used by pkg to determine ABI, so it should exist.
diff --git a/usr.sbin/fwcontrol/fwcontrol.c b/usr.sbin/fwcontrol/fwcontrol.c
index ce908341a42a..195697475973 100644
--- a/usr.sbin/fwcontrol/fwcontrol.c
+++ b/usr.sbin/fwcontrol/fwcontrol.c
@@ -440,7 +440,7 @@ show_crom(u_int32_t *crom_buf)
if (hdr->info_len == 1) {
/* minimum ROM */
reg = (struct csrreg *)hdr;
- printf("verndor ID: 0x%06x\n", reg->val);
+ printf("vendor ID: 0x%06x\n", reg->val);
return;
}
printf("info_len=%d crc_len=%d crc=0x%04x",
diff --git a/usr.sbin/fwget/pci/pci_network_mediatek b/usr.sbin/fwget/pci/pci_network_mediatek
index 653c87c410eb..e1e15dcfa2e5 100644
--- a/usr.sbin/fwget/pci/pci_network_mediatek
+++ b/usr.sbin/fwget/pci/pci_network_mediatek
@@ -38,24 +38,24 @@ pci_network_mediatek_mt76()
# { sys/contrib/dev/mediatek/mt76/zzz_fw_ports_fwget.sh }
### >>>
- 0x0608) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;;
- 0x0616) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;;
- 0x0717) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;;
- 0x7611) addpkg "wifi-firmware-mediatek-kmod-mt7615"; return 1 ;;
- 0x7615) addpkg "wifi-firmware-mediatek-kmod-mt7615"; return 1 ;;
- 0x7663) addpkg "wifi-firmware-mediatek-kmod-mt7615"; return 1 ;;
- 0x7906) addpkg "wifi-firmware-mediatek-kmod-mt7915"; return 1 ;;
- 0x790a) addpkg "wifi-firmware-mediatek-kmod-mt7915"; return 1 ;;
- 0x7915) addpkg "wifi-firmware-mediatek-kmod-mt7915"; return 1 ;;
- 0x7916) addpkg "wifi-firmware-mediatek-kmod-mt7915"; return 1 ;;
- 0x7920) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;;
- 0x7922) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;;
- 0x7925) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;;
- 0x7961) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;;
- 0x7990) addpkg "wifi-firmware-mediatek-kmod-mt7996"; return 1 ;;
- 0x7991) addpkg "wifi-firmware-mediatek-kmod-mt7996"; return 1 ;;
- 0x7992) addpkg "wifi-firmware-mediatek-kmod-mt7996"; return 1 ;;
- 0x799a) addpkg "wifi-firmware-mediatek-kmod-mt7996"; return 1 ;;
+ 0x0608) addpkg "wifi-firmware-mt76-kmod-mt792x"; return 1 ;;
+ 0x0616) addpkg "wifi-firmware-mt76-kmod-mt792x"; return 1 ;;
+ 0x0717) addpkg "wifi-firmware-mt76-kmod-mt792x"; return 1 ;;
+ 0x7611) addpkg "wifi-firmware-mt76-kmod-mt7615"; return 1 ;;
+ 0x7615) addpkg "wifi-firmware-mt76-kmod-mt7615"; return 1 ;;
+ 0x7663) addpkg "wifi-firmware-mt76-kmod-mt7615"; return 1 ;;
+ 0x7906) addpkg "wifi-firmware-mt76-kmod-mt7915"; return 1 ;;
+ 0x790a) addpkg "wifi-firmware-mt76-kmod-mt7915"; return 1 ;;
+ 0x7915) addpkg "wifi-firmware-mt76-kmod-mt7915"; return 1 ;;
+ 0x7916) addpkg "wifi-firmware-mt76-kmod-mt7915"; return 1 ;;
+ 0x7920) addpkg "wifi-firmware-mt76-kmod-mt792x"; return 1 ;;
+ 0x7922) addpkg "wifi-firmware-mt76-kmod-mt792x"; return 1 ;;
+ 0x7925) addpkg "wifi-firmware-mt76-kmod-mt792x"; return 1 ;;
+ 0x7961) addpkg "wifi-firmware-mt76-kmod-mt792x"; return 1 ;;
+ 0x7990) addpkg "wifi-firmware-mt76-kmod-mt7996"; return 1 ;;
+ 0x7991) addpkg "wifi-firmware-mt76-kmod-mt7996"; return 1 ;;
+ 0x7992) addpkg "wifi-firmware-mt76-kmod-mt7996"; return 1 ;;
+ 0x799a) addpkg "wifi-firmware-mt76-kmod-mt7996"; return 1 ;;
### <<<
esac
diff --git a/usr.sbin/inetd/inetd.8 b/usr.sbin/inetd/inetd.8
index d2a4331bb79c..189415caa711 100644
--- a/usr.sbin/inetd/inetd.8
+++ b/usr.sbin/inetd/inetd.8
@@ -25,7 +25,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd September 25, 2025
+.Dd November 5, 2025
.Dt INETD 8
.Os
.Sh NAME
@@ -787,44 +787,6 @@ the pid of the currently running
.Sh "EXAMPLES"
Examples for a variety of services are available in
.Pa /etc/inetd.conf .
-.Pp
-It includes examples for
-.Nm bootpd ,
-.Nm comsat ,
-.Nm cvs ,
-.Nm date ,
-.Nm fingerd ,
-.Nm ftpd ,
-.Nm imapd ,
-.Nm nc ,
-.Nm nmbd ,
-.Nm nntpd ,
-.Nm rlogind ,
-.Nm rpc.rquotad ,
-.Nm rpc.rusersd ,
-.Nm rpc.rwalld ,
-.Nm rpc.statd ,
-.Nm rpc.sprayd ,
-.Nm rshd ,
-.Nm prometheus_sysctl_exporter ,
-.Nm smtpd ,
-.Nm smbd ,
-.Nm swat
-.Nm talkd ,
-.Nm telnetd ,
-.Nm tftpd ,
-.Nm uucpd .
-.Pp
-The internal services provided by
-.Nm
-for daytime, time, echo, discard and chargen are also
-included, as well as chargen for
-.Nm ipsec
-Authentication Headers
-.Pp
-Examples for handling auth requests via
-.Nm identd ,
-are similarly included.
.Sh "ERROR MESSAGES"
The
.Nm
diff --git a/usr.sbin/iovctl/iovctl.8 b/usr.sbin/iovctl/iovctl.8
index 5c7b01c249a0..2574503e5ae7 100644
--- a/usr.sbin/iovctl/iovctl.8
+++ b/usr.sbin/iovctl/iovctl.8
@@ -95,7 +95,7 @@ and
options, this file will only be used to specify the name of the PF device.
.Pp
See
-.Xr iovctl.conf
+.Xr iovctl.conf 5
for a description of the config file format and documentation of the
configuration parameters that apply to all PF drivers.
See the PF driver manual page for configuration parameters specific to
diff --git a/usr.sbin/jail/jail.8 b/usr.sbin/jail/jail.8
index d44b7f66a64e..3a925bda8174 100644
--- a/usr.sbin/jail/jail.8
+++ b/usr.sbin/jail/jail.8
@@ -1,3 +1,6 @@
+.\"
+.\" SPDX-License-Identifier: BSD-2-Clause
+.\"
.\" Copyright (c) 2000, 2003 Robert N. M. Watson
.\" Copyright (c) 2008-2012 James Gritton
.\" All rights reserved.
@@ -23,7 +26,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd September 15, 2025
+.Dd November 6, 2025
.Dt JAIL 8
.Os
.Sh NAME
@@ -705,8 +708,8 @@ The super-user is enabled by default.
Allow privileged processes in the jail to manipulate filesystem extended
attributes in the system namespace.
.It Va allow.adjtime
-Allow privileged processes in the jail to slowly adjusting global operating system
-time.
+Allow privileged processes in the jail to slowly adjusting global operating
+system time.
For example through utilities like
.Xr ntpd 8 .
.It Va allow.settime
@@ -1009,7 +1012,7 @@ jail is removed.
.It Va ip4.addr
In addition to the IP addresses that are passed to the kernel, an
interface, netmask and additional parameters (as supported by
-.Xr ifconfig 8 Ns )
+.Xr ifconfig 8 )
may also be specified, in the form
.Dq Ar interface Ns | Ns Ar ip-address Ns / Ns Ar netmask param ... .
If an interface is given before the IP address, an alias for the address
@@ -1023,11 +1026,12 @@ adding the IP alias.
.It Va ip6.addr
In addition to the IP addresses that are passed to the kernel,
an interface, prefix and additional parameters (as supported by
-.Xr ifconfig 8 Ns )
+.Xr ifconfig 8 )
may also be specified, in the form
.Dq Ar interface Ns | Ns Ar ip-address Ns / Ns Ar prefix param ... .
.It Va vnet.interface
-A list of network interfaces to give to a vnet-enabled jail after is it created.
+A comma separated list of network interfaces to give to a vnet-enabled jail
+after is it created.
The interfaces will automatically be released when the jail is removed.
.It Va zfs.dataset
A list of ZFS datasets to be attached to the jail.
@@ -1119,7 +1123,7 @@ process.
This manual page documents the configuration steps necessary to support
either of these steps, although the configuration steps may need to be
refined based on local requirements.
-.Ss "Setting up a Jail Directory Tree"
+.Ss Setting up a Jail Directory Tree From Source
To set up a jail directory tree containing an entire
.Fx
distribution, the following
@@ -1132,8 +1136,19 @@ mkdir -p $D
make world DESTDIR=$D
make distribution DESTDIR=$D
.Ed
+.Ss Setting up a Jail Directory Tree from Distribution Files
+To set up a jail directory tree containing an entire
+.Fx
+distribution, the following
+.Xr sh 1
+command script can be used:
+.Bd -literal -offset indent
+D=/here/is/the/jail
+mkdir -p $D
+tar -xf /usr/freebsd-dist/base.txz -C $D --unlink
+.Ed
.Pp
-In many cases this example would put far more in the jail than needed.
+In many cases these examples would put far more in the jail than needed.
In the other extreme case a jail might contain only one file:
the executable to be run in the jail.
.Pp
diff --git a/usr.sbin/mixer/mixer.8 b/usr.sbin/mixer/mixer.8
index 819d8ae73ab1..d7de675bceee 100644
--- a/usr.sbin/mixer/mixer.8
+++ b/usr.sbin/mixer/mixer.8
@@ -19,7 +19,7 @@
.\" OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
.\" THE SOFTWARE.
.\"
-.Dd August 14, 2024
+.Dd October 31, 2025
.Dt MIXER 8
.Os
.Sh NAME
@@ -28,7 +28,7 @@
.Sh SYNOPSIS
.Nm
.Op Fl f Ar device
-.Op Fl d Ar pcmN | N Op Fl V Ar voss_device:mode
+.Op Fl d Ar pcmX | X Op Fl V Ar voss_device:mode
.Op Fl os
.Op Ar dev Ns Op Cm \&. Ns Ar control Ns Op Cm \&= Ns Ar value
.Ar ...
@@ -47,10 +47,10 @@ The options are as follows:
.It Fl a
Print the values for all mixer devices available in the system
.Pq see Sx FILES .
-.It Fl d Ar pcmN | N
+.It Fl d Ar pcmX | X
Change the default audio card to
-.Ar pcmN ,
-where N is the unit number (e.g for pcm0, the unit number is 0).
+.Ar pcmX ,
+where X is the device's unit number (e.g for pcm0, the unit number is 0).
See
.Sx EXAMPLES
on how to list all available audio devices in the system.
@@ -246,30 +246,22 @@ makes
the only recording device.
.El
.Sh FILES
-.Bl -tag -width /dev/mixerN -compact
-.It Pa /dev/mixerN
-The mixer device, where
-.Ar N
-is the number of that device, for example
-.Ar /dev/mixer0 .
-PCM cards and mixers have a 1:1 relationship, which means that
+.Bl -tag -width "/dev/mixerX" -compact
+.It Pa /dev/mixerX
+The mixer device, where X is the unit number of that device,
+.Pa /dev/dsp*
+devices and
+.Pa /dev/mixer*
+devices have a 1:1 relationship, which means that, for instance,
.Pa /dev/mixer0
-is the mixer for
-.Pa /dev/pcm0
-and so on.
-By default,
+is the mixer device for
+.Pa /dev/dsp0 .
+.It /dev/mixer
+Alias to the default device's mixer device.
.Nm
-prints both the audio card's number and the mixer associated with it
-in the form of
-.Ar pcmN:mixer .
-The
-.Pa /dev/mixer
-file, although it does not exist in the filesystem, points to the default
-mixer device and is the file
-.Nm
-opens when the
+opens this when the
.Fl f Ar device
-option has not been specified.
+option is not specified.
.El
.Sh EXAMPLES
List all available audio devices in the system:
diff --git a/usr.sbin/nfsuserd/nfsuserd.c b/usr.sbin/nfsuserd/nfsuserd.c
index 29d816934600..058253beaf95 100644
--- a/usr.sbin/nfsuserd/nfsuserd.c
+++ b/usr.sbin/nfsuserd/nfsuserd.c
@@ -421,8 +421,12 @@ main(int argc, char *argv[])
/* Get the group list for this user. */
ngroup = NGROUPS;
if (getgrouplist(pwd->pw_name, pwd->pw_gid, grps,
- &ngroup) < 0)
- syslog(LOG_ERR, "Group list too small");
+ &ngroup) < 0) {
+ syslog(LOG_ERR,
+ "Group list of user '%s' too big",
+ pwd->pw_name);
+ ngroup = NGROUPS;
+ }
nid.nid_ngroup = ngroup;
nid.nid_grps = grps;
} else {
@@ -621,8 +625,12 @@ nfsuserdsrv(struct svc_req *rqstp, SVCXPRT *transp)
/* Get the group list for this user. */
ngroup = NGROUPS;
if (getgrouplist(pwd->pw_name, pwd->pw_gid,
- grps, &ngroup) < 0)
- syslog(LOG_ERR, "Group list too small");
+ grps, &ngroup) < 0) {
+ syslog(LOG_ERR,
+ "Group list of user '%s' too big",
+ pwd->pw_name);
+ ngroup = NGROUPS;
+ }
nid.nid_ngroup = ngroup;
nid.nid_grps = grps;
} else {
diff --git a/usr.sbin/periodic/etc/security/520.pfdenied b/usr.sbin/periodic/etc/security/520.pfdenied
index 9852936257bc..d87dfa0ae64c 100755
--- a/usr.sbin/periodic/etc/security/520.pfdenied
+++ b/usr.sbin/periodic/etc/security/520.pfdenied
@@ -41,7 +41,7 @@ rc=0
if check_yesno_period security_status_pfdenied_enable
then
TMP=`mktemp -t security`
- for _a in "" $(pfctl -a "blacklistd" -sA 2>/dev/null) ${security_status_pfdenied_additionalanchors}
+ for _a in "" $(pfctl -a "blacklistd" -sA 2>/dev/null) $(pfctl -a "blocklistd" -sA 2>/dev/null) ${security_status_pfdenied_additionalanchors}
do
pfctl -a "${_a}" -sr -v -z 2>/dev/null | \
nawk '{if (/^block/) {buf=$0; getline; gsub(" +"," ",$0); if ($5 > 0) print buf$0;} }' >> ${TMP}
diff --git a/usr.sbin/periodic/etc/weekly/Makefile b/usr.sbin/periodic/etc/weekly/Makefile
index d194a988acf0..a5483534c029 100644
--- a/usr.sbin/periodic/etc/weekly/Makefile
+++ b/usr.sbin/periodic/etc/weekly/Makefile
@@ -8,12 +8,11 @@ CONFS= 340.noid \
# NB: keep these sorted by MK_* knobs
-.if ${MK_LOCATE} != "no"
-CONFS+= 310.locate
-.endif
+CONFGROUPS.${MK_LOCATE}+= LOCATE
+LOCATE= 310.locate
-.if ${MK_MAN_UTILS} != "no"
-CONFS+= 320.whatis
-.endif
+CONFGROUPS.${MK_MAN_UTILS}+= WHATIS
+WHATISPACKAGE= mandoc
+WHATIS= 320.whatis
.include <bsd.prog.mk>
diff --git a/usr.sbin/pkg/Makefile b/usr.sbin/pkg/Makefile
index 0420065bb7eb..68b862826992 100644
--- a/usr.sbin/pkg/Makefile
+++ b/usr.sbin/pkg/Makefile
@@ -1,5 +1,6 @@
PACKAGE= pkg-bootstrap
+.MAKEFLAGS: -W
_BRANCH!= ${MAKE} -C ${SRCTOP}/release -V BRANCH
BRANCH?= ${_BRANCH}
.if ${BRANCH:MCURRENT} != ""
diff --git a/usr.sbin/pmcstat/pmcpl_callgraph.c b/usr.sbin/pmcstat/pmcpl_callgraph.c
index ade99464a4a3..63684f800bdc 100644
--- a/usr.sbin/pmcstat/pmcpl_callgraph.c
+++ b/usr.sbin/pmcstat/pmcpl_callgraph.c
@@ -362,7 +362,7 @@ pmcpl_cg_process(struct pmcstat_process *pp, struct pmcstat_pmcrecord *pmcr,
* - Find the function that overlaps the return address.
* - If found: use the start address of the function.
* If not found (say an object's symbol table is not present or
- * is incomplete), round down to th gprof bucket granularity.
+ * is incomplete), round down to the gprof bucket granularity.
* - Convert return virtual address to an offset in the image.
* - Look for a child with the same {offset,image} tuple,
* inserting one if needed.
diff --git a/usr.sbin/pmcstat/pmcstat.c b/usr.sbin/pmcstat/pmcstat.c
index 98e14dfb9113..1809dae7bc4c 100644
--- a/usr.sbin/pmcstat/pmcstat.c
+++ b/usr.sbin/pmcstat/pmcstat.c
@@ -215,7 +215,7 @@ pmcstat_find_targets(const char *spec)
SLIST_INSERT_HEAD(&args.pa_targets, pt, pt_next);
} else if (rv != REG_NOMATCH) {
regerror(rv, &reg, errbuf, sizeof(errbuf));
- errx(EX_SOFTWARE, "ERROR: Regex evalation failed: %s",
+ errx(EX_SOFTWARE, "ERROR: Regex evaluation failed: %s",
errbuf);
}
}
@@ -519,7 +519,7 @@ main(int argc, char **argv)
CPU_COPY(&rootmask, &cpumask);
while ((option = getopt(argc, argv,
- "ACD:EF:G:ILM:NO:P:R:S:TUWZa:c:def:gi:k:l:m:n:o:p:qr:s:t:u:vw:z:")) != -1)
+ "ACD:EF:G:ILM:NO:P:R:S:TUWZa:c:def:gi:l:m:n:o:p:qr:s:t:u:vw:z:")) != -1)
switch (option) {
case 'A':
args.pa_flags |= FLAG_SKIP_TOP_FN_RES;
@@ -607,11 +607,6 @@ main(int argc, char **argv)
args.pa_flags |= FLAG_SHOW_OFFSET;
break;
- case 'k': /* pathname to the kernel */
- warnx("WARNING: -k is obsolete, has no effect "
- "and will be removed in FreeBSD 15.");
- break;
-
case 'L':
do_listcounters = 1;
break;
diff --git a/usr.sbin/pw/pwupd.c b/usr.sbin/pw/pwupd.c
index 89c1553c8c92..845a607ab1cb 100644
--- a/usr.sbin/pw/pwupd.c
+++ b/usr.sbin/pw/pwupd.c
@@ -119,7 +119,7 @@ pw_update(struct passwd * pwd, char const * user)
*/
if (pw_mkdb(pw != NULL ? pw->pw_name : NULL) == -1) {
pw_fini();
- err(1, "pw_mkdb()");
+ errx(1, "pw_mkdb()");
}
free(pw);
pw_fini();
diff --git a/usr.sbin/quot/Makefile b/usr.sbin/quot/Makefile
index ed8360ae938e..2f32c8f2df8b 100644
--- a/usr.sbin/quot/Makefile
+++ b/usr.sbin/quot/Makefile
@@ -1,7 +1,9 @@
+.include <src.opts.mk>
+
PROG= quot
MAN= quot.8
-LIBADD= ufs
-
-WARNS?= 2
+LIBADD= ufs util
+HAS_TESTS=
+SUBDIR.${MK_TESTS}= tests
.include <bsd.prog.mk>
diff --git a/usr.sbin/quot/quot.8 b/usr.sbin/quot/quot.8
index 81abe28b41d5..32e666e2a863 100644
--- a/usr.sbin/quot/quot.8
+++ b/usr.sbin/quot/quot.8
@@ -27,7 +27,7 @@
.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
.\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd February 8, 1994
+.Dd October 15, 2025
.Dt QUOT 8
.Os
.Sh NAME
@@ -35,7 +35,7 @@
.Nd display disk space occupied by each user
.Sh SYNOPSIS
.Nm
-.Op Fl cfhknv
+.Op Fl cfknv
.Op Fl a | Ar filesystem ...
.Sh DESCRIPTION
The
@@ -53,11 +53,6 @@ number of files in this category, and aggregate total of
blocks in files with this or lower size.
.It Fl f
For each user, display count of files and space occupied.
-.It Fl h
-Estimate the number of blocks in each file based on its size.
-Despite that this does not give the correct results (it does not
-account for the holes in files), this option is not any faster
-and thus is discouraged.
.It Fl k
Force the numbers to be reported in kilobyte counts.
By default, all sizes are reported in 512-byte block counts.
diff --git a/usr.sbin/quot/quot.c b/usr.sbin/quot/quot.c
index 4152c498371a..5dda36ac8499 100644
--- a/usr.sbin/quot/quot.c
+++ b/usr.sbin/quot/quot.c
@@ -32,19 +32,21 @@
*/
#include <sys/param.h>
-#include <sys/stdint.h>
#include <sys/mount.h>
#include <sys/disklabel.h>
#include <ufs/ufs/dinode.h>
#include <ufs/ffs/fs.h>
#include <err.h>
+#include <errno.h>
#include <fcntl.h>
#include <fstab.h>
-#include <errno.h>
#include <libufs.h>
+#include <mntopts.h>
#include <paths.h>
#include <pwd.h>
+#include <stdbool.h>
+#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -52,16 +54,16 @@
#include <unistd.h>
/* some flags of what to do: */
-static char estimate;
-static char count;
-static char unused;
-static void (*func)(int, struct fs *, char *);
+static bool all;
+static bool count;
+static bool noname;
+static bool unused;
+static void (*func)(int, struct fs *);
static long blocksize;
static char *header;
static int headerlen;
static union dinode *get_inode(int, struct fs *, ino_t);
-static int virtualblocks(struct fs *, union dinode *);
static int isfree(struct fs *, union dinode *);
static void inituser(void);
static void usrrehash(void);
@@ -69,9 +71,9 @@ static struct user *user(uid_t);
static int cmpusers(const void *, const void *);
static void uses(uid_t, daddr_t, time_t);
static void initfsizes(void);
-static void dofsizes(int, struct fs *, char *);
-static void douser(int, struct fs *, char *);
-static void donames(int, struct fs *, char *);
+static void dofsizes(int, struct fs *);
+static void douser(int, struct fs *);
+static void donames(int, struct fs *);
static void usage(void);
static void quot(char *, char *);
@@ -86,11 +88,7 @@ static void quot(char *, char *);
* Due to the size of modern disks, we must cast intermediate
* values to 64 bits to prevent potential overflows.
*/
-#ifdef COMPAT
-#define SIZE(n) (n)
-#else
-#define SIZE(n) ((int)(((quad_t)(n) * 512 + blocksize - 1)/blocksize))
-#endif
+#define SIZE(n) ((int)(((intmax_t)(n) * 512 + blocksize - 1) / blocksize))
#define INOCNT(fs) ((fs)->fs_ipg)
#define INOSZ(fs) \
@@ -104,29 +102,26 @@ static void quot(char *, char *);
static union dinode *
get_inode(int fd, struct fs *super, ino_t ino)
{
- static caddr_t ipbuf;
+ static union dinode *ipbuf;
static struct cg *cgp;
static ino_t last;
- static int cg;
+ static unsigned long cg;
struct ufs2_dinode *di2;
+ off_t off;
if (fd < 0) { /* flush cache */
- if (ipbuf) {
- free(ipbuf);
- ipbuf = 0;
- if (super != NULL && super->fs_magic == FS_UFS2_MAGIC) {
- free(cgp);
- cgp = 0;
- }
- }
- return 0;
+ free(ipbuf);
+ ipbuf = NULL;
+ free(cgp);
+ cgp = NULL;
+ return (NULL);
}
- if (!ipbuf || ino < last || ino >= last + INOCNT(super)) {
+ if (ipbuf == NULL || ino < last || ino >= last + INOCNT(super)) {
if (super->fs_magic == FS_UFS2_MAGIC &&
- (!cgp || cg != ino_to_cg(super, ino))) {
+ (cgp == NULL || cg != ino_to_cg(super, ino))) {
cg = ino_to_cg(super, ino);
- if (!cgp && !(cgp = malloc(super->fs_cgsize)))
+ if (cgp == NULL && (cgp = malloc(super->fs_cgsize)) == NULL)
errx(1, "allocate cg");
if (lseek(fd, (off_t)cgtod(super, cg) << super->fs_fshift, 0) < 0)
err(1, "lseek cg");
@@ -135,12 +130,12 @@ get_inode(int fd, struct fs *super, ino_t ino)
if (!cg_chkmagic(cgp))
errx(1, "cg has bad magic");
}
- if (!ipbuf
- && !(ipbuf = malloc(INOSZ(super))))
+ if (ipbuf == NULL && (ipbuf = malloc(INOSZ(super))) == NULL)
errx(1, "allocate inodes");
last = rounddown(ino, INOCNT(super));
- if (lseek(fd, (off_t)ino_to_fsba(super, last) << super->fs_fshift, 0) < (off_t)0
- || read(fd, ipbuf, INOSZ(super)) != (ssize_t)INOSZ(super))
+ off = (off_t)ino_to_fsba(super, last) << super->fs_fshift;
+ if (lseek(fd, off, SEEK_SET) != off ||
+ read(fd, ipbuf, INOSZ(super)) != (ssize_t)INOSZ(super))
err(1, "read inodes");
}
@@ -150,55 +145,13 @@ get_inode(int fd, struct fs *super, ino_t ino)
di2 = &((struct ufs2_dinode *)ipbuf)[ino % INOCNT(super)];
/* If the inode is unused, it might be unallocated too, so zero it. */
if (isclr(cg_inosused(cgp), ino % super->fs_ipg))
- bzero(di2, sizeof (*di2));
+ memset(di2, 0, sizeof(*di2));
return ((union dinode *)di2);
}
-#ifdef COMPAT
-#define actualblocks(fs, dp) (DIP(fs, dp, di_blocks) / 2)
-#else
-#define actualblocks(fs, dp) DIP(fs, dp, di_blocks)
-#endif
-
-static int virtualblocks(struct fs *super, union dinode *dp)
-{
- off_t nblk, sz;
-
- sz = DIP(super, dp, di_size);
-#ifdef COMPAT
- if (lblkno(super,sz) >= UFS_NDADDR) {
- nblk = blkroundup(super,sz);
- if (sz == nblk)
- nblk += super->fs_bsize;
- }
-
- return sz / 1024;
-
-#else /* COMPAT */
-
- if (lblkno(super,sz) >= UFS_NDADDR) {
- nblk = blkroundup(super,sz);
- sz = lblkno(super,nblk);
- sz = (sz - UFS_NDADDR + NINDIR(super) - 1) / NINDIR(super);
- while (sz > 0) {
- nblk += sz * super->fs_bsize;
- /* sz - 1 rounded up */
- sz = (sz - 1 + NINDIR(super) - 1) / NINDIR(super);
- }
- } else
- nblk = fragroundup(super,sz);
-
- return nblk / 512;
-#endif /* COMPAT */
-}
-
static int
isfree(struct fs *super, union dinode *dp)
{
-#ifdef COMPAT
- return (DIP(super, dp, di_mode) & IFMT) == 0;
-#else /* COMPAT */
-
switch (DIP(super, dp, di_mode) & IFMT) {
case IFIFO:
case IFLNK: /* should check FASTSYMLINK? */
@@ -214,7 +167,6 @@ isfree(struct fs *super, union dinode *dp)
default:
errx(1, "unknown IFMT 0%o", DIP(super, dp, di_mode) & IFMT);
}
-#endif
}
static struct user {
@@ -226,21 +178,20 @@ static struct user {
daddr_t spc60;
daddr_t spc90;
} *users;
-static int nusers;
+static unsigned int nusers;
static void
inituser(void)
{
- int i;
struct user *usr;
+ unsigned int i;
- if (!nusers) {
+ if (nusers == 0) {
nusers = 8;
- if (!(users =
- (struct user *)calloc(nusers,sizeof(struct user))))
+ if ((users = calloc(nusers, sizeof(*users))) == NULL)
errx(1, "allocate users");
} else {
- for (usr = users, i = nusers; --i >= 0; usr++) {
+ for (usr = users, i = nusers; i-- > 0; usr++) {
usr->space = usr->spc30 = usr->spc60 = usr->spc90 = 0;
usr->count = 0;
}
@@ -250,19 +201,18 @@ inituser(void)
static void
usrrehash(void)
{
- int i;
struct user *usr, *usrn;
struct user *svusr;
+ unsigned int i;
svusr = users;
- nusers <<= 1;
- if (!(users = (struct user *)calloc(nusers,sizeof(struct user))))
+ nusers *= 2;
+ if ((users = calloc(nusers, sizeof(*users))) == NULL)
errx(1, "allocate users");
- for (usr = svusr, i = nusers >> 1; --i >= 0; usr++) {
- for (usrn = users + (usr->uid&(nusers - 1)); usrn->name;
- usrn--) {
+ for (usr = svusr, i = nusers / 2; i-- > 0; usr++) {
+ for (usrn = users + usr->uid % nusers; usrn->name; usrn--) {
if (usrn <= users)
- usrn = users + nusers;
+ usrn += nusers;
}
*usrn = *usr;
}
@@ -272,33 +222,24 @@ static struct user *
user(uid_t uid)
{
struct user *usr;
- int i;
struct passwd *pwd;
+ unsigned int i;
while (1) {
- for (usr = users + (uid&(nusers - 1)), i = nusers; --i >= 0;
- usr--) {
- if (!usr->name) {
+ for (usr = users + uid % nusers, i = nusers; i-- > 0; usr--) {
+ if (usr->name == NULL) {
usr->uid = uid;
-
- if (!(pwd = getpwuid(uid))) {
- if ((usr->name = (char *)malloc(7)))
- sprintf(usr->name,"#%d",uid);
- } else {
- if ((usr->name = (char *)
- malloc(strlen(pwd->pw_name) + 1)))
- strcpy(usr->name,pwd->pw_name);
- }
- if (!usr->name)
+ if (noname || (pwd = getpwuid(uid)) == NULL)
+ asprintf(&usr->name, "#%u", uid);
+ else
+ usr->name = strdup(pwd->pw_name);
+ if (usr->name == NULL)
errx(1, "allocate users");
-
- return usr;
-
- } else if (usr->uid == uid)
- return usr;
-
+ }
+ if (usr->uid == uid)
+ return (usr);
if (usr <= users)
- usr = users + nusers;
+ usr += nusers;
}
usrrehash();
}
@@ -307,15 +248,16 @@ user(uid_t uid)
static int
cmpusers(const void *v1, const void *v2)
{
- const struct user *u1, *u2;
- u1 = (const struct user *)v1;
- u2 = (const struct user *)v2;
+ const struct user *u1 = v1, *u2 = v2;
- return u2->space - u1->space;
+ return (u2->space > u1->space ? 1 :
+ u2->space < u1->space ? -1 :
+ u1->uid > u2->uid ? 1 :
+ u1->uid < u2->uid ? -1 : 0);
}
-#define sortusers(users) (qsort((users),nusers,sizeof(struct user), \
- cmpusers))
+#define sortusers(users) \
+ qsort((users), nusers, sizeof(struct user), cmpusers)
static void
uses(uid_t uid, daddr_t blks, time_t act)
@@ -338,12 +280,8 @@ uses(uid_t uid, daddr_t blks, time_t act)
usr->spc30 += blks;
}
-#ifdef COMPAT
-#define FSZCNT 500
-#else
-#define FSZCNT 512
-#endif
-struct fsizes {
+#define FSZCNT 512U
+static struct fsizes {
struct fsizes *fsz_next;
daddr_t fsz_first, fsz_last;
ino_t fsz_count[FSZCNT];
@@ -354,10 +292,10 @@ static void
initfsizes(void)
{
struct fsizes *fp;
- int i;
+ unsigned int i;
for (fp = fsizes; fp; fp = fp->fsz_next) {
- for (i = FSZCNT; --i >= 0;) {
+ for (i = FSZCNT; i-- > 0;) {
fp->fsz_count[i] = 0;
fp->fsz_sz[i] = 0;
}
@@ -365,79 +303,55 @@ initfsizes(void)
}
static void
-dofsizes(int fd, struct fs *super, char *name)
+dofsizes(int fd, struct fs *super)
{
ino_t inode, maxino;
union dinode *dp;
daddr_t sz, ksz;
struct fsizes *fp, **fsp;
- int i;
+ unsigned int i;
maxino = super->fs_ncg * super->fs_ipg - 1;
-#ifdef COMPAT
- if (!(fsizes = (struct fsizes *)malloc(sizeof(struct fsizes))))
- errx(1, "allocate fsize structure");
-#endif /* COMPAT */
for (inode = 0; inode < maxino; inode++) {
- errno = 0;
- if ((dp = get_inode(fd,super,inode))
-#ifdef COMPAT
- && ((DIP(super, dp, di_mode) & IFMT) == IFREG
- || (DIP(super, dp, di_mode) & IFMT) == IFDIR)
-#else /* COMPAT */
- && !isfree(super, dp)
-#endif /* COMPAT */
- ) {
- sz = estimate ? virtualblocks(super, dp) :
- actualblocks(super, dp);
-#ifdef COMPAT
- if (sz >= FSZCNT) {
- fsizes->fsz_count[FSZCNT-1]++;
- fsizes->fsz_sz[FSZCNT-1] += sz;
- } else {
- fsizes->fsz_count[sz]++;
- fsizes->fsz_sz[sz] += sz;
- }
-#else /* COMPAT */
+ if ((dp = get_inode(fd, super, inode)) != NULL &&
+ !isfree(super, dp)) {
+ sz = DIP(super, dp, di_blocks);
ksz = SIZE(sz);
for (fsp = &fsizes; (fp = *fsp); fsp = &fp->fsz_next) {
if (ksz < fp->fsz_last)
break;
}
- if (!fp || ksz < fp->fsz_first) {
- if (!(fp = (struct fsizes *)
- malloc(sizeof(struct fsizes))))
+ if (fp == NULL || ksz < fp->fsz_first) {
+ if ((fp = malloc(sizeof(*fp))) == NULL)
errx(1, "allocate fsize structure");
fp->fsz_next = *fsp;
*fsp = fp;
fp->fsz_first = rounddown(ksz, FSZCNT);
fp->fsz_last = fp->fsz_first + FSZCNT;
- for (i = FSZCNT; --i >= 0;) {
+ for (i = FSZCNT; i-- > 0;) {
fp->fsz_count[i] = 0;
fp->fsz_sz[i] = 0;
}
}
fp->fsz_count[ksz % FSZCNT]++;
fp->fsz_sz[ksz % FSZCNT] += sz;
-#endif /* COMPAT */
- } else if (errno) {
- err(1, "%s", name);
}
}
sz = 0;
- for (fp = fsizes; fp; fp = fp->fsz_next) {
+ for (fp = fsizes; fp != NULL; fp = fp->fsz_next) {
for (i = 0; i < FSZCNT; i++) {
- if (fp->fsz_count[i])
+ if (fp->fsz_count[i] != 0) {
printf("%jd\t%jd\t%d\n",
(intmax_t)(fp->fsz_first + i),
(intmax_t)fp->fsz_count[i],
SIZE(sz += fp->fsz_sz[i]));
+ }
}
}
}
static void
-douser(int fd, struct fs *super, char *name)
+douser(int fd, struct fs *super)
{
ino_t inode, maxino;
struct user *usr, *usrs;
@@ -446,38 +360,35 @@ douser(int fd, struct fs *super, char *name)
maxino = super->fs_ncg * super->fs_ipg - 1;
for (inode = 0; inode < maxino; inode++) {
- errno = 0;
- if ((dp = get_inode(fd,super,inode))
- && !isfree(super, dp))
+ if ((dp = get_inode(fd, super, inode)) != NULL &&
+ !isfree(super, dp)) {
uses(DIP(super, dp, di_uid),
- estimate ? virtualblocks(super, dp) :
- actualblocks(super, dp),
+ DIP(super, dp, di_blocks),
DIP(super, dp, di_atime));
- else if (errno) {
- err(1, "%s", name);
}
}
- if (!(usrs = (struct user *)malloc(nusers * sizeof(struct user))))
+ if ((usrs = malloc(nusers * sizeof(*usrs))) == NULL)
errx(1, "allocate users");
- bcopy(users,usrs,nusers * sizeof(struct user));
+ memcpy(usrs, users, nusers * sizeof(*usrs));
sortusers(usrs);
for (usr = usrs, n = nusers; --n >= 0 && usr->count; usr++) {
- printf("%5d",SIZE(usr->space));
+ printf("%5d", SIZE(usr->space));
if (count)
- printf("\t%5ld",usr->count);
- printf("\t%-8s",usr->name);
- if (unused)
+ printf("\t%5ld", usr->count);
+ printf("\t%-8s", usr->name);
+ if (unused) {
printf("\t%5d\t%5d\t%5d",
- SIZE(usr->spc30),
- SIZE(usr->spc60),
- SIZE(usr->spc90));
+ SIZE(usr->spc30),
+ SIZE(usr->spc60),
+ SIZE(usr->spc90));
+ }
printf("\n");
}
free(usrs);
}
static void
-donames(int fd, struct fs *super, char *name)
+donames(int fd, struct fs *super)
{
int c;
ino_t maxino;
@@ -488,18 +399,18 @@ donames(int fd, struct fs *super, char *name)
/* first skip the name of the filesystem */
while ((c = getchar()) != EOF && (c < '0' || c > '9'))
while ((c = getchar()) != EOF && c != '\n');
- ungetc(c,stdin);
+ ungetc(c, stdin);
while (scanf("%ju", &inode) == 1) {
if (inode > maxino) {
warnx("illegal inode %ju", inode);
return;
}
- errno = 0;
- if ((dp = get_inode(fd,super,inode))
- && !isfree(super, dp)) {
- printf("%s\t",user(DIP(super, dp, di_uid))->name);
+ if ((dp = get_inode(fd, super, inode)) != NULL &&
+ !isfree(super, dp)) {
+ printf("%s\t", user(DIP(super, dp, di_uid))->name);
/* now skip whitespace */
- while ((c = getchar()) == ' ' || c == '\t');
+ while ((c = getchar()) == ' ' || c == '\t')
+ /* nothing */;
/* and print out the remainder of the input line */
while (c != EOF && c != '\n') {
putchar(c);
@@ -507,11 +418,9 @@ donames(int fd, struct fs *super, char *name)
}
putchar('\n');
} else {
- if (errno) {
- err(1, "%s", name);
- }
/* skip this line */
- while ((c = getchar()) != EOF && c != '\n');
+ while ((c = getchar()) != EOF && c != '\n')
+ /* nothing */;
}
if (c == EOF)
break;
@@ -521,11 +430,7 @@ donames(int fd, struct fs *super, char *name)
static void
usage(void)
{
-#ifdef COMPAT
- fprintf(stderr, "usage: quot [-cfhnv] [-a | filesystem ...]\n");
-#else /* COMPAT */
- fprintf(stderr, "usage: quot [-cfhknv] [-a | filesystem ...]\n");
-#endif /* COMPAT */
+ fprintf(stderr, "usage: quot [-cfknv] [-a | filesystem ...]\n");
exit(1);
}
@@ -538,7 +443,7 @@ quot(char *name, char *mp)
get_inode(-1, NULL, 0); /* flush cache */
inituser();
initfsizes();
- if ((fd = open(name,0)) < 0) {
+ if ((fd = open(name, 0)) < 0) {
warn("%s", name);
close(fd);
return;
@@ -555,11 +460,11 @@ quot(char *name, char *mp)
close(fd);
return;
}
- printf("%s:",name);
+ printf("%s:", name);
if (mp)
- printf(" (%s)",mp);
+ printf(" (%s)", mp);
putchar('\n');
- (*func)(fd, fs, name);
+ (*func)(fd, fs);
free(fs);
close(fd);
}
@@ -567,40 +472,36 @@ quot(char *name, char *mp)
int
main(int argc, char *argv[])
{
- char all = 0;
struct statfs *mp;
- struct fstab *fs;
- int cnt;
- int ch;
+ int ch, cnt;
func = douser;
-#ifndef COMPAT
- header = getbsize(&headerlen,&blocksize);
-#endif
- while ((ch = getopt(argc, argv, "acfhknv")) != -1) {
+ header = getbsize(&headerlen, &blocksize);
+ while ((ch = getopt(argc, argv, "acfhkNnv")) != -1) {
switch (ch) {
case 'a':
- all = 1;
+ all = true;
break;
case 'c':
func = dofsizes;
break;
case 'f':
- count = 1;
+ count = true;
break;
case 'h':
- estimate = 1;
+ /* ignored for backward compatibility */
break;
-#ifndef COMPAT
case 'k':
blocksize = 1024;
break;
-#endif /* COMPAT */
+ case 'N':
+ noname = true;
+ break;
case 'n':
func = donames;
break;
case 'v':
- unused = 1;
+ unused = true;
break;
default:
usage();
@@ -613,18 +514,16 @@ main(int argc, char *argv[])
usage();
if (all) {
- cnt = getmntinfo(&mp,MNT_NOWAIT);
- for (; --cnt >= 0; mp++) {
- if (!strncmp(mp->f_fstypename, "ufs", MFSNAMELEN))
+ for (cnt = getmntinfo(&mp, MNT_NOWAIT); --cnt >= 0; mp++)
+ if (strncmp(mp->f_fstypename, "ufs", MFSNAMELEN) == 0)
quot(mp->f_mntfromname, mp->f_mntonname);
- }
}
- while (--argc >= 0) {
- if ((fs = getfsfile(*argv)) != NULL)
- quot(fs->fs_spec, 0);
+ while (argc-- > 0) {
+ if ((mp = getmntpoint(*argv)) != NULL)
+ quot(mp->f_mntfromname, mp->f_mntonname);
else
- quot(*argv,0);
+ quot(*argv, 0);
argv++;
}
- return 0;
+ return (0);
}
diff --git a/usr.sbin/quot/tests/Makefile b/usr.sbin/quot/tests/Makefile
new file mode 100644
index 000000000000..d4e64691f905
--- /dev/null
+++ b/usr.sbin/quot/tests/Makefile
@@ -0,0 +1,4 @@
+PACKAGE= tests
+ATF_TESTS_SH= quot_test
+
+.include <bsd.test.mk>
diff --git a/usr.sbin/quot/tests/quot_test.sh b/usr.sbin/quot/tests/quot_test.sh
new file mode 100644
index 000000000000..21088d162a53
--- /dev/null
+++ b/usr.sbin/quot/tests/quot_test.sh
@@ -0,0 +1,102 @@
+#
+# Copyright (c) 2025 Dag-Erling Smørgrav <des@FreeBSD.org>
+#
+# SPDX-License-Identifier: BSD-2-Clause
+#
+
+# Create and mount a UFS filesystem on a small memory disk
+quot_setup()
+{
+ atf_check -o save:dev mdconfig -t malloc -s 16M
+ local dev=$(cat dev)
+ atf_check -o ignore newfs "$@" /dev/$dev
+ atf_check mkdir mnt
+ local mnt=$(realpath mnt)
+ atf_check mount /dev/$dev "$mnt"
+ echo "/dev/$dev: ($mnt)" >expect
+ printf "%5d\t%5d\t%-8s\n" 8 2 "#0" >>expect
+}
+
+# Create a directory owned by a given UID
+quot_adduid()
+{
+ local uid=$1
+ atf_check install -d -o $uid -g 0 mnt/$uid
+ printf "%5d\t%5d\t%-8s\n" 4 1 "#$uid" >>expect
+}
+
+# Perform the tests
+quot_test()
+{
+ local dev=$(cat dev)
+ # Create inodes owned by a large number of users to exercise
+ # hash collisions and rehashing. The code uses an open hash
+ # table that starts out with only 8 entries and doubles every
+ # time it fills up.
+ local uid
+ for uid in $(seq 1 32); do
+ quot_adduid $uid
+ done
+ # Also create inodes owned by users with long UIDs, up to the
+ # highest possible value (2^32 - 2, because chown(2) and
+ # friends interpret 2^32 - 1 as “leave unchanged”).
+ local shift
+ for shift in $(seq 6 32); do
+ quot_adduid $(((1 << shift) - 2))
+ done
+ # Since quot operates directly on the underlying device, not
+ # on the mounted filesystem, we remount read-only to ensure
+ # that everything gets flushed to the memory disk.
+ atf_check mount -ur /dev/$dev
+ atf_check -o file:expect quot -fkN /dev/$dev
+ atf_check -o file:expect quot -fkN $(realpath mnt)
+}
+
+# Unmount and release the memory disk
+quot_cleanup()
+{
+ if [ -d mnt ]; then
+ umount mnt || true
+ fi
+ if [ -f dev ]; then
+ mdconfig -d -u $(cat dev) || true
+ fi
+}
+
+atf_test_case ufs1 cleanup
+ufs1_head()
+{
+ atf_set descr "Test quot on UFS1"
+ atf_set require.user root
+}
+ufs1_body()
+{
+ quot_setup -O1
+ quot_test
+}
+ufs1_cleanup()
+{
+ quot_cleanup
+}
+
+atf_test_case ufs2 cleanup
+ufs2_head()
+{
+ atf_set descr "Test quot on UFS2"
+ atf_set require.user root
+}
+ufs2_body()
+{
+ quot_setup -O2
+ quot_test
+}
+ufs2_cleanup()
+{
+ quot_cleanup
+}
+
+atf_init_test_cases()
+{
+ atf_add_test_case ufs1
+ atf_add_test_case ufs2
+}
diff --git a/usr.sbin/rpc.tlsservd/rpc.tlsservd.c b/usr.sbin/rpc.tlsservd/rpc.tlsservd.c
index f07385a2baa7..fb0501b2db4c 100644
--- a/usr.sbin/rpc.tlsservd/rpc.tlsservd.c
+++ b/usr.sbin/rpc.tlsservd/rpc.tlsservd.c
@@ -168,7 +168,12 @@ main(int argc, char **argv)
rpctls_verbose = false;
ncpu = (u_int)sysconf(_SC_NPROCESSORS_ONLN);
+#ifdef notnow
rpctls_maxthreads = ncpu > 1 ? ncpu / 2 : 1;
+#else
+ /* XXX For now, until fixed properly!! */
+ rpctls_maxthreads = 1;
+#endif
while ((ch = getopt_long(argc, argv, "2C:D:dhl:N:n:mp:r:uvWw", longopts,
NULL)) != -1) {
@@ -199,6 +204,8 @@ main(int argc, char **argv)
if (rpctls_maxthreads < 1 || rpctls_maxthreads > ncpu)
errx(1, "maximum threads must be between 1 and "
"number of CPUs (%d)", ncpu);
+ /* XXX For now, until fixed properly!! */
+ rpctls_maxthreads = 1;
break;
case 'n':
hostname[0] = '@';
diff --git a/usr.sbin/sndctl/sndctl.c b/usr.sbin/sndctl/sndctl.c
index 156c845481c5..6977f0ab0ebe 100644
--- a/usr.sbin/sndctl/sndctl.c
+++ b/usr.sbin/sndctl/sndctl.c
@@ -830,6 +830,8 @@ mod_play_vchans(struct snd_dev *dp, void *arg)
if (dp->from_user)
return (-1);
+ if (!dp->play.pchans)
+ return (0);
snprintf(buf, sizeof(buf), "dev.pcm.%d.play.vchans", dp->unit);
@@ -873,6 +875,8 @@ mod_rec_vchans(struct snd_dev *dp, void *arg)
if (dp->from_user)
return (-1);
+ if (!dp->rec.pchans)
+ return (0);
snprintf(buf, sizeof(buf), "dev.pcm.%d.rec.vchans", dp->unit);
diff --git a/usr.sbin/sysrc/sysrc.8 b/usr.sbin/sysrc/sysrc.8
index bdf3353c2cf9..cb32f72ea587 100644
--- a/usr.sbin/sysrc/sysrc.8
+++ b/usr.sbin/sysrc/sysrc.8
@@ -1,3 +1,6 @@
+.\"
+.\" SPDX-License-Identifier: BSD-2-Clause
+.\"
.\" Copyright (c) 2011-2016 Devin Teske
.\" All rights reserved.
.\"
@@ -408,62 +411,52 @@ and
.It Pa /usr/local/etc/rc.conf.d/name/*
.El
.Sh EXAMPLES
-Below are some simple examples of how
-.Nm
-can be used to query certain values from the
-.Xr rc.conf 5
-collection of system configuration files:
-.Pp
-.Nm
-sshd_enable
-.Dl returns the value of $sshd_enable, usually YES or NO .
+.Ss Working with rc.conf files
+Ask the value of
+.Cm sshd_enable ,
+usually YES or NO:
+.Dl sysrc sshd_enable
.Pp
-.Nm
-defaultrouter
-.Dl returns IP address of default router Pq if configured .
-.Pp
-Working on other files, such as
+Return the IP address of default router
+.Pq if configured :
+.Dl sysrc defaultrouter
+.Ss Working with other files
+Return the value of the MAILTO setting, if configured, from
.Xr crontab 5 :
+.Dl sysrc -f /etc/crontab MAILTO
.Pp
-.Nm
--f /etc/crontab MAILTO
-.Dl returns the value of the MAILTO setting Pq if configured .
-.Pp
-Appending to existing values:
-.Pp
-.Nm
-\&cloned_interfaces+=gif0
-.Dl appends Qo gif0 Qc to $cloned_interfaces Pq see APPENDING VALUES .
-.Pp
-.Nm
-\&cloned_interfaces-=gif0
-.Dl removes Qo gif0 Qc from $cloned_interfaces Pq see SUBTRACTING VALUES .
-.Pp
-In addition to the above syntax,
-.Nm
-also supports inline
-.Xr sh 1
-PARAMETER expansion for changing the way values are reported, shown below:
+Append
+.Dq gif0
+to $cloned_interfaces
+.Pq see Sx APPENDING VALUES :
+.Dl sysrc cloned_interfaces+=gif0
.Pp
-.Nm
-\&'hostname%%.*'
-.Dl returns $hostname up to (but not including) first `.' .
+Remove
+.Dq gif0
+from $cloned_interfaces
+.Pq see Sx SUBTRACTING VALUES :
+.Dl sysrc cloned_interfaces-=gif0
+.Ss Inline shell parameter expansion
+Return $hostname up to, but not including, first
+.Ql \&. :
+.Dl sysrc 'hostname%%.*'
.Pp
-.Nm
-\&'network_interfaces%%[$IFS]*'
-.Dl returns first word of $network_interfaces .
+Return first word of $network_interfaces:
+.Dl sysrc 'network_interfaces%%[$IFS]*'
.Pp
-.Nm
-\&'ntpdate_flags##*[$IFS]'
-.Dl returns last word of $ntpdate_flags (time server address) .
+Return last word of $ntpdate_flags
+.Pq time server address :
+.Dl sysrc 'ntpdate_flags##*[$IFS]'
.Pp
-.Nm
-usbd_flags-"default"
-.Dl returns $usbd_flags or "default" if unset or NULL .
+Return $usbd_flags or
+.Dq default
+if unset or NULL:
+.Dl sysrc usbd_flags-"default"
.Pp
-.Nm
-cloned_interfaces+"alternate"
-.Dl returns "alternate" if $cloned_interfaces is set .
+Return
+.Dq alternate
+if $cloned_interfaces is set:
+.Dl sysrc cloned_interfaces+"alternate"
.Sh SEE ALSO
.Xr rc.conf 5 ,
.Xr jail 8 ,
diff --git a/usr.sbin/unbound/Makefile.inc b/usr.sbin/unbound/Makefile.inc
index a28e388e47c0..84dfdbf736bd 100644
--- a/usr.sbin/unbound/Makefile.inc
+++ b/usr.sbin/unbound/Makefile.inc
@@ -1,6 +1,6 @@
MK_WERROR= no
NO_WTHREAD_SAFETY= true
-PACKAGE= unbound
+PACKAGE= local-unbound
.for man in ${MAN}
${man}: ${UNBOUNDDIR}/doc/${man:S/local-//}
diff --git a/usr.sbin/unbound/setup/local-unbound-setup.sh b/usr.sbin/unbound/setup/local-unbound-setup.sh
index d57d74952fc7..25cfef48b6f0 100755
--- a/usr.sbin/unbound/setup/local-unbound-setup.sh
+++ b/usr.sbin/unbound/setup/local-unbound-setup.sh
@@ -261,6 +261,7 @@ gen_unbound_conf() {
if [ "${use_tls}" = "yes" ] ; then
echo " tls-cert-bundle: /etc/ssl/cert.pem"
fi
+ echo " so-sndbuf: 0"
echo ""
if [ -f "${forward_conf}" ] ; then
echo "include: ${forward_conf}"
diff --git a/usr.sbin/utx/utx.8 b/usr.sbin/utx/utx.8
index ddcdcc08b2d2..354691e7138f 100644
--- a/usr.sbin/utx/utx.8
+++ b/usr.sbin/utx/utx.8
@@ -92,4 +92,4 @@ utility replaced
in
.Fx 10.0 .
.Sh AUTHORS
-.An Ed Schouten Aq Mt ed@FreeBSD.org
+.An \&Ed Schouten Aq Mt ed@FreeBSD.org
diff --git a/usr.sbin/virtual_oss/virtual_bt_speaker/bt_speaker.c b/usr.sbin/virtual_oss/virtual_bt_speaker/bt_speaker.c
index c61eaf1c338d..0e406cccca21 100644
--- a/usr.sbin/virtual_oss/virtual_bt_speaker/bt_speaker.c
+++ b/usr.sbin/virtual_oss/virtual_bt_speaker/bt_speaker.c
@@ -47,7 +47,6 @@
#include "avdtp_signal.h"
#include "bt.h"
-#include "utils.h"
static int (*bt_receive_f)(struct bt_config *, void *, int, int);
static int (*avdtpACPHandlePacket_f)(struct bt_config *cfg);
diff --git a/usr.sbin/virtual_oss/virtual_oss/int.h b/usr.sbin/virtual_oss/virtual_oss/int.h
index b3cc573ba8a9..69a943832074 100644
--- a/usr.sbin/virtual_oss/virtual_oss/int.h
+++ b/usr.sbin/virtual_oss/virtual_oss/int.h
@@ -318,9 +318,6 @@ extern void vclient_rx_equalizer(struct virtual_client *, int64_t *, size_t);
extern int vclient_eq_alloc(struct virtual_client *);
extern void vclient_eq_free(struct virtual_client *);
-/* Internal utilities */
-extern int bt_speaker_main(int argc, char **argv);
-
/* Internal compressor */
extern void voss_compressor(int64_t *, double *, const struct virtual_compressor *,
const unsigned, const unsigned, const int64_t);
diff --git a/usr.sbin/virtual_oss/virtual_oss/main.c b/usr.sbin/virtual_oss/virtual_oss/main.c
index 3f7fb84ce4c6..28095880c201 100644
--- a/usr.sbin/virtual_oss/virtual_oss/main.c
+++ b/usr.sbin/virtual_oss/virtual_oss/main.c
@@ -26,12 +26,15 @@
#include <sys/queue.h>
#include <sys/types.h>
#include <sys/filio.h>
+#include <sys/linker.h>
#include <sys/rtprio.h>
#include <sys/nv.h>
#include <sys/sndstat.h>
#include <sys/soundcard.h>
+#include <sys/sysctl.h>
#include <dlfcn.h>
+#include <errno.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
@@ -48,9 +51,10 @@
#include "backend.h"
#include "int.h"
-#include "utils.h"
#include "virtual_oss.h"
+#define SYSCTL_BASECLONE "hw.snd.basename_clone"
+
pthread_mutex_t atomic_mtx;
pthread_cond_t atomic_cv;
@@ -1616,6 +1620,7 @@ volatile sig_atomic_t voss_exit = 0;
static int voss_dsp_perm = 0666;
static int voss_do_background;
+static int voss_baseclone = 0;
static const char *voss_pid_path;
uint32_t voss_dsp_rx_refresh;
@@ -1738,6 +1743,20 @@ usage(void)
exit(EX_USAGE);
}
+/*
+ * Restore hw.snd.basename_clone if it was disabled by us.
+ */
+static void
+restore_baseclone(void)
+{
+ if (voss_baseclone) {
+ if (sysctlbyname(SYSCTL_BASECLONE, NULL, NULL, &voss_baseclone,
+ sizeof(int)) < 0)
+ warn("Could not enable " SYSCTL_BASECLONE);
+ printf(SYSCTL_BASECLONE ": 0 -> %d\n", voss_baseclone);
+ }
+}
+
static void
init_compressor(struct virtual_profile *pvp)
{
@@ -1882,8 +1901,18 @@ dup_profile(vprofile_t *pvp, int *pamp, int pol, int rx_mute,
* Detect /dev/dsp creation and try to disable system
* basename cloning automatically:
*/
- if (strcmp(ptr->oss_name, "dsp") == 0)
- system("sysctl hw.snd.basename_clone=0");
+ if (strcmp(ptr->oss_name, "dsp") == 0) {
+ size_t size;
+
+ x = 0;
+ size = sizeof(int);
+ if (sysctlbyname(SYSCTL_BASECLONE, &voss_baseclone,
+ &size, &x, size) < 0)
+ return ("Could not disable " SYSCTL_BASECLONE);
+ printf(SYSCTL_BASECLONE ": %d -> 0\n", voss_baseclone);
+ if (atexit(restore_baseclone) < 0)
+ return ("Could not set atexit callback");
+ }
/* create DSP character device */
pdev = cuse_dev_create(&vclient_oss_methods, ptr, NULL,
@@ -2540,11 +2569,8 @@ main(int argc, char **argv)
atomic_init();
- /* automagically load the cuse.ko module, if any */
- if (feature_present("cuse") == 0) {
- if (system("kldload cuse") == -1)
- warn("Failed to kldload cuse");
- }
+ if (kldload("cuse.ko") < 0 && errno != EEXIST)
+ err(1, "Failed to load cuse kernel module");
if (cuse_init() != 0)
errx(EX_USAGE, "Could not connect to cuse module");
diff --git a/usr.sbin/virtual_oss/virtual_oss/utils.h b/usr.sbin/virtual_oss/virtual_oss/utils.h
deleted file mode 100644
index f0998dc75dae..000000000000
--- a/usr.sbin/virtual_oss/virtual_oss/utils.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*-
- * Copyright (c) 2019 Hans Petter Selasky
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef _VIRTUAL_UTILS_H_
-#define _VIRTUAL_UTILS_H_
-
-int bt_speaker_main(int argc, char **argv);
-
-#endif /* _VIRTUAL_UTILS_H_ */