diff --git a/lib/libcasper/services/cap_net/cap_net.3 b/lib/libcasper/services/cap_net/cap_net.3 index 6e525508d3c4c..e322222e866f7 100644 --- a/lib/libcasper/services/cap_net/cap_net.3 +++ b/lib/libcasper/services/cap_net/cap_net.3 @@ -121,7 +121,7 @@ The .Fn cap_net_limit_init returns an opaque limit handle used to store a list of capabilities. The -.Fv mode +.Fa mode restricts the functionality of the service. Modes are encoded using the following flags: .Pp diff --git a/lib/libfigpar/figpar.c b/lib/libfigpar/figpar.c index 803ebadc3f49a..fbc6aaaba606f 100644 --- a/lib/libfigpar/figpar.c +++ b/lib/libfigpar/figpar.c @@ -27,7 +27,6 @@ #include #include -#include #include #include #include @@ -161,11 +160,11 @@ parse_config(struct figpar_config options[], const char *path, } /* Get the current offset */ - curpos = lseek(fd, 0, SEEK_CUR) - 1; - if (curpos == -1) { + if ((curpos = lseek(fd, 0, SEEK_CUR)) == -1) { close(fd); return (-1); } + curpos--; /* Find the length of the directive */ for (n = 0; r != 0; n++) { @@ -187,8 +186,7 @@ parse_config(struct figpar_config options[], const char *path, } /* Go back to the beginning of the directive */ - error = (int)lseek(fd, curpos, SEEK_SET); - if (error == (curpos - 1)) { + if (lseek(fd, curpos, SEEK_SET) == -1) { close(fd); return (-1); } @@ -246,11 +244,11 @@ parse_config(struct figpar_config options[], const char *path, } /* Get the current offset */ - curpos = lseek(fd, 0, SEEK_CUR) - 1; - if (curpos == -1) { + if ((curpos = lseek(fd, 0, SEEK_CUR)) == -1) { close(fd); return (-1); } + curpos--; /* Find the end of the value */ quote = 0; @@ -268,19 +266,18 @@ parse_config(struct figpar_config options[], const char *path, */ /* Get the current offset */ - charpos = lseek(fd, 0, SEEK_CUR) - 1; - if (charpos == -1) { + if ((charpos = lseek(fd, 0, SEEK_CUR)) == -1) { close(fd); return (-1); } + charpos--; /* * Go back so we can read the character before the key * to check if the character is escaped (which means we * should continue). */ - error = (int)lseek(fd, -2, SEEK_CUR); - if (error == -3) { + if (lseek(fd, -2, SEEK_CUR) == -1) { close(fd); return (-1); } @@ -292,8 +289,7 @@ parse_config(struct figpar_config options[], const char *path, */ for (n = 1; *p == '\\'; n++) { /* Move back another offset to read */ - error = (int)lseek(fd, -2, SEEK_CUR); - if (error == -3) { + if (lseek(fd, -2, SEEK_CUR) == -1) { close(fd); return (-1); } @@ -301,8 +297,7 @@ parse_config(struct figpar_config options[], const char *path, } /* Move offset back to the key and read it */ - error = (int)lseek(fd, charpos, SEEK_SET); - if (error == (charpos - 1)) { + if (lseek(fd, charpos, SEEK_SET) == -1) { close(fd); return (-1); } @@ -353,8 +348,7 @@ parse_config(struct figpar_config options[], const char *path, } /* Get the current offset */ - charpos = lseek(fd, 0, SEEK_CUR) - 1; - if (charpos == -1) { + if ((charpos = lseek(fd, 0, SEEK_CUR)) == -1) { close(fd); return (-1); } @@ -365,8 +359,7 @@ parse_config(struct figpar_config options[], const char *path, n--; /* Move offset back to the beginning of the value */ - error = (int)lseek(fd, curpos, SEEK_SET); - if (error == (curpos - 1)) { + if (lseek(fd, curpos, SEEK_SET) == -1) { close(fd); return (-1); } diff --git a/lib/libfigpar/string_m.c b/lib/libfigpar/string_m.c index 2e4adcdf791c2..df3def7889717 100644 --- a/lib/libfigpar/string_m.c +++ b/lib/libfigpar/string_m.c @@ -24,11 +24,9 @@ * SUCH DAMAGE. */ -#include - #include #include -#include +#include #include #include diff --git a/lib/libsys/procctl.2 b/lib/libsys/procctl.2 index cdb379696401b..df8119799c6df 100644 --- a/lib/libsys/procctl.2 +++ b/lib/libsys/procctl.2 @@ -75,7 +75,7 @@ All status changing requests .Dv *_CTL require the caller to have the right to debug the target. All status query requests -.DV *_STATUS +.Dv *_STATUS require the caller to have the right to observe the target. .Pp The following commands are supported: diff --git a/lib/libsys/statfs.2 b/lib/libsys/statfs.2 index 50809869a0221..a2abd9e7d7cdb 100644 --- a/lib/libsys/statfs.2 +++ b/lib/libsys/statfs.2 @@ -231,9 +231,7 @@ Corrupted data was detected while reading from the file system. The fields in the .Vt statfs structure have been defined to provide the parameters relevant for -traditional -.Tm UNIX -file systems. +traditional UNIX file systems. For some other file systems, values that have similar, but not identical, semantics to those described above may be returned. An example is msdosfs, which in case of FAT12 or FAT16 file systems diff --git a/lib/libsys/swapon.2 b/lib/libsys/swapon.2 index d7694ed48c8e5..23ed0bc2aa838 100644 --- a/lib/libsys/swapon.2 +++ b/lib/libsys/swapon.2 @@ -67,7 +67,7 @@ is made available for other purposes. The .Fa special argument points to the name of the device or file used for swapping. -.The +The .Va flags argument takes the following flags: .Bl -tag -width SWAPOFF_FORCE diff --git a/lib/libxo/libxo/Makefile b/lib/libxo/libxo/Makefile index 5b40d1e26880b..38e6ff031c7fe 100644 --- a/lib/libxo/libxo/Makefile +++ b/lib/libxo/libxo/Makefile @@ -28,6 +28,7 @@ MAN+= xo_attr.3 \ xo_create.3 \ xo_emit.3 \ xo_emit_err.3 \ + xo_emit_f.3 \ xo_err.3 \ xo_error.3 \ xo_finish.3 \ diff --git a/sbin/sysctl/sysctl.8 b/sbin/sysctl/sysctl.8 index 528efe6697b52..d350b62e67a34 100644 --- a/sbin/sysctl/sysctl.8 +++ b/sbin/sysctl/sysctl.8 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-3-Clause +.\" .\" Copyright (c) 1993 .\" The Regents of the University of California. All rights reserved. .\" @@ -50,11 +53,10 @@ privilege to set kernel state. The state to be retrieved or set is described using a .Dq Management Information Base .Pq Dq MIB -style name, described as a dotted set of -components. +style name, described as a dotted set of components. .Pp The following options are available: -.Bl -tag -width indent +.Bl -tag -width "-f filename" .It Fl A Equivalent to .Fl o a @@ -202,77 +204,77 @@ String and integer values can be set using .Nm . .Bl -column security.bsd.unprivileged_read_msgbuf integerxxx .It Sy "Name Type Changeable" -.It "kern.ostype string no" -.It "kern.osrelease string no" -.It "kern.osrevision integer no" -.It "kern.version string no" -.It "kern.maxvnodes integer yes" -.It "kern.maxproc integer no" -.It "kern.maxprocperuid integer yes" -.It "kern.maxfiles integer yes" -.It "kern.maxfilesperproc integer yes" -.It "kern.argmax integer no" -.It "kern.securelevel integer raise only" -.It "kern.hostname string yes" -.It "kern.hostid integer yes" -.It "kern.clockrate struct no" -.It "kern.posix1version integer no" -.It "kern.ngroups integer no" -.It "kern.job_control integer no" -.It "kern.saved_ids integer no" -.It "kern.boottime struct no" -.It "kern.domainname string yes" -.It "kern.filedelay integer yes" -.It "kern.dirdelay integer yes" -.It "kern.metadelay integer yes" -.It "kern.osreldate integer no" -.It "kern.bootfile string yes" -.It "kern.corefile string yes" -.It "kern.logsigexit integer yes" -.It "security.bsd.suser_enabled integer yes" -.It "security.bsd.see_other_uids integer yes" -.It "security.bsd.see_other_gids integer yes" -.It "security.bsd.see_jail_proc integer yes" -.It "security.bsd.unprivileged_proc_debug integer yes" -.It "security.bsd.unprivileged_read_msgbuf integer yes" -.It "vm.loadavg struct no" -.It "hw.machine string no" -.It "hw.model string no" -.It "hw.ncpu integer no" -.It "hw.byteorder integer no" -.It "hw.physmem integer no" -.It "hw.usermem integer no" -.It "hw.pagesize integer no" -.It "hw.floatingpoint integer no" -.It "hw.machine_arch string no" -.It "hw.realmem integer no" -.It "machdep.adjkerntz integer yes" -.It "machdep.disable_rtc_set integer yes" -.It "machdep.guessed_bootdev string no" -.It "user.cs_path string no" -.It "user.bc_base_max integer no" -.It "user.bc_dim_max integer no" -.It "user.bc_scale_max integer no" -.It "user.bc_string_max integer no" -.It "user.coll_weights_max integer no" -.It "user.expr_nest_max integer no" -.It "user.line_max integer no" -.It "user.re_dup_max integer no" -.It "user.posix2_version integer no" -.It "user.posix2_c_bind integer no" -.It "user.posix2_c_dev integer no" -.It "user.posix2_char_term integer no" -.It "user.posix2_fort_dev integer no" -.It "user.posix2_fort_run integer no" -.It "user.posix2_localedef integer no" -.It "user.posix2_sw_dev integer no" -.It "user.posix2_upe integer no" -.It "user.stream_max integer no" -.It "user.tzname_max integer no" -.It "user.localbase string no" +.It Va "kern.ostype string no" +.It Va "kern.osrelease string no" +.It Va "kern.osrevision integer no" +.It Va "kern.version string no" +.It Va "kern.maxvnodes integer yes" +.It Va "kern.maxproc integer no" +.It Va "kern.maxprocperuid integer yes" +.It Va "kern.maxfiles integer yes" +.It Va "kern.maxfilesperproc integer yes" +.It Va "kern.argmax integer no" +.It Va "kern.securelevel integer raise only" +.It Va "kern.hostname string yes" +.It Va "kern.hostid integer yes" +.It Va "kern.clockrate struct no" +.It Va "kern.posix1version integer no" +.It Va "kern.ngroups integer no" +.It Va "kern.job_control integer no" +.It Va "kern.saved_ids integer no" +.It Va "kern.boottime struct no" +.It Va "kern.domainname string yes" +.It Va "kern.filedelay integer yes" +.It Va "kern.dirdelay integer yes" +.It Va "kern.metadelay integer yes" +.It Va "kern.osreldate integer no" +.It Va "kern.bootfile string yes" +.It Va "kern.corefile string yes" +.It Va "kern.logsigexit integer yes" +.It Va "security.bsd.suser_enabled integer yes" +.It Va "security.bsd.see_other_uids integer yes" +.It Va "security.bsd.see_other_gids integer yes" +.It Va "security.bsd.see_jail_proc integer yes" +.It Va "security.bsd.unprivileged_proc_debug integer yes" +.It Va "security.bsd.unprivileged_read_msgbuf integer yes" +.It Va "vm.loadavg struct no" +.It Va "hw.machine string no" +.It Va "hw.model string no" +.It Va "hw.ncpu integer no" +.It Va "hw.byteorder integer no" +.It Va "hw.physmem integer no" +.It Va "hw.usermem integer no" +.It Va "hw.pagesize integer no" +.It Va "hw.floatingpoint integer no" +.It Va "hw.machine_arch string no" +.It Va "hw.realmem integer no" +.It Va "machdep.adjkerntz integer yes" +.It Va "machdep.disable_rtc_set integer yes" +.It Va "machdep.guessed_bootdev string no" +.It Va "user.cs_path string no" +.It Va "user.bc_base_max integer no" +.It Va "user.bc_dim_max integer no" +.It Va "user.bc_scale_max integer no" +.It Va "user.bc_string_max integer no" +.It Va "user.coll_weights_max integer no" +.It Va "user.expr_nest_max integer no" +.It Va "user.line_max integer no" +.It Va "user.re_dup_max integer no" +.It Va "user.posix2_version integer no" +.It Va "user.posix2_c_bind integer no" +.It Va "user.posix2_c_dev integer no" +.It Va "user.posix2_char_term integer no" +.It Va "user.posix2_fort_dev integer no" +.It Va "user.posix2_fort_run integer no" +.It Va "user.posix2_localedef integer no" +.It Va "user.posix2_sw_dev integer no" +.It Va "user.posix2_upe integer no" +.It Va "user.stream_max integer no" +.It Va "user.tzname_max integer no" +.It Va "user.localbase string no" .El .Sh FILES -.Bl -tag -width ".In netinet/icmp_var.h" -compact +.Bl -tag -width "" -compact .It In sys/sysctl.h definitions for top level identifiers, second level kernel and hardware identifiers, and user level identifiers @@ -296,20 +298,20 @@ definitions for fourth level UDP identifiers For example, to retrieve the maximum number of processes allowed in the system, one would use the following request: .Pp -.Dl "sysctl kern.maxproc" +.Dl Va "sysctl kern.maxproc" .Pp To set the maximum number of processes allowed per uid to 1000, one would use the following request: .Pp -.Dl "sysctl kern.maxprocperuid=1000" +.Dl Va "sysctl kern.maxprocperuid=1000" .Pp Information about the system clock rate may be obtained with: .Pp -.Dl "sysctl kern.clockrate" +.Dl Va "sysctl kern.clockrate" .Pp Information about the load average history may be obtained with: .Pp -.Dl "sysctl vm.loadavg" +.Dl Va "sysctl vm.loadavg" .Pp More variables than these exist, and the best and likely only place to search for their deeper meaning is undoubtedly the source where diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index ad4bc47acfea6..d8d90f092083d 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -713,6 +713,8 @@ MLINKS+=gpioths.4 dht11.4 MLINKS+=gpioths.4 dht22.4 MLINKS+=gre.4 if_gre.4 MLINKS+=hpet.4 acpi_hpet.4 +MLINKS+=hv_netvsc.4 hn.4 \ + hv_netvsc.4 if_hn.4 MLINKS+=${_hptrr.4} ${_rr232x.4} MLINKS+=${_attimer.4} ${_i8254.4} MLINKS+=ip.4 rawip.4 diff --git a/share/man/man4/hv_netvsc.4 b/share/man/man4/hv_netvsc.4 index 226fa016f6956..e5c7004713c59 100644 --- a/share/man/man4/hv_netvsc.4 +++ b/share/man/man4/hv_netvsc.4 @@ -1,3 +1,5 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause .\" .\" Copyright (c) 2012 Microsoft Corp. .\" All rights reserved. diff --git a/share/man/man4/qat.4 b/share/man/man4/qat.4 index b0fa0b0cbc922..02be0837ce549 100644 --- a/share/man/man4/qat.4 +++ b/share/man/man4/qat.4 @@ -148,7 +148,7 @@ QAT firmware revision number. Summary of device specific configuration. .It Va heartbeat QAT device heartbeat status. Value '1' indicates that the device is operational. -'0' value means that the device is not responsive. Device requires restart. +Value '0' means that the device is not responsive. Device requires restart. .It Va heartbeat_failed Number of QAT heartbeat failures received. .It Va heartbeat_sent diff --git a/share/man/man9/firmware.9 b/share/man/man9/firmware.9 index 883f0a2634d4d..f324861248d2c 100644 --- a/share/man/man9/firmware.9 +++ b/share/man/man9/firmware.9 @@ -341,7 +341,7 @@ uses the following algorithm to find firmware images: .It If an existing firmware image is registered for .Fa imagename, -.that image is returned. +that image is returned. .It If .Fa imagename diff --git a/stand/efi/loader/copy.c b/stand/efi/loader/copy.c index d34acea4e8769..90a55089ffc41 100644 --- a/stand/efi/loader/copy.c +++ b/stand/efi/loader/copy.c @@ -220,11 +220,10 @@ command_copy_staging(int argc, char *argv[]) [COPY_STAGING_DISABLE] = "disable", [COPY_STAGING_AUTO] = "auto", }; - int prev, res; + int prev; - res = CMD_OK; if (argc > 2) { - res = CMD_ERROR; + goto usage; } else if (argc == 2) { prev = copy_staging; if (strcmp(argv[1], "enable") == 0) @@ -233,11 +232,9 @@ command_copy_staging(int argc, char *argv[]) copy_staging = COPY_STAGING_DISABLE; else if (strcmp(argv[1], "auto") == 0) copy_staging = COPY_STAGING_AUTO; - else { - printf("usage: copy_staging enable|disable|auto\n"); - res = CMD_ERROR; - } - if (res == CMD_OK && prev != copy_staging) { + else + goto usage; + if (prev != copy_staging) { printf("changed copy_staging, unloading kernel\n"); unload(); efi_copy_free(); @@ -246,7 +243,11 @@ command_copy_staging(int argc, char *argv[]) } else { printf("copy staging: %s\n", mode[copy_staging]); } - return (res); + return (CMD_OK); + +usage: + command_errmsg = "usage: copy_staging enable|disable|auto"; + return (CMD_ERROR); } COMMAND_SET(copy_staging, "copy_staging", "copy staging", command_copy_staging); #endif @@ -256,19 +257,17 @@ command_staging_slop(int argc, char *argv[]) { char *endp; u_long new, prev; - int res; - res = CMD_OK; if (argc > 2) { - res = CMD_ERROR; + goto err; } else if (argc == 2) { new = strtoul(argv[1], &endp, 0); - if (*endp != '\0') { - printf("invalid slop value\n"); - res = CMD_ERROR; - } - if (res == CMD_OK && staging_slop != new) { + if (*endp != '\0') + goto err; + if (staging_slop != new) { + staging_slop = new; printf("changed slop, unloading kernel\n"); + unload(); efi_copy_free(); efi_copy_init(); @@ -276,7 +275,11 @@ command_staging_slop(int argc, char *argv[]) } else { printf("staging slop %#lx\n", staging_slop); } - return (res); + return (CMD_OK); + +err: + command_errmsg = "invalid slop value"; + return (CMD_ERROR); } COMMAND_SET(staging_slop, "staging_slop", "set staging slop", command_staging_slop); diff --git a/stand/man/loader.efi.8 b/stand/man/loader.efi.8 index 3527d8b66a997..84ba5c4fdb308 100644 --- a/stand/man/loader.efi.8 +++ b/stand/man/loader.efi.8 @@ -434,7 +434,7 @@ to the default name if there wasn't one there before. Check to see if they are copies before updating (with X64 substituted using the above table): .Bd -literal -offset indent -# cmp /boot/efi/EFI/FREEBSD/LOADER.EFI /boot/efi/EFI/BOOT/BOOOTX64.EFI +# cmp /boot/efi/EFI/FREEBSD/LOADER.EFI /boot/efi/EFI/BOOT/BOOTX64.EFI .Ed Copy the loader: .Bd -literal -offset indent diff --git a/sys/dev/usb/serial/u3g.c b/sys/dev/usb/serial/u3g.c index 28a403a846bd7..a549f93b2af19 100644 --- a/sys/dev/usb/serial/u3g.c +++ b/sys/dev/usb/serial/u3g.c @@ -512,21 +512,21 @@ static const STRUCT_USB_HOST_ID u3g_devs[] = { U3G_DEV(QUANTA, GLX, 0), U3G_DEV(QUANTA, Q101, 0), U3G_DEV(QUANTA, Q111, 0), + U3G_DEV(QUECTEL, EC21, 0), U3G_DEV(QUECTEL, EC25, 0), U3G_DEV(QUECTEL, EM05, 0), - U3G_DEV(QUECTEL, EC21, 0), U3G_DEV(QUECTEL, EG91, 0), U3G_DEV(QUECTEL, EG95, 0), + U3G_DEV(QUECTEL, BG96, 0), U3G_DEV(QUECTEL, EP06, 0), U3G_DEV(QUECTEL, EG065K, 0), - U3G_DEV(QUECTEL, EM12, 0), - U3G_DEV(QUECTEL, BG96, 0), - U3G_DEV(QUECTEL, BG95, 0), - U3G_DEV(QUECTEL, AG35, 0), U3G_DEV(QUECTEL, AG15, 0), + U3G_DEV(QUECTEL, AG35, 0), U3G_DEV(QUECTEL, AG520, 0), U3G_DEV(QUECTEL, AG550, 0), + U3G_DEV(QUECTEL, EM12, 0), U3G_DEV(QUECTEL, EM160R, 0), + U3G_DEV(QUECTEL, BG95, 0), U3G_DEV(QUECTEL, RG500, 0), U3G_DEV(QUECTEL, RG520, 0), U3G_DEV(QUECTEL, EC200, 0), diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs index 861e5ad73a2e6..61c7686da9571 100644 --- a/sys/dev/usb/usbdevs +++ b/sys/dev/usb/usbdevs @@ -3988,21 +3988,21 @@ product QUANTA GLE 0xea06 HSDPA modem product QUANTA RW6815R 0xf003 HP iPAQ rw6815 RNDIS /* Quectel products */ +product QUECTEL EC21 0x0121 Quectel EC21 product QUECTEL EC25 0x0125 Quectel EC20(MDM9x07)/EC25/EG25 product QUECTEL EM05 0x0127 Quectel EM05 -product QUECTEL EC21 0x0121 Quectel EC21 product QUECTEL EG91 0x0191 Quectel EG91 product QUECTEL EG95 0x0195 Quectel EG95 +product QUECTEL BG96 0x0296 Quectel BG96 product QUECTEL EP06 0x0306 Quectel EG06/EP06/EM06 product QUECTEL EG065K 0x030B Quectel EG065K/EG060K -product QUECTEL EM12 0x0512 Quectel EG12/EP12/EM12/EG16/EG18 -product QUECTEL BG96 0x0296 Quectel BG96 -product QUECTEL BG95 0x0700 Quectel BG95/BG77/BG600L-M3/BC69 -product QUECTEL AG35 0x0435 Quectel AG35 product QUECTEL AG15 0x0415 Quectel AG15 +product QUECTEL AG35 0x0435 Quectel AG35 product QUECTEL AG520 0x0452 Quectel AG520 product QUECTEL AG550 0x0455 Quectel AG550 +product QUECTEL EM12 0x0512 Quectel EG12/EP12/EM12/EG16/EG18 product QUECTEL EM160R 0x0620 Quectel EM160R/EG20 +product QUECTEL BG95 0x0700 Quectel BG95/BG77/BG600L-M3/BC69 product QUECTEL RG500 0x0800 Quectel RG500/RM500/RG510/RM510 product QUECTEL RG520 0x0801 Quectel RG520/RM520/SG520 product QUECTEL EC200 0x6000 Quectel EC200/UC200 diff --git a/usr.sbin/mfiutil/mfiutil.8 b/usr.sbin/mfiutil/mfiutil.8 index 86dc6b6ee1229..9f8cacf7f16de 100644 --- a/usr.sbin/mfiutil/mfiutil.8 +++ b/usr.sbin/mfiutil/mfiutil.8 @@ -271,7 +271,8 @@ Currently three global options are supported: .It Fl D Ar device .Ar device specifies the device node of the controller to use. -'/dev/' will be added to the device node if needed. +.Pa /dev/ +will be added to the device node if needed. If no device node is specified, then device will be made of the type and device. .It Fl t Ar type diff --git a/usr.sbin/mlx5tool/mlx5tool.8 b/usr.sbin/mlx5tool/mlx5tool.8 index 13c19d2d032b0..cca1adeedbebf 100644 --- a/usr.sbin/mlx5tool/mlx5tool.8 +++ b/usr.sbin/mlx5tool/mlx5tool.8 @@ -60,7 +60,7 @@ The utility executes commands on specific adapter, which is addressed using .Em device:bus:slot:function conventions of the PCIe buses. You can match adapters ethernet name and addresses using the -.X pciconf 8 +.Xr pciconf 8 utility. The address is passed as an argument of the .Fl d