Skip to content
Merged
2 changes: 1 addition & 1 deletion lib/libcasper/services/cap_net/cap_net.3
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
31 changes: 12 additions & 19 deletions lib/libfigpar/figpar.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include <sys/param.h>

#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
#include <fnmatch.h>
#include <stdlib.h>
Expand Down Expand Up @@ -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++) {
Expand All @@ -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);
}
Expand Down Expand Up @@ -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;
Expand All @@ -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);
}
Expand All @@ -292,17 +289,15 @@ 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);
}
r = read(fd, p, 1);
}

/* 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);
}
Expand Down Expand Up @@ -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);
}
Expand All @@ -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);
}
Expand Down
4 changes: 1 addition & 3 deletions lib/libfigpar/string_m.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,9 @@
* SUCH DAMAGE.
*/

#include <sys/types.h>

#include <ctype.h>
#include <errno.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>

Expand Down
2 changes: 1 addition & 1 deletion lib/libsys/procctl.2
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 1 addition & 3 deletions lib/libsys/statfs.2
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/libsys/swapon.2
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions lib/libxo/libxo/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
154 changes: 78 additions & 76 deletions sbin/sysctl/sysctl.8
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
.\"-
.\" SPDX-License-Identifier: BSD-3-Clause
.\"
.\" Copyright (c) 1993
.\" The Regents of the University of California. All rights reserved.
.\"
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 "<netinet/icmp_var.h>" -compact
.It In sys/sysctl.h
definitions for top level identifiers, second level kernel and hardware
identifiers, and user level identifiers
Expand All @@ -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
Expand Down
2 changes: 2 additions & 0 deletions share/man/man4/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions share/man/man4/hv_netvsc.4
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.\"-
.\" SPDX-License-Identifier: BSD-2-Clause
.\"
.\" Copyright (c) 2012 Microsoft Corp.
.\" All rights reserved.
Expand Down
2 changes: 1 addition & 1 deletion share/man/man4/qat.4
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion share/man/man9/firmware.9
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading