diff options
Diffstat (limited to 'usr/src/man')
-rw-r--r-- | usr/src/man/man1/crontab.1 | 90 | ||||
-rw-r--r-- | usr/src/man/man1/find.1 | 14 | ||||
-rw-r--r-- | usr/src/man/man1/grep.1 | 77 | ||||
-rw-r--r-- | usr/src/man/man1/sed.1 | 11 | ||||
-rw-r--r-- | usr/src/man/man1m/dispadmin.1m | 30 | ||||
-rw-r--r-- | usr/src/man/man1m/prtvtoc.1m | 67 | ||||
-rw-r--r-- | usr/src/man/man2/Makefile | 5 | ||||
-rw-r--r-- | usr/src/man/man2/utimes.2 | 58 | ||||
-rw-r--r-- | usr/src/man/man3c/getopt_long.3c | 167 | ||||
-rw-r--r-- | usr/src/man/man3c/printf.3c | 39 | ||||
-rw-r--r-- | usr/src/man/man3head/Makefile | 9 | ||||
-rw-r--r-- | usr/src/man/man3head/timespec.3head | 106 | ||||
-rw-r--r-- | usr/src/man/man3lib/libc.3lib | 251 | ||||
-rw-r--r-- | usr/src/man/man3nsl/getipsecprotobyname.3nsl | 22 | ||||
-rw-r--r-- | usr/src/man/man4/fx_dptbl.4 | 22 | ||||
-rw-r--r-- | usr/src/man/man4/rt_dptbl.4 | 17 | ||||
-rw-r--r-- | usr/src/man/man4/ts_dptbl.4 | 19 | ||||
-rw-r--r-- | usr/src/man/man7d/mlxcx.7d | 4 | ||||
-rw-r--r-- | usr/src/man/man9f/Makefile | 20 | ||||
-rw-r--r-- | usr/src/man/man9f/credentials.9f | 201 |
20 files changed, 861 insertions, 368 deletions
diff --git a/usr/src/man/man1/crontab.1 b/usr/src/man/man1/crontab.1 index c954036653..d48b995045 100644 --- a/usr/src/man/man1/crontab.1 +++ b/usr/src/man/man1/crontab.1 @@ -45,29 +45,24 @@ .\" Copyright (c) 2011, Joyent, Inc. All Rights Reserved .\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved .\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved -.\" Copyright 2019 OmniOS Community Edition (OmniOSce) Association. +.\" Copyright 2020 OmniOS Community Edition (OmniOSce) Association. .\" -.TH CRONTAB 1 "Oct 22, 2019" +.TH CRONTAB 1 "Aug 20, 2020" .SH NAME crontab \- user crontab file .SH SYNOPSIS .nf -\fB/usr/bin/crontab\fR [\fIfilename\fR] +\fB/usr/bin/crontab\fR [\fB-u\fR \fIusername\fR] [\fIfilename\fR] .fi .LP .nf -\fB/usr/bin/crontab\fR \fB-e\fR [\fIusername\fR] +\fB/usr/bin/crontab\fR \fB{ -e | -l | -r }\fR [\fIusername\fR] .fi .LP .nf -\fB/usr/bin/crontab\fR \fB-l\fR [\fB-g\fR] [\fIusername\fR] -.fi - -.LP -.nf -\fB/usr/bin/crontab\fR \fB-r\fR [\fIusername\fR] +\fB/usr/bin/crontab\fR \fB-u\fR \fIusername\fR \fB{ -e | -g | -l | -r }\fR .fi .LP @@ -77,17 +72,12 @@ crontab \- user crontab file .LP .nf -\fB/usr/xpg4/bin/crontab\fR \fB-e\fR [\fIusername\fR] +\fB/usr/xpg4/bin/crontab\fR \fB{ -e | -g | -l | -r }\fR [\fIusername\fR] .fi .LP .nf -\fB/usr/xpg4/bin/crontab\fR \fB-l\fR [\fB-g\fR] [\fIusername\fR] -.fi - -.LP -.nf -\fB/usr/xpg4/bin/crontab\fR \fB-r\fR [\fIusername\fR] +\fB/usr/xpg4/bin/crontab\fR \fB-u\fR \fIusername\fR \fB{ -e | -l | -r }\fR .fi .LP @@ -97,17 +87,12 @@ crontab \- user crontab file .LP .nf -\fB/usr/xpg6/bin/crontab\fR \fB-e\fR [\fIusername\fR] -.fi - -.LP -.nf -\fB/usr/xpg6/bin/crontab\fR \fB-l\fR [\fB-g\fR] [\fIusername\fR] +\fB/usr/xpg6/bin/crontab\fR \fB{ -e | -g | -l | -r }\fR [\fIusername\fR] .fi .LP .nf -\fB/usr/xpg6/bin/crontab\fR \fB-r\fR [\fIusername\fR] +\fB/usr/xpg6/bin/crontab\fR \fB-u\fR \fIusername\fR \fB{ -e | -l | -r }\fR .fi .SH DESCRIPTION @@ -119,7 +104,8 @@ users' crontabs. .sp .LP If \fBcrontab\fR is invoked with \fIfilename\fR, this overwrites an existing -\fBcrontab\fR entry for the user that invokes it. +\fBcrontab\fR entry for the user that invokes it, or for the user specified +with the \fB-u\fR option. .sp .LP Cron supports a merged crontab with entries coming from either the user's @@ -131,6 +117,8 @@ be customized by the user. The dual set of crontab entries is only of interest to system-defined users such as \fBroot\fR. Except where otherwise explicitly indicated, all variants of the \fBcrontab\fR command act only on the editable crontab files found in \fB/var/spool/cron/crontabs\fR. +.sp +.LP .SS "\fBcrontab\fR Access Control" Users: Access to \fBcrontab\fR is allowed: .RS +4 @@ -285,11 +273,11 @@ The following variables are supported: .sp .ne 2 .na -\fB\fBHOME\fR\fR +\fBHOME\fR .ad .sp .6 .RS 4n -Allows the user to choose and alternative directory for cron to change +Allows the user to choose an alternative directory for cron to change directory to prior to running the command. For example: .sp .in +2 @@ -304,7 +292,7 @@ HOME=/var/tmp .sp .ne 2 .na -\fB\fBSHELL\fR\fR +\fBSHELL\fR .ad .sp .6 .RS 4n @@ -322,7 +310,7 @@ SHELL=/usr/bin/ksh .sp .ne 2 .na -\fB\fBTZ\fR\fR +\fBTZ\fR .ad .sp .6 .RS 4n @@ -365,7 +353,7 @@ The following options are supported: .sp .ne 2 .na -\fB\fB-e\fR\fR +\fB-e\fR .ad .RS 6n Edits a copy of the current user's \fBcrontab\fR file, or creates an empty file @@ -392,7 +380,7 @@ editable. .sp .ne 2 .na -\fB\fB-l\fR\fR +\fB-l\fR .ad .RS 6n Lists the \fBcrontab\fR file for the invoking user. Only root or a user with @@ -419,7 +407,7 @@ also given. .sp .ne 2 .na -\fB\fB-r\fR\fR +\fB-r\fR .ad .RS 6n Removes a user's \fBcrontab\fR from the \fBcrontab\fR directory. Only root or a @@ -428,6 +416,18 @@ following the \fB-r\fR option to remove the \fBcrontab\fR file of the specified user. .RE +.sp +.ne 2 +.na +\fB-u\fR \fIusername\fR +.ad +.RS 6n +Specifies the name of the user whose \fBcrontab\fR is to be replaced, viewed or +modified. This can only be done by root or by a user with the +\fBsolaris.jobs.admin\fR authorization. + +.RE + .SH EXAMPLES \fBExample 1 \fRCleaning up Core Files .sp @@ -552,7 +552,7 @@ that affect the execution of \fBcrontab\fR: \fBLANG\fR, \fBLC_ALL\fR, .SS "\fB/usr/bin/crontab\fR" .ne 2 .na -\fB\fBEDITOR\fR\fR +\fBEDITOR\fR .ad .RS 10n Determine the editor to be invoked when the \fB-e\fR option is specified. This @@ -563,7 +563,7 @@ is overridden by the \fBVISUAL\fR environmental variable. The default editor is .sp .ne 2 .na -\fB\fBPATH\fR\fR +\fBPATH\fR .ad .RS 10n The \fBPATH\fR in \fBcrontab\fR's environment specifies the search path used to @@ -573,7 +573,7 @@ find the editor. .sp .ne 2 .na -\fB\fBVISUAL\fR\fR +\fBVISUAL\fR .ad .RS 10n Determine the visual editor to be invoked when the \fB-e\fR option is @@ -584,7 +584,7 @@ specified. If \fBVISUAL\fR is not specified, then the environment variable .SS "\fB/usr/xpg4/bin/crontab\fR" .ne 2 .na -\fB\fBEDITOR\fR\fR +\fBEDITOR\fR .ad .RS 10n Determine the editor to be invoked when the \fB-e\fR option is specified. The @@ -594,7 +594,7 @@ default editor is \fB/usr/xpg4/bin/vi\fR. .SS "\fB/usr/xpg6/bin/crontab\fR" .ne 2 .na -\fB\fBEDITOR\fR\fR +\fBEDITOR\fR .ad .RS 10n Determine the editor to be invoked when the \fB-e\fR option is specified. The @@ -606,7 +606,7 @@ The following exit values are returned: .sp .ne 2 .na -\fB\fB0\fR\fR +\fB0\fR .ad .RS 6n Successful completion. @@ -615,7 +615,7 @@ Successful completion. .sp .ne 2 .na -\fB\fB>0\fR\fR +\fB>0\fR .ad .RS 6n An error occurred. @@ -624,7 +624,7 @@ An error occurred. .SH FILES .ne 2 .na -\fB\fB/etc/cron.d\fR\fR +\fB/etc/cron.d\fR .ad .RS 28n main cron directory @@ -633,7 +633,7 @@ main cron directory .sp .ne 2 .na -\fB\fB/etc/cron.d/cron.allow\fR\fR +\fB/etc/cron.d/cron.allow\fR .ad .RS 28n list of allowed users @@ -642,7 +642,7 @@ list of allowed users .sp .ne 2 .na -\fB\fB/etc/default/cron\fR\fR +\fB/etc/default/cron\fR .ad .RS 28n contains cron default settings @@ -651,7 +651,7 @@ contains cron default settings .sp .ne 2 .na -\fB\fB/etc/cron.d/cron.deny\fR\fR +\fB/etc/cron.d/cron.deny\fR .ad .RS 28n list of denied users @@ -669,7 +669,7 @@ system spool area for \fBcrontab\fR .sp .ne 2 .na -\fB\fB/var/cron/log\fR\fR +\fB/var/cron/log\fR .ad .RS 28n accounting information @@ -678,7 +678,7 @@ accounting information .sp .ne 2 .na -\fB\fB/var/spool/cron/crontabs\fR\fR +\fB/var/spool/cron/crontabs\fR .ad .RS 28n spool area for \fBcrontab\fR diff --git a/usr/src/man/man1/find.1 b/usr/src/man/man1/find.1 index d393a3197d..3e1b3959ee 100644 --- a/usr/src/man/man1/find.1 +++ b/usr/src/man/man1/find.1 @@ -47,7 +47,7 @@ .\" Copyright (c) 2013 Andrew Stormont. All rights reserved. .\" Copyright 2020 Joyent, Inc. .\" -.TH FIND 1 "Feb 20, 2020" +.TH FIND 1 "Aug 23, 2020" .SH NAME find \- find files .SH SYNOPSIS @@ -226,6 +226,18 @@ True if the file's status was changed \fIn\fR days ago. .sp .ne 2 .na +\fB\fB-delete\fR\fR +.ad +.RS 17n +Always true. Deletes the files and folders found recursing from the current +directory. This option implicitly enables \fB-depth\fR and is incompatible +with following symlinks, if specified. For security reasons, relative paths +starting with '\fB\&/\fR' are not allowed. +.RE + +.sp +.ne 2 +.na \fB\fB-depth\fR\fR .ad .RS 17n diff --git a/usr/src/man/man1/grep.1 b/usr/src/man/man1/grep.1 index 92e25a96d3..be5014192d 100644 --- a/usr/src/man/man1/grep.1 +++ b/usr/src/man/man1/grep.1 @@ -44,8 +44,9 @@ .\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved .\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved .\" Copyright 2018 Nexenta Systems, Inc. +.\" Copyright 2020 Oxide Computer Company .\" -.Dd February 10, 2018 +.Dd August 13, 2020 .Dt GREP 1 .Os .Sh NAME @@ -56,10 +57,11 @@ .Sh SYNOPSIS .Nm grep .Op Fl E Ns | Ns Fl F -.Op Fl bchHilnrRsqvwx +.Op Fl bchHilLnorRsqvwx .Op Fl A Ar num .Op Fl B Ar num .Op Fl C Ar num Ns | Ns Fl Ns Ar num +.Op Fl -label Ns = Ns Ar name .Oo Fl e Ar pattern_list Oc Ns ... .Oo Fl f Ar pattern_file Oc Ns ... .Op Ar pattern_list @@ -107,7 +109,9 @@ delimiter line. .It Fl c Prints only a count of the lines that contain the pattern. Overrides -.Fl l . +.Fl l +and +.Fl L . .It Fl C Ar num Ns \&, Fl Ns Ar num Prints .Ar num @@ -164,22 +168,71 @@ Used when searching multiple files. Precedes each line by the name of the file containing the matching line. .It Fl i Ignores upper/lower case distinction during comparisons. +.It Fl -label Ns = Ns Ar name +When the name of the matching file is printed +.Pq Fl H , +instead of printing the string +.Ql (standard input) +the string +.Ar name +is printed instead. +See +.Sx Example 5 . .It Fl l Prints only the names of files with matching lines, separated by NEWLINE characters. Does not repeat the names of files when the pattern is found more than once. +If both +.Fl l +and +.Fl L +are specified, only the last specified takes effect. +Overrides +.Fl H . +.It Fl L +The opposite of the +.Fl l +flag. +Prints only the names of files without matching lines. +If both +.Fl l +and +.Fl L +are specified, only the last specified takes effect. Overrides .Fl H . .It Fl n Precedes each line by its line number in the file (first line is 1). +.It Fl o +Prints only the matching part of a line. +If a pattern appears more than once in a line, it will be matched and +printed multiple times. +.Pp +The +.Fl o +option is overridden when any of the +.Fl l , +.Fl L , +or +.Fl c +options are specified. +When the +.Fl o +option is specified, all context options are ignored. +The +.Fl o +and +.Fl v +options are not supported together at this time. .It Fl q Quiet. Does not write anything to the standard output, regardless of matching lines. Exits with zero status if an input line is selected. Overrides -.Fl c +.Fl c , +.Fl l , and -.Fl l . +.Fl L . .It Fl r Read all files under each directory, recursively. Follow symbolic links on the command line, but skip symlinks that are @@ -341,6 +394,20 @@ $ grep -E '^abc$ $ grep -F -x 'abc def' .Ed +.It Sy Example 5 No Using Fl -label +When piping standard input into +.Nm , +as part of a pipeline, occasionally it can be useful override the file +name +.Ql (standard input) +with something from the pipeline. +This would output each matching line instead with the name of the input +file. +.Bd -literal +$ for f in *.gz; do +> gzcat $f | grep -H --label=$f foo +> done +.Ed .El .Sh ENVIRONMENT VARIABLES See diff --git a/usr/src/man/man1/sed.1 b/usr/src/man/man1/sed.1 index 441f877919..f581279fc6 100644 --- a/usr/src/man/man1/sed.1 +++ b/usr/src/man/man1/sed.1 @@ -1,6 +1,9 @@ .\" Copyright (c) 1992, 1993 .\" The Regents of the University of California. All rights reserved. .\" +.\" Copyright 2011 Nexenta Systems, Inc. All rights reserved. +.\" Copyright 2020 OmniOS Community Edition (OmniOSce) Association. +.\" .\" This code is derived from software contributed to Berkeley by .\" the Institute of Electrical and Electronics Engineers, Inc. .\" @@ -28,7 +31,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.TH SED 1 "Aug 7, 2020" +.TH SED 1 "Aug 21, 2020" .SH NAME \fBsed\fP \- stream editor @@ -152,7 +155,7 @@ option suppresses this behavior. Same as \fB\-E\fP for compatibility with GNU sed. - +.PP The form of a \fBsed\fP command is as follows: @@ -177,6 +180,10 @@ deletes the pattern space. Some of the functions use a .IR "hold space" to save all or part of the pattern space for subsequent retrieval. + +If an input file is growing while sed is running, the +``$'' +address match may be unreliable. .SH "Sed Addresses" An address is not required, but if specified must have one of the following formats: diff --git a/usr/src/man/man1m/dispadmin.1m b/usr/src/man/man1m/dispadmin.1m index 578bb8da87..0f7af2d255 100644 --- a/usr/src/man/man1m/dispadmin.1m +++ b/usr/src/man/man1m/dispadmin.1m @@ -1,5 +1,6 @@ '\" te .\" Copyright 1989 AT&T Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved. +.\" Copyright 2020 (c) Sergio Aguayo, All Rights Reserved. .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] @@ -7,7 +8,6 @@ .SH NAME dispadmin \- process scheduler administration .SH SYNOPSIS -.LP .nf \fBdispadmin\fR \fB-l\fR .fi @@ -23,8 +23,6 @@ dispadmin \- process scheduler administration .fi .SH DESCRIPTION -.sp -.LP The \fBdispadmin\fR command displays or changes process scheduler parameters while the system is running. .sp @@ -35,8 +33,6 @@ not attempt to analyze the effect that the new values have on the performance of the system. Inappropriate values can have a negative effect on system performance. (See \fISystem Administration Guide: Advanced Administration\fR.) .SH OPTIONS -.sp -.LP The following options are supported: .sp .ne 2 @@ -48,9 +44,9 @@ The following options are supported: Specifies the class whose parameters are to be displayed or changed. Valid \fIclass\fR values are: \fBRT\fR for the real-time class, \fBTS\fR for the time-sharing class, \fBIA\fR for the inter-active class, \fBFSS\fR for the -fair-share class, and FX for the fixed-priority class. The time-sharing and -inter-active classes share the same scheduler, so changes to the scheduling -parameters of one will change those of the other. +fair-share class, and \fBFX\fR for the fixed-priority class. The time-sharing +and inter-active classes share the same scheduler, so changes to the +scheduling parameters of one will change those of the other. .RE .sp @@ -131,18 +127,17 @@ Moreover, the values must describe a table that is the same size (has same number of priority levels) as the table being overwritten. Super-user privileges are required in order to use the \fB-s\fR option. .sp -Specify time quantum values for scheduling classes in system clock ticks, and -not in constant-time units. Time quantum values are based on the value of the -kernel's \fBhz\fR variable. If kernel variable \fBhires_tick\fR is set to -\fB1\fR to get higher resolution clock behavior, the actual time quanta will be -reduced by the order of \fB10\fR. +Time quantum values for scheduling classes are specified in system clock ticks +rather than constant-time units. These values are based on the value of the +kernel's \fBhz\fR variable. By default, the system operates at 1000 Hz and +thus with a quantum of 1 millisecond. If the kernel tunable \fBhires_tick\fR +is set to 0, this drops to 100 Hz for a larger quantum of 10 milliseconds. .sp The \fB-g\fR and \fB-s\fR options are mutually exclusive: you may not retrieve the table at the same time you are overwriting it. .RE .SH EXAMPLES -.LP \fBExample 1 \fRRetrieving the Current Scheduler Parameters for the real-time class .sp @@ -209,7 +204,6 @@ dispadmin \fB-c\fR TS \fB-s\fR ts.config .sp .SH FILES -.sp .ne 2 .na \fB\fB/etc/dispadmin.conf\fR\fR @@ -220,8 +214,6 @@ Possible location for argument to \fB-s\fR option. .RE .SH SEE ALSO -.sp -.LP \fBpriocntl\fR(1), \fBsvcs\fR(1), \fBsvcadm\fR(1M), \fBpriocntl\fR(2), \fBfx_dptbl\fR(4), \fBrt_dptbl\fR(4), \fBts_dptbl\fR(4), \fBattributes\fR(5), \fBsmf\fR(5), \fBFSS\fR(7) @@ -229,14 +221,10 @@ Possible location for argument to \fB-s\fR option. .LP \fI\fR \fI\fR .SH DIAGNOSTICS -.sp -.LP \fBdispadmin\fR prints an appropriate diagnostic message if it fails to overwrite the current scheduler parameters due to lack of required permissions or a problem with the specified input file. .SH NOTES -.sp -.LP The default scheduling class setting facility is managed by the service management facility, \fBsmf\fR(5), under the service identifier: .sp diff --git a/usr/src/man/man1m/prtvtoc.1m b/usr/src/man/man1m/prtvtoc.1m index 4f883420c1..8b353d750b 100644 --- a/usr/src/man/man1m/prtvtoc.1m +++ b/usr/src/man/man1m/prtvtoc.1m @@ -3,28 +3,23 @@ .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH PRTVTOC 1M "Jul 25, 2002" +.TH PRTVTOC 1M "Apr 14, 2020" .SH NAME prtvtoc \- report information about a disk geometry and partitioning .SH SYNOPSIS -.LP .nf \fBprtvtoc\fR [\fB-fhs\fR] [\fB-t\fR \fIvfstab\fR] [\fB-m\fR \fImnttab\fR] \fIdevice\fR .fi .SH DESCRIPTION -.sp -.LP The \fBprtvtoc\fR command allows the contents of the label to be viewed. The command can be used only by the super-user. .sp .LP The \fIdevice\fR name can be the file name of a raw device in the form of -\fB/dev/rdsk/c?t?d?s2\fR or can be the file name of a block device in the form -of \fB/dev/dsk/c?t?d?s2\fR. +\fB/dev/rdsk/c*t*d*s2\fR or can be the file name of a block device in the form +of \fB/dev/dsk/c*t*d*s2\fR. .SH OPTIONS -.sp -.LP The following options are supported: .sp .ne 2 @@ -75,7 +70,6 @@ Use \fIvfstab\fR as the list of filesystem defaults, in place of .RE .SH EXAMPLES -.LP \fBExample 1 \fRUsing the \fBprtvtoc\fR Command .sp .LP @@ -88,26 +82,25 @@ disk: example# prtvtoc /dev/rdsk/c0t3d0s2 * /dev/rdsk/c0t3d0s2 partition map * -* Dimension: -* 512 bytes/sector -* 80 sectors/track -* 9 tracks/cylinder -* 720 sectors/cylinder -* 2500 cylinders -* 1151 accessible cylinders +* Dimensions: +* 512 bytes/sector +* 80 sectors/track +* 9 tracks/cylinder +* 720 sectors/cylinder +* 2500 cylinders +* 1151 accessible cylinders * * Flags: * 1: unmountable * 10: read-only -* * First Sector Last -* Partition Tag Flags Sector Count Sector Mount Directory - 0 2 00 0 76320 76319 / - 1 3 01 76320 132480 208799 - 2 5 00 0 828720 828719 - 5 6 00 208800 131760 340559 /opt - 6 4 00 340560 447120 787679 /usr - 7 8 00 787680 41040 828719 /export/home -example# +* First Sector Last +* Partition Tag Flags Sector Count Sector Mount Directory + 0 2 00 0 76320 76319 / + 1 3 01 76320 132480 208799 + 2 5 00 0 828720 828719 + 5 6 00 208800 131760 340559 /opt + 6 4 00 340560 447120 787679 /usr + 7 8 00 787680 41040 828719 /export/home .fi .in -2 .sp @@ -133,7 +126,7 @@ BACKUP 0x05 STAND 0x06 VAR 0x07 HOME 0x08 -ALTSCTR 0x09 +ALTSCTR 0x09 CACHE 0x0a RESERVED 0x0b .TE @@ -185,30 +178,26 @@ example# prtvtoc /dev/rdsk/c1t1d0s2 * /dev/rdsk/c1t1d0s2 partition map * * Dimensions: -* 512 bytes/sector -* 3187630080 sectors -* 3187630013 accessible sectors +* 512 bytes/sector +* 3187630080 sectors +* 3187630013 accessible sectors * * Flags: * 1: unmountable * 10: read-only * -* First Sector Last -* Partition Tag Flags Sector Count Sector Mount Directory -0 2 00 34 262144 262177 -1 3 01 262178 262144 524321 -6 4 00 524322 3187089340 3187613661 -8 11 00 3187613662 16384 318763004 +* First Sector Last +* Partition Tag Flags Sector Count Sector Mount Directory + 0 2 00 34 262144 262177 + 1 3 01 262178 262144 524321 + 6 4 00 524322 3187089340 3187613661 + 8 11 00 3187613662 16384 318763004 .fi .in -2 .sp .SH SEE ALSO -.sp -.LP \fBdevinfo\fR(1M), \fBfmthard\fR(1M), \fBformat\fR(1M), \fBmount\fR(1M), \fBattributes\fR(5) .SH WARNINGS -.sp -.LP The \fBmount\fR command does not check the "not mountable" bit. diff --git a/usr/src/man/man2/Makefile b/usr/src/man/man2/Makefile index 556de2d03b..8f664a56fc 100644 --- a/usr/src/man/man2/Makefile +++ b/usr/src/man/man2/Makefile @@ -15,6 +15,7 @@ # Copyright 2013 Nexenta Systems, Inc. All rights reserved. # Copyright (c) 2018, Joyent, Inc. All rights reserved. # Copyright 2017 Peter Tribble +# Copyright 2020 OmniOS Community Edition (OmniOSce) Association. # include $(SRC)/Makefile.master @@ -196,6 +197,7 @@ MANLINKS= _Exit.2 \ fstat.2 \ fstatat.2 \ fstatvfs.2 \ + futimes.2 \ futimesat.2 \ futimens.2 \ getaudit_addr.2 \ @@ -213,6 +215,7 @@ MANLINKS= _Exit.2 \ lchown.2 \ linkat.2 \ lstat.2 \ + lutimes.2 \ mkdirat.2 \ mknodat.2 \ openat.2 \ @@ -396,7 +399,9 @@ umount2.2 := LINKSRC = umount.2 unlinkat.2 := LINKSRC = unlink.2 futimens.2 := LINKSRC = utimes.2 +futimes.2 := LINKSRC = utimes.2 futimesat.2 := LINKSRC = utimes.2 +lutimes.2 := LINKSRC = utimes.2 utimensat.2 := LINKSRC = utimes.2 vforkx.2 := LINKSRC = vfork.2 diff --git a/usr/src/man/man2/utimes.2 b/usr/src/man/man2/utimes.2 index 69eee29879..404fea7180 100644 --- a/usr/src/man/man2/utimes.2 +++ b/usr/src/man/man2/utimes.2 @@ -43,12 +43,12 @@ .\" Portions Copyright (c) 1992, X/Open Company Limited. All Rights Reserved. .\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved. .\" Copyright (c) 2014, Joyent, Inc. +.\" Copyright 2020 OmniOS Community Edition (OmniOSce) Association. .\" -.TH UTIMES 2 "Dec 20, 2014" +.TH UTIMES 2 "Sep 06, 2020" .SH NAME -utimes, futimesat \- set file access and modification times +utimes, lutimes, futimes, futimesat, utimens, utimensat \- set file access and modification times .SH SYNOPSIS -.LP .nf #include <sys/time.h> @@ -57,6 +57,16 @@ utimes, futimesat \- set file access and modification times .LP .nf +\fBint\fR \fBlutimes\fR(\fBconst char *\fR\fIpath\fR, \fBconst struct timeval\fR \fItimes\fR[2]); +.fi + +.LP +.nf +\fBint\fR \fBfutimes\fR(\fBint\fR \fIfildes\fR, \fBconst struct timeval\fR \fItimes\fR[2]); +.fi + +.LP +.nf \fBint\fR \fBfutimesat\fR(\fBint\fR \fIfildes\fR, \fBconst char *\fR\fIpath\fR, \fBconst struct timeval\fR \fItimes\fR[2]); .fi @@ -65,18 +75,27 @@ utimes, futimesat \- set file access and modification times .nf #include <sys/stat.h> -\fBint\fR \fBfutimens\fR(\fBint\fR \fIfiledes\fR, \fBconst timespec_t\fR \fInstimes[2]\fR); +\fBint\fR \fBfutimens\fR(\fBint\fR \fIfildes\fR, \fBconst timespec_t\fR \fInstimes[2]\fR); -\fBint\fR \fButimensat\fR(\fBint\fR \fIfiledes\fR, \fBconst char *\fR\fIpath\fR, +\fBint\fR \fButimensat\fR(\fBint\fR \fIfildes\fR, \fBconst char *\fR\fIpath\fR, \fBconst timespec_t\fR \fInstimes[2]\fR, \fBint\fR \fIflag\fR); .SH DESCRIPTION -.LP The \fButimes()\fR function sets the access and modification times of the file pointed to by the \fIpath\fR argument to the value of the \fItimes\fR argument. It allows time specifications accurate to the microsecond. .sp .LP +The \fBlutimes()\fR function operates like \fButimes()\fR except if \fIpath\fR +points to a symbolic link; in that case \fBlutimes()\fR changes the access and +modifications times of the link, while \fButimes()\fR changes the file that +is referenced by the link. +.sp +.LP +The \fBfutimes()\fR function sets the access and modification times of the +file referenced by the file descriptor \fIfildes\fR. +.sp +.LP The \fBfutimesat()\fR function also sets access and modification times. See \fBfsattr\fR(5). If \fIpath\fR is a relative path name, however, \fBfutimesat()\fR resolves the path relative to the \fIfildes\fR argument @@ -84,7 +103,7 @@ rather than the current working directory. If \fIfildes\fR is set to \fBAT_FDCWD\fR, defined in <\fBfcntl.h\fR>, \fBfutimesat()\fR resolves the path relative to the current working directory. If \fIpath\fR is a null pointer, \fBfutimesat()\fR sets the access and modification times on the file referenced -by \fIfildes\fR. The \fIfildes\fR argument is ignored even when +by \fIfildes\fR. The \fIfildes\fR argument is ignored if \fBfutimesat()\fR is provided with an absolute path. .sp .LP @@ -107,28 +126,28 @@ The \fBfutimens()\fR and \fButimensat()\fR functions also set access and modification times; however, instead of taking \fBstruct timeval\fR, they take \fBtimespec_t\fR which allows for nanosecond granularity. The \fBfutimens()\fR function sets the access and modification times on the file descriptor -referenced by \fIfiledes\fR. +referenced by \fIfildes\fR. .sp .LP The \fButimensat()\fR function determines the file to set the access and -modification times in an similar way to \fBfutemsat()\fR. If the argument -\fIpath\fR is an absolute path, then the argument \fIfiledes\fR is ignored; +modification times in an similar way to \fBfutimesat()\fR. If the argument +\fIpath\fR is an absolute path, then the argument \fIfildes\fR is ignored; otherwise, \fIpath\fR is interpreted as a path relative to the directory -specified by \fIfiledes\fR. If \fIfiledes\fR is set to \fBAT_FDCWD\fR, then +specified by \fIfildes\fR. If \fIfildes\fR is set to \fBAT_FDCWD\fR, then \fIpath\fR is resolved relative to the current working directory. The behavior when encountering symbolic links may be controlled by the value of the \fIflag\fR argument. If the value of flag is the constant \fBAT_SYMLINK_NOFOLLOW\fR, then when a symbolic link is encountered while resolving a path, it will not be followed. Otherwise, the value of \fIflag\fR -should be \fB0\fR. +should be \fB0\fR. Note that, unlike \fBfutimesat()\fR, \fButimensat()\fR +does not accept a null pointer for the \fIpath\fR argument. .SH RETURN VALUES -.LP Upon successful completion, \fB0\fR is returned. Otherwise, \fB\(mi1\fR is returned, \fBerrno\fR is set to indicate the error, and the file times will not be affected. .SH ERRORS -.LP -The \fButimes()\fR, \fBfutimesat()\fR, \fBfutimens()\fR, and \fButimensat()\fR +The \fButimes()\fR, \fBlutimes()\fR, \fBfutimes()\fR, \fBfutimesat()\fR, +\fBfutimens()\fR, and \fButimensat()\fR functions will fail if: .sp .ne 2 @@ -147,9 +166,7 @@ process does not match the owner of the file and write access is denied. \fB\fBEFAULT\fR\fR .ad .RS 16n -The \fIpath\fR or \fItimes\fR argument points to an illegal address. For -\fBfutimesat()\fR, \fIpath\fR might have the value \fINULL\fR if the -\fIfildes\fR argument refers to a valid open file descriptor. +The \fIpath\fR or \fItimes\fR argument points to an illegal address. .RE .sp @@ -159,6 +176,7 @@ The \fIpath\fR or \fItimes\fR argument points to an illegal address. For .ad .RS 16n A signal was caught during the execution of the \fButimes()\fR, +\fBlutimes()\fR, \fBfutimes()\fR, \fBfutimesat()\fR, \fBfutimens()\fR, or \fButimensat()\fR functions. .RE @@ -270,7 +288,6 @@ length exceeds {\fIPATH_MAX\fR}. .RE .SH ATTRIBUTES -.LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp @@ -290,6 +307,5 @@ Standard See below. .LP For \fButimes()\fR, \fButimensat()\fR and \fBfutimensat()\fR, see \fBstandards\fR(5). .SH SEE ALSO -.LP -\fBfutimens\fR(2), \fBstat\fR(2), \fButime\fR(2), \fBattributes\fR(5), +fBstat\fR(2), \fButime\fR(2), \fBattributes\fR(5), \fBfsattr\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3c/getopt_long.3c b/usr/src/man/man3c/getopt_long.3c index adf48e6750..6c59fe3fc7 100644 --- a/usr/src/man/man3c/getopt_long.3c +++ b/usr/src/man/man3c/getopt_long.3c @@ -29,12 +29,14 @@ .\" .\" Copyright 2018 Jason King .\" Copyright 2018, Joyent, Inc. +.\" Copyright 2020 Oxide Computer Company .\" -.Dd July 17, 2018 +.Dd August 10, 2020 .Dt GETOPT_LONG 3C .Os .Sh NAME .Nm getopt_long , +.Nm getopt_long_clip , .Nm getopt_long_only .Nd get long options from command line argument list .Sh SYNOPSIS @@ -72,20 +74,56 @@ The .Fn getopt_long function is similar to .Xr getopt 3C -but it accepts options in two forms: words and characters. -The -.Fn getopt_long -function provides a superset of the functionality of +but it accepts options in two forms: short options and long options. +Short options are the traditional option flags that use a hyphen followed +by a single character. +This is the only form of option that is portable and it is supported by .Xr getopt 3C . +Note, some implementation of +.Xr getopt 3C +do support non-standard extensions for long options; however, these are +not portable and not considered in this manual page. +Common example of short options are: +.Fl a , +.Fl l , +and +.Fl r . +Long options use two hyphen characters are generally full words. +The long versions of the above might be: +.Fl -all , +.Fl -list , +and +.Fl -recursive . +.Pp The .Fn getopt_long -function -can be used in two ways. +function can be used to: +.Bl -enum +.It +Support an option with both short and long forms. +.It +Support an option with only a short form. +.It +Support an option with only a long form. +.El .Pp -In the first way, every long option understood -by the program has a corresponding short option, and the option -structure is only used to translate from long options to short -options. +To have a short option selected, as with +.Xr getopt 3C , +it must be listed in +.Fa optstring . +Long options are instead listed in the +.Fa longopts +array. +For an option to have both a short and long form it must be present in +both +.Fa optstring +and +.Fa longopts . +.Pp +Long options can be handled in two different ways. +In the first way, every long option understood by the program has a +corresponding short option, and the option structure is only used to +translate from long options to short options. When used in this fashion, .Fn getopt_long behaves identically to @@ -125,7 +163,8 @@ and acts similar to .Fa optstring in -.Xr getopt 3C . +.Xr getopt 3C , +listing the set of supported short option flags. In addition, .Fa optstring can begin with @@ -190,7 +229,7 @@ struct option { .Pp The .Fa name -field should contain the option name without the leading double dash. +field should contain the option name without the leading double hyphen. .Pp The .Fa has_arg @@ -281,12 +320,12 @@ is treated the same as .It Long options cannot be abbreviated on the command line. .It -Long options must use a double dash +Long options must use a double hyphen .Pq Ql -- . .It Option processing stops at the first non-option. .It -All long options must have an eqivalent short option (single character) and +All long options must have an equivalent short option (single character) and vice-versa. .It A leading @@ -465,6 +504,22 @@ The correct invocation would be: .Pp .Dl cmd Fl cd Fl e Ar ieio .Sh EXAMPLES +.Sy Example 1 +Basic usage of +.Fn getopt_long . +.Pp +In this example, the short options, +.Fl b +and +.Fl f +are treated the same way as their corresponding long options +.Fl -buffy +and +.Fl -fluoride . +The long option +.Fl -daggerset +is only matched as a long option. +.Pp .Bd -literal -compact int bflag, ch, fd; int daggerset; @@ -500,6 +555,88 @@ while ((ch = getopt_long(argc, argv, "bf:", longopts, NULL)) != -1) { argc -= optind; argv += optind; .Ed +.Pp +.Sy Example 2 +Mixing short-only and long-only options. +.Pp +This example has a program that uses both short and long options and +always causes the option to be handled in a way that is similar to +.Xr getopt 3C +regardless of if it is short or long. +Options that are only long options are assigned a character value that +is outside of the common 8-bit range +.Po +starting at +.Dv USHRT_MAX ++ 1. +.Pc +This allows them to still integrate into a normal +.Xr getopt 3C +style option processing loop. +.Pp +In the following code, +.Fl s +is only usable as a short option while +.Fl -long-only +is only usable as a long option, hence +.Fl s +is only specified in +.Fa optstring +and +.Fl -long-only +is only specified in the +.Fa longopts +.Vt option +array. +.Pp +.Bd -literal -compact +#include <getopt.h> +#include <stdio.h> +#include <limits.h> + +enum longopt_chars { + LONG_ONLY = USHRT_MAX +1 +}; + +static struct option longopts[] = { + { "all", no_argument, NULL, 'a' }, + { "list", no_argument, NULL, 'l' }, + { "long-only", no_argument, NULL, LONG_ONLY }, + { "output", required_argument, NULL, 'o' }, + { NULL } +}; + +int +main(int argc, char *argv[]) +{ + int ch; + + while ((ch = getopt_long(argc, argv, "alo:s", longopts, + NULL)) != -1) { + switch (ch) { + case 'a': + printf("found -a\en"); + break; + case 'l': + printf("found -l\en"); + break; + case 'o': + printf("found -o: %s\en", optarg); + break; + case 's': + printf("found -s\en"); + break; + case LONG_ONLY: + printf("found --long-only\en"); + break; + default: + break; + } + } + + return (0); +} +.Ed .Sh ERRORS The .Fn getopt_long_clip diff --git a/usr/src/man/man3c/printf.3c b/usr/src/man/man3c/printf.3c index c2a9412b37..add9c37bb9 100644 --- a/usr/src/man/man3c/printf.3c +++ b/usr/src/man/man3c/printf.3c @@ -45,11 +45,10 @@ .\" Copyright (c) 2001, The IEEE and The Open Group. All Rights Reserved. .\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved. .\" -.TH PRINTF 3C "Jan 7, 2009" +.TH PRINTF 3C "Aug 19, 2020" .SH NAME printf, fprintf, sprintf, snprintf, asprintf \- print formatted output .SH SYNOPSIS -.LP .nf #include <stdio.h> @@ -82,8 +81,6 @@ printf, fprintf, sprintf, snprintf, asprintf \- print formatted output .fi .SH DESCRIPTION -.sp -.LP The \fBprintf()\fR function places output on the standard output stream \fBstdout\fR. .sp @@ -149,8 +146,6 @@ defined by the program's locale (category \fBLC_NUMERIC\fR). In the POSIX locale, or in a locale where the radix character is not defined, the radix character defaults to a period (\fB\&.\fR). .SS "Conversion Specifications" -.sp -.LP Each conversion specification is introduced by the \fB%\fR character or by the character sequence \fB%\fR\fIn\fR\fB$\fR, after which the following appear in sequence: @@ -264,8 +259,6 @@ used, specifying the \fIN\fRth argument requires that all the leading arguments, from the first to the (\fIN-1\fR)th, are specified in the format string. .SS "Flag Characters" -.sp -.LP The flag characters and their meanings are: .sp .ne 2 @@ -349,8 +342,6 @@ conversions, the behavior is undefined. .RE .SS "Length Modifiers" -.sp -.LP The length modifiers and their meanings are: .sp .ne 2 @@ -461,8 +452,6 @@ double\fR argument. If a length modifier appears with any conversion specifier other than as specified above, the behavior is undefined. .SS "Conversion Specifiers" -.sp -.LP Each conversion specifier results in fetching zero or more arguments. The results are undefined if there are insufficient arguments for the format. If the format is exhausted while arguments remain, the excess arguments are @@ -706,8 +695,11 @@ write only the number of bytes specified by precision; an application that is not standard-conforming will write only the portion of the string that will display in the number of columns of screen display specified by precision. If the precision is not specified, it is taken to be infinite, so all bytes up to -the first null byte are printed. An argument with a null value will yield -undefined results. +the first null byte are printed. An argument with a null value will print +.BR (null) . +Note, while this behavior is common across many operating systems, POSIX does +not guarantee this behavior and portable applications should avoid passing +NULL. .sp If an \fBl\fR (ell) qualifier is present, the argument must be a pointer to an array of type \fBwchar_t\fR. Wide-characters from the array are converted to @@ -745,7 +737,8 @@ the precision is specified, only that portion of the wide-character array that will display in the number of columns of screen display specified by precision will be written. If the precision is not specified, it is taken to be infinite, so all wide characters up to the first null character are printed. An argument -with a null value will yield undefined results. +with a null value will print +.BR (null) . .RE .sp @@ -800,8 +793,6 @@ update between the call to a successful execution of \fBprintf()\fR or \fBfflush\fR(3C) or \fBfclose\fR(3C) on the same stream or a call to \fBexit\fR(3C) or \fBabort\fR(3C). .SH RETURN VALUES -.sp -.LP The \fBprintf()\fR, \fBfprintf()\fR, \fBsprintf()\fR, and \fBasprintf()\fR functions return the number of bytes transmitted (excluding the terminating null byte in the case of \fBsprintf()\fR and \fBasprintf()\fR). @@ -817,8 +808,6 @@ terminating null byte) is returned. .LP Each function returns a negative value if an output error was encountered. .SH ERRORS -.sp -.LP For the conditions under which \fBprintf()\fR and \fBfprintf()\fR will fail and may fail, refer to \fBfputc\fR(3C) or \fBfputwc\fR(3C). .sp @@ -881,14 +870,10 @@ Insufficient storage space is available. .RE .SH USAGE -.sp -.LP If the application calling the \fBprintf()\fR functions has any objects of type \fBwint_t\fR or \fBwchar_t\fR, it must also include the header \fB<wchar.h>\fR to have these objects defined. .SS "Escape Character Sequences" -.sp -.LP It is common to use the following escape sequences built into the C language when entering format strings for the \fBprintf()\fR functions, but these sequences are processed by the C compiler, not by the \fBprintf()\fR function. @@ -983,7 +968,6 @@ number, omit the zero so that the prefix is an 'x' (uppercase 'X' is not allowed in this context). Support for hexadecimal sequences is an ANSI extension. See \fBstandards\fR(5). .SH EXAMPLES -.LP \fBExample 1 \fRTo print the language-independent date and time format, the following statement could be used: .sp @@ -1058,7 +1042,6 @@ printf("pi = %.5f", 4 * atan(1.0)); .in -2 .SS "Default" -.LP \fBExample 4 \fRThe following example applies only to applications that are not standard-conforming. To print a list of names in columns which are 20 characters wide: @@ -1070,8 +1053,6 @@ characters wide: .in -2 .SH ATTRIBUTES -.sp -.LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp @@ -1103,16 +1084,12 @@ See \fBstandards\fR(5) for the standards conformance of \fBprintf()\fR, function is modeled on the one that appears in the FreeBSD, NetBSD, and GNU C libraries. .SH SEE ALSO -.sp -.LP \fBexit\fR(2), \fBlseek\fR(2), \fBwrite\fR(2), \fBabort\fR(3C), \fBecvt\fR(3C), \fBexit\fR(3C), \fBfclose\fR(3C), \fBfflush\fR(3C), \fBfputwc\fR(3C), \fBfree\fR(3C), \fBmalloc\fR(3C), \fBputc\fR(3C), \fBscanf\fR(3C), \fBsetlocale\fR(3C), \fBstdio\fR(3C), \fBvprintf\fR(3C), \fBwcstombs\fR(3C), \fBwctomb\fR(3C), \fBattributes\fR(5), \fBenviron\fR(5), \fBstandards\fR(5) .SH NOTES -.sp -.LP If the \fBj\fR length modifier is used, 32-bit applications that were compiled using \fBc89\fR on releases prior to Solaris 10 will experience undefined behavior. diff --git a/usr/src/man/man3head/Makefile b/usr/src/man/man3head/Makefile index fdc94ef4ef..8e1e75e6fb 100644 --- a/usr/src/man/man3head/Makefile +++ b/usr/src/man/man3head/Makefile @@ -13,6 +13,7 @@ # Copyright 2011, Richard Lowe # Copyright 2013 Nexenta Systems, Inc. All rights reserved. # Copyright 2014 Garrett D'Amore <garrett@damore.org> +# Copyright 2020 OmniOS Community Edition (OmniOSce) Association. # include $(SRC)/Makefile.master @@ -93,6 +94,7 @@ MANFILES= acct.h.3head \ time.h.3head \ timeb.h.3head \ times.h.3head \ + timespec.3head \ types.h.3head \ types32.h.3head \ uchar.h.3head \ @@ -273,6 +275,9 @@ MANLINKS += acct.3head \ time.3head \ timeb.3head \ times.3head \ + timeval.3head \ + TIMEVAL_TO_TIMESPEC.3head \ + TIMESPEC_TO_TIMEVAL.3head \ types.3head \ types32.3head \ ucontext.3head \ @@ -451,6 +456,10 @@ tgmath.3head := LINKSRC = tgmath.h.3head time.3head := LINKSRC = time.h.3head timeb.3head := LINKSRC = timeb.h.3head times.3head := LINKSRC = times.h.3head +timespec.3head := LINKSRC = time.h.3head +timeval.3head := LINKSRC = timespec.3head +TIMEVAL_TO_TIMESPEC.3head := LINKSRC = timespec.3head +TIMESPEC_TO_TIMEVAL.3head := LINKSRC = timespec.3head types.3head := LINKSRC = types.h.3head types32.3head := LINKSRC = types32.h.3head ucontext.3head := LINKSRC = ucontext.h.3head diff --git a/usr/src/man/man3head/timespec.3head b/usr/src/man/man3head/timespec.3head new file mode 100644 index 0000000000..54aaab14f5 --- /dev/null +++ b/usr/src/man/man3head/timespec.3head @@ -0,0 +1,106 @@ +.\" +.\" This file and its contents are supplied under the terms of the +.\" Common Development and Distribution License ("CDDL"), version 1.0. +.\" You may only use this file in accordance with the terms of version +.\" 1.0 of the CDDL. +.\" +.\" A full copy of the text of the CDDL should have accompanied this +.\" source. A copy of the CDDL is also available via the Internet at +.\" http://www.illumos.org/license/CDDL. +.\" +.\" +.\" Copyright 2020 OmniOS Community Edition (OmniOSce) Association. +.\" +.Dd Sep 06, 2020 +.Dt timespec 3HEAD +.Os +.Sh NAME +.Nm timespec , +.Nm timeval , +.Nm TIMESPEC_TO_TIMEVAL , +.Nm TIMEVAL_TO_TIMESPEC +.Nd time structures and conversion +.Sh SYNOPSIS +.In sys/time.h +.Ft void +.Fo TIMESPEC_TO_TIMEVAL +.Fa "struct timeval *tv" +.Fa "const struct timespec *ts" +.Fc +.Ft void +.Fo TIMEVAL_TO_TIMESPEC +.Fa "const struct timeval *tv" +.Fa "struct timespec *ts" +.Fc +.Sh DESCRIPTION +The +.Vt timeval +and +.Vt timespec +structures are declared in the +.In time.h +and +.In sys/time.h +headers respectively: +.Bd -literal -offset indent +typedef struct timespec { + time_t tv_sec; /* seconds */ + long tv_nsec; /* and nanoseconds */ +} timespec_t; + +struct timeval { + time_t tv_sec; /* seconds */ + suseconds_t tv_usec; /* and microseconds */ +}; +.Ed +.Pp +In both cases, the +.Fa tv_sec +member represents elapsed time in whole seconds. +The +.Fa tv_nsec +and +.Fa tv_usec +members represent the rest of the elapsed time in nanoseconds and +microseconds respectively, depending on the structure. +.Pp +The +.Dv TIMEVAL_TO_TIMESPEC +macro can be used to convert a +.Vt struct timeval +structure to a +.Vt struct timespec +structure, while the +.Dv TIMESPEC_TO_TIMEVAL +macro works in the opposite direction. +.Pp +When converting from a +.Vt struct timespec +to a +.Vt struct timeval +structure, the +.Fa tv_nsec +member is truncated, losing precision. +When converting from a +.Vt struct timeval +to a +.Vt struct timespec +structure, the +.Fa tv_usec +member is multiplied by 1000 to reach the precision of the target +structure. +The +.Fa tv_sec +member is always preserved, no matter which conversion is performed. +.Pp +Note that the +.Dv TIMEVAL_TO_TIMESPEC +and +.Dv TIMESPEC_TO_TIMEVAL +macros are non-standard but are commonly found on UNIX and UNIX-like systems. +.Sh INTERFACE STABILITY +.Sy Committed +.Sh MT-LEVEL +.Sy MT-Safe +.Sh SEE ALSO +.Xr time.h 3HEAD diff --git a/usr/src/man/man3lib/libc.3lib b/usr/src/man/man3lib/libc.3lib index 83df10408b..9bdf613acf 100644 --- a/usr/src/man/man3lib/libc.3lib +++ b/usr/src/man/man3lib/libc.3lib @@ -7,7 +7,7 @@ .\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with .\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] .\" Copyright 2011 by Delphix. All rights reserved. -.TH LIBC 3LIB "Feb 14, 2020" +.TH LIBC 3LIB "Sep 06, 2020" .SH NAME libc \- C library .SH DESCRIPTION @@ -261,130 +261,131 @@ l l . \fBftok\fR \fBftruncate\fR \fBftrylockfile\fR \fBftw\fR \fBfunc_to_decimal\fR \fBfunlockfile\fR -\fBfutimens\fR \fBfutimesat\fR -\fBfwide\fR \fBfwprintf\fR -\fBfwrite\fR \fBfwscanf\fR -\fBgconvert\fR \fBgcvt\fR -\fBgetacct\fR \fBgetattrat\fR -\fBgetc\fR \fBgetc_unlocked\fR -\fBgetchar\fR \fBgetchar_unlocked\fR -\fBgetcontext\fR \fBgetcpuid\fR -\fBgetcwd\fR \fBgetdate\fR -\fBgetdate_err\fR \fBgetdents\fR -\fBgetdtablesize\fR \fBgetegid\fR -\fBgetenv\fR \fBgeteuid\fR -\fBgetexecname\fR \fBgetextmntent\fR -\fBgetgid\fR \fBgetgrent\fR -\fBgetgrent_r\fR \fBgetgrgid\fR -\fBgetgrgid_r\fR \fBgetgrnam\fR -\fBgetgrnam_r\fR \fBgetgroups\fR -\fBgethomelgroup\fR \fBgethostid\fR -\fBgethostname\fR \fBgethrtime\fR -\fBgethrvtime\fR \fBgetisax\fR -\fBgetitimer\fR \fBgetloadavg\fR -\fBgetlogin\fR \fBgetlogin_r\fR -\fBgetmntany\fR \fBgetmntent\fR -\fBgetmsg\fR \fBget_nprocs\fR -\fBget_nprocs_conf\fR \fBgetnetgrent\fR -\fBgetnetgrent_r\fR \fBgetopt\fR -\fBgetopt_clip\fR \fBgetopt_long\fR -\fBgetopt_long_only\fR \fBgetpagesize\fR -\fBgetpagesizes\fR \fBgetpass\fR -\fBgetpassphrase\fR \fBgetpeerucred\fR -\fBgetpflags\fR \fBgetpgid\fR -\fBgetpgrp\fR \fBgetpid\fR -\fBgetpmsg\fR \fBgetppid\fR -\fBgetppriv\fR \fBgetpriority\fR -\fBgetprogname\fR \fBgetprojid\fR -\fBgetpw\fR \fBgetpwent\fR -\fBgetpwent_r\fR \fBgetpwnam\fR -\fBgetpwnam_r\fR \fBgetpwuid\fR -\fBgetpwuid_r\fR \fBgetrctl\fR -\fBgetrlimit\fR \fBgetrusage\fR -\fBgets\fR \fBgetsid\fR -\fBgetspent\fR \fBgetspent_r\fR -\fBgetspnam\fR \fBgetspnam_r\fR -\fBgetsubopt\fR \fBgettaskid\fR -\fBgettext\fR \fBgettimeofday\fR -\fBgettxt\fR \fBgetuid\fR -\fBgetusershell\fR \fBgetustack\fR -\fBgetutent\fR \fBgetutid\fR -\fBgetutline\fR \fBgetutmp\fR -\fBgetutmpx\fR \fBgetutxent\fR -\fBgetutxid\fR \fBgetutxline\fR -\fBgetvfsany\fR \fBgetvfsent\fR -\fBgetvfsfile\fR \fBgetvfsspec\fR -\fBgetw\fR \fBgetwc\fR -\fBgetwc_l\fR \fBgetwchar\fR -\fBgetwchar_l\fR \fBgetwd\fR -\fBgetwidth\fR \fBgetws\fR -\fBgetzoneid\fR \fBgetzoneidbyname\fR -\fBgetzonenamebyid\fR \fBglob\fR -\fBglobfree\fR \fBgmtime\fR -\fBgmtime_r\fR \fBgrantpt\fR -\fBgsignal\fR \fBhasmntopt\fR -\fBhcreate\fR \fBhdestroy\fR -\fBhsearch\fR \fBiconv\fR -\fBiconv_close\fR \fBiconv_open\fR -\fBimaxabs\fR \fBimaxdiv\fR -\fBindex\fR \fBinitgroups\fR -\fBinitstate\fR \fBinnetgr\fR -\fBinsque\fR \fBioctl\fR -\fBis_system_labeled\fR \fBisaexec\fR -\fBisalnum\fR \fBisalnum_l\fR -\fBisalpha\fR \fBisalpha_l\fR -\fBisascii\fR \fBisastream\fR -\fBisatty\fR \fBisblank\fR -\fBisblank_l\fR \fBiscntrl\fR -\fBiscntrl_l\fR \fBisdigit\fR -\fBisdigit_l\fR \fBisenglish\fR -\fBisgraph\fR \fBisgraph_l\fR -\fBisideogram\fR \fBislower\fR -\fBislower_l\fR \fBisnan\fR -\fBisnand\fR \fBisnanf\fR -\fBisnumber\fR \fBisphonogram\fR -\fBisprint\fR \fBisprint_l\fR -\fBispunct\fR \fBispunct_l\fR -\fBissetugid\fR \fBisspace\fR -\fBisspace_l\fR \fBisspecial\fR -\fBisupper\fR \fBisupper_l\fR -\fBiswalnum\fR \fBiswalnum_l\fR -\fBiswalpha\fR \fBiswalpha_l\fR -\fBiswblank\fR \fBiswblank_l\fR -\fBiswcntrl\fR \fBiswcntrl_l\fR -\fBiswctype\fR \fBiswctype_l\fR -\fBiswdigit\fR \fBiswdigit_l\fR -\fBiswideogram\fR \fBiswideogram_l\fR -\fBiswgraph\fR \fBiswgraph_l\fR -\fBiswhexnumber\fR \fBiswhexnumber_l\fR -\fBiswlower\fR \fBiswlower_l\fR -\fBiswnumber\fR \fBiswnumber_l\fR -\fBiswphonogram\fR \fBiswphonogram_l\fR -\fBiswprint\fR \fBiswprint_l\fR -\fBiswpunct\fR \fBiswpunct_l\fR -\fBiswspace\fR \fBiswspace_l\fR -\fBiswspecial\fR \fBiswspecial_l\fR -\fBiswupper\fR \fBiswupper_l\fR -\fBiswxdigit\fR \fBiswxdigit_l\fR -\fBisxdigit\fR \fBisxdigit_l\fR -\fBjrand48\fR \fBkill\fR -\fBkillpg\fR \fBl64a\fR -\fBlabs\fR \fBladd\fR -\fBlchown\fR \fBlckpwdf\fR -\fBlcong48\fR \fBldexp\fR -\fBldivide\fR \fBlexp10\fR -\fBlfind\fR \fBlfmt\fR -\fBlink\fR \fBlinkat\fR -\fBlio_listio\fR \fBllabs\fR -\fBlldiv\fR \fBllog10\fR -\fBllseek\fR \fBlltostr\fR -\fBlocaleconv\fR \fBlocaltime\fR -\fBlocaltime_r\fR \fBlockf\fR -\fBlogb\fR \fBlone\fR -\fBlongjmp\fR \fBlrand48\fR -\fBlsearch\fR \fBlseek\fR -\fBlshiftl\fR \fBlstat\fR -\fBlsub\fR \fBlten\fR +\fBfutimens\fR \fBfutimes\fR +\fBfutimesat\fR \fBfwide\fR +\fBfwprintf\fR \fBfwrite\fR +\fBfwscanf\fR \fBgconvert\fR +\fBgcvt\fR \fBgetacct\fR +\fBgetattrat\fR \fBgetc\fR +\fBgetc_unlocked\fR \fBgetchar\fR +\fBgetchar_unlocked\fR \fBgetcontext\fR +\fBgetcpuid\fR \fBgetcwd\fR +\fBgetdate\fR \fBgetdate_err\fR +\fBgetdents\fR \fBgetdtablesize\fR +\fBgetegid\fR \fBgetenv\fR +\fBgeteuid\fR \fBgetexecname\fR +\fBgetextmntent\fR \fBgetgid\fR +\fBgetgrent\fR \fBgetgrent_r\fR +\fBgetgrgid\fR \fBgetgrgid_r\fR +\fBgetgrnam\fR \fBgetgrnam_r\fR +\fBgetgroups\fR \fBgethomelgroup\fR +\fBgethostid\fR \fBgethostname\fR +\fBgethrtime\fR \fBgethrvtime\fR +\fBgetisax\fR \fBgetitimer\fR +\fBgetloadavg\fR \fBgetlogin\fR +\fBgetlogin_r\fR \fBgetmntany\fR +\fBgetmntent\fR \fBgetmsg\fR +\fBget_nprocs\fR \fBget_nprocs_conf\fR +\fBgetnetgrent\fR \fBgetnetgrent_r\fR +\fBgetopt\fR \fBgetopt_clip\fR +\fBgetopt_long\fR \fBgetopt_long_only\fR +\fBgetpagesize\fR \fBgetpagesizes\fR +\fBgetpass\fR \fBgetpassphrase\fR +\fBgetpeerucred\fR \fBgetpflags\fR +\fBgetpgid\fR \fBgetpgrp\fR +\fBgetpid\fR \fBgetpmsg\fR +\fBgetppid\fR \fBgetppriv\fR +\fBgetpriority\fR \fBgetprogname\fR +\fBgetprojid\fR \fBgetpw\fR +\fBgetpwent\fR \fBgetpwent_r\fR +\fBgetpwnam\fR \fBgetpwnam_r\fR +\fBgetpwuid\fR \fBgetpwuid_r\fR +\fBgetrctl\fR \fBgetrlimit\fR +\fBgetrusage\fR \fBgets\fR +\fBgetsid\fR \fBgetspent\fR +\fBgetspent_r\fR \fBgetspnam\fR +\fBgetspnam_r\fR \fBgetsubopt\fR +\fBgettaskid\fR \fBgettext\fR +\fBgettimeofday\fR \fBgettxt\fR +\fBgetuid\fR \fBgetusershell\fR +\fBgetustack\fR \fBgetutent\fR +\fBgetutid\fR \fBgetutline\fR +\fBgetutmp\fR \fBgetutmpx\fR +\fBgetutxent\fR \fBgetutxid\fR +\fBgetutxline\fR \fBgetvfsany\fR +\fBgetvfsent\fR \fBgetvfsfile\fR +\fBgetvfsspec\fR \fBgetw\fR +\fBgetwc\fR \fBgetwc_l\fR +\fBgetwchar\fR \fBgetwchar_l\fR +\fBgetwd\fR \fBgetwidth\fR +\fBgetws\fR \fBgetzoneid\fR +\fBgetzoneidbyname\fR \fBgetzonenamebyid\fR +\fBglob\fR \fBglobfree\fR +\fBgmtime\fR \fBgmtime_r\fR +\fBgrantpt\fR \fBgsignal\fR +\fBhasmntopt\fR \fBhcreate\fR +\fBhdestroy\fR \fBhsearch\fR +\fBiconv\fR \fBiconv_close\fR +\fBiconv_open\fR \fBimaxabs\fR +\fBimaxdiv\fR \fBindex\fR +\fBinitgroups\fR \fBinitstate\fR +\fBinnetgr\fR \fBinsque\fR +\fBioctl\fR \fBis_system_labeled\fR +\fBisaexec\fR \fBisalnum\fR +\fBisalnum_l\fR \fBisalpha\fR +\fBisalpha_l\fR \fBisascii\fR +\fBisastream\fR \fBisatty\fR +\fBisblank\fR \fBisblank_l\fR +\fBiscntrl\fR \fBiscntrl_l\fR +\fBisdigit\fR \fBisdigit_l\fR +\fBisenglish\fR \fBisgraph\fR +\fBisgraph_l\fR \fBisideogram\fR +\fBislower\fR \fBislower_l\fR +\fBisnan\fR \fBisnand\fR +\fBisnanf\fR \fBisnumber\fR +\fBisphonogram\fR \fBisprint\fR +\fBisprint_l\fR \fBispunct\fR +\fBispunct_l\fR \fBissetugid\fR +\fBisspace\fR \fBisspace_l\fR +\fBisspecial\fR \fBisupper\fR +\fBisupper_l\fR \fBiswalnum\fR +\fBiswalnum_l\fR \fBiswalpha\fR +\fBiswalpha_l\fR \fBiswblank\fR +\fBiswblank_l\fR \fBiswcntrl\fR +\fBiswcntrl_l\fR \fBiswctype\fR +\fBiswctype_l\fR \fBiswdigit\fR +\fBiswdigit_l\fR \fBiswideogram\fR +\fBiswideogram_l\fR \fBiswgraph\fR +\fBiswgraph_l\fR \fBiswhexnumber\fR +\fBiswhexnumber_l\fR \fBiswlower\fR +\fBiswlower_l\fR \fBiswnumber\fR +\fBiswnumber_l\fR \fBiswphonogram\fR +\fBiswphonogram_l\fR \fBiswprint\fR +\fBiswprint_l\fR \fBiswpunct\fR +\fBiswpunct_l\fR \fBiswspace\fR +\fBiswspace_l\fR \fBiswspecial\fR +\fBiswspecial_l\fR \fBiswupper\fR +\fBiswupper_l\fR \fBiswxdigit\fR +\fBiswxdigit_l\fR \fBisxdigit\fR +\fBisxdigit_l\fR \fBjrand48\fR +\fBkill\fR \fBkillpg\fR +\fBl64a\fR \fBlabs\fR +\fBladd\fR \fBlchown\fR +\fBlckpwdf\fR \fBlcong48\fR +\fBldexp\fR \fBldivide\fR +\fBlexp10\fR \fBlfind\fR +\fBlfmt\fR \fBlink\fR +\fBlinkat\fR \fBlio_listio\fR +\fBllabs\fR \fBlldiv\fR +\fBllog10\fR \fBllseek\fR +\fBlltostr\fR \fBlocaleconv\fR +\fBlocaltime\fR \fBlocaltime_r\fR +\fBlockf\fR \fBlogb\fR +\fBlone\fR \fBlongjmp\fR +\fBlrand48\fR \fBlsearch\fR +\fBlseek\fR \fBlshiftl\fR +\fBlstat\fR \fBlsub\fR +\fBlten\fR \fBlutimes\fR \fBlzero\fR \fBmadvise\fR \fBmakecontext\fR \fBmakeutx\fR \fBmalloc\fR \fBmblen\fR diff --git a/usr/src/man/man3nsl/getipsecprotobyname.3nsl b/usr/src/man/man3nsl/getipsecprotobyname.3nsl index 41a8a09310..fe636c4fd6 100644 --- a/usr/src/man/man3nsl/getipsecprotobyname.3nsl +++ b/usr/src/man/man3nsl/getipsecprotobyname.3nsl @@ -1,30 +1,27 @@ '\" te .\" Copyright (C) 2003, Sun Microsystems, Inc. All Rights Reserved +.\" Copyright (C) 2020, Sergio Aguayo. All Rights Reserved .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH GETIPSECPROTOBYNAME 3NSL "Aug 13, 2003" +.TH GETIPSECPROTOBYNAME 3NSL "Aug 27, 2020" .SH NAME getipsecprotobyname, getipsecprotobynum \- query IPsec protocols entries .SH SYNOPSIS -.LP .nf \fBcc \fR\fB-flag \&.\|.\|.\fR \fIfile \fR\&.\|.\|.\fB-l\fRnsl [\fB -library \&.\|.\|. \fR] #include <netdb.h> - -\fBint\fR \fBgetipsecprotobyname\fR(\fBconst char *\fR\fIproto_name\fR +\fBint\fR \fBgetipsecprotobyname\fR(\fBconst char *\fR\fIproto_name\fR); .fi .LP .nf -\fBchar *\fR\fBgetipsecprotobynum\fR(\fBint\fR \fIproto_num\fRp +\fBchar *\fR\fBgetipsecprotobynum\fR(\fBint\fR \fIproto_num\fR); .fi .SH DESCRIPTION -.sp -.LP Use the \fBgetipsecprotobyname()\fR and \fBgetipsecprotobynum()\fR functions to obtain the IPsec algorithm mappings that are defined by \fBipsecalgs\fR(1M). You can also use the \fBgetipsecprotobyname()\fR and \fBgetipsecprotobynum()\fR @@ -66,7 +63,6 @@ provide authentication. .RE .SH PARAMETERS -.sp .ne 2 .na \fB\fIproto_name\fR\fR @@ -81,12 +77,10 @@ A pointer to the name of an IPsec protocol. \fB\fIproto_num\fR\fR .ad .RS 14n -A pointer to a protocol number. conditions. +A pointer to a protocol number. .RE .SH RETURN VALUES -.sp -.LP The \fBgetipsecprotobyname()\fR function returns a protocol number upon success, or \fB-1\fR if the protocol specified does not exist. .sp @@ -94,12 +88,8 @@ success, or \fB-1\fR if the protocol specified does not exist. The \fBgetipsecprotobynum()\fR function returns a protocol name upon success, or the \fINULL\fR value if the protocol number specified does not exist. .SH ATTRIBUTES -.sp -.LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp - -.sp .TS box; c | c @@ -111,8 +101,6 @@ Interface Stability Evolving .TE .SH SEE ALSO -.sp -.LP \fBipsecalgs\fR(1M), \fBgetipsecalgbyname\fR(3NSL), \fBgetipsecalgbyname\fR(3NSL), \fBattributes\fR(5) .sp diff --git a/usr/src/man/man4/fx_dptbl.4 b/usr/src/man/man4/fx_dptbl.4 index 4373e7705c..ce2ad1bc3f 100644 --- a/usr/src/man/man4/fx_dptbl.4 +++ b/usr/src/man/man4/fx_dptbl.4 @@ -7,14 +7,11 @@ .SH NAME fx_dptbl \- fixed priority dispatcher parameter table .SH SYNOPSIS -.LP .nf \fBfx_dptbl\fR .fi .SH DESCRIPTION -.sp -.LP The process scheduler or dispatcher is the portion of the kernel that controls allocation of the CPU to processes. The scheduler supports the notion of scheduling classes, where each class defines a scheduling policy used to @@ -67,9 +64,11 @@ processes at a particular level, as the time quantum of a fixed priority process can be changed by the user with the \fBpriocntl\fR(1) command or the \fBpriocntl\fR(2) system call. .sp -In the high resolution clock mode (\fBhires_tick\fR set to \fB1\fR), the value -of \fBhz\fR is set to \fB1000\fR. Increase quantums to maintain the same -absolute time quantums. +In the default high resolution clock mode (\fBhires_tick\fR set to \fB1\fR), +the value of \fBhz\fR is set to \fB1000\fR. If this value is overridden to +\fB0\fR then \fBhz\fR will instead be \fB100\fR; the number of ticks per +quantum must then be decreased to maintain the same length of quantum in +absolute time. .sp An administrator can affect the behavior of the fixed priority portion of the scheduler by reconfiguring the \fBfx_dptbl\fR. There are two methods available @@ -78,8 +77,6 @@ for doing this: reconfigure with a loadable module at boot-time or by using .RE .SS "fx_dptbl Loadable Module" -.sp -.LP The \fBfx_dptbl\fR can be reconfigured with a loadable module that contains a new fixed priority dispatch table. The module containing the dispatch table is separate from the \fBFX\fR loadable module, which contains the rest of the @@ -88,8 +85,6 @@ number of fixed priority priority levels or the set of global scheduling priorities used by the fixed priority class. The relevant procedure and source code is described in Replacing the fx_dptbl Loadable Module below. .SS "dispadmin Configuration File" -.sp -.LP The \fBfx_quantum\fR values in the \fBfx_dptbl\fR can be examined and modified on a running system using the \fBdispadmin\fR(1M) command. Invoking \fBdispadmin\fR for the fixed-priority class allows the administrator to @@ -141,8 +136,6 @@ positive integer specifying the desired time quantum in the resolution given by See Examples for an example of an excerpt of a \fBdispadmin\fR configuration file. .SS "Replacing the fx_dptbl Loadable Module" -.sp -.LP To change the size of the fixed priority dispatch table, you must build the loadable module that contains the dispatch table information. Save the existing module before using the following procedure. @@ -202,7 +195,6 @@ Reboot the system to use the new dispatch table. Exercise great care in using the preceding method to replace the dispatch table. A mistake can result in panics, thus making the system unusable. .SH EXAMPLES -.LP \fBExample 1 \fRConfiguration File Excerpt .sp .LP @@ -395,15 +387,11 @@ fx_getmaxumdpri() .sp .SH SEE ALSO -.sp -.LP \fBpriocntl\fR(1), \fBdispadmin\fR(1M), \fBpriocntl\fR(2), \fBsystem\fR(4) .sp .LP \fISystem Administration Guide, Volume 1, System Interface Guide\fR .SH NOTES -.sp -.LP In order to improve performance under heavy system load, both the \fBnfsd\fR daemon and the \fBlockd\fR daemon utilize the maximum priority in the \fBFX\fR class. Unusual \fBfx_dptbl\fR configurations may have significant negative diff --git a/usr/src/man/man4/rt_dptbl.4 b/usr/src/man/man4/rt_dptbl.4 index b24b3d72f4..bace4ec80b 100644 --- a/usr/src/man/man4/rt_dptbl.4 +++ b/usr/src/man/man4/rt_dptbl.4 @@ -7,8 +7,6 @@ .SH NAME rt_dptbl \- real-time dispatcher parameter table .SH DESCRIPTION -.sp -.LP The process scheduler (or dispatcher) is the portion of the kernel that controls allocation of the \fBCPU\fR to processes. The scheduler supports the notion of scheduling classes where each class defines a scheduling policy, used @@ -59,9 +57,11 @@ processes at a particular level as the time quantum of a real-time process can be changed by the user with the \fBpriocntl\fR command or the \fBpriocntl\fR system call. .sp -In the high resolution clock mode (\fBhires_tick\fR set to \fB1\fR), the value -of \fBhz\fR is set to \fB1000\fR. Increase quantums to maintain the same -absolute time quantums. +In the default high resolution clock mode (\fBhires_tick\fR set to \fB1\fR), +the value of \fBhz\fR is set to \fB1000\fR. If this value is overridden to +\fB0\fR then \fBhz\fR will instead be \fB100\fR; the number of ticks per +quantum must then be decreased to maintain the same length of quantum in +absolute time. .RE .sp @@ -71,8 +71,6 @@ scheduler by reconfiguring the \fBrt_dptbl\fR. There are two methods available for doing this: reconfigure with a loadable module at boot-time or by using \fBdispadmin\fR(1M) at run-time. .SS "rt_dptbl Loadable Module" -.sp -.LP The \fBrt_dptbl\fR can be reconfigured with a loadable module which contains a new real time dispatch table. The module containing the dispatch table is separate from the RT loadable module which contains the rest of the real time @@ -81,8 +79,6 @@ time priority levels or the set of global scheduling priorities used by the real time class. The relevant procedure and source code is described in the Examples section. .SS "dispadmin Configuration File" -.sp -.LP The \fBrt_quantum\fR values in the \fBrt_dptbl\fR can be examined and modified on a running system using the \fBdispadmin\fR(1M) command. Invoking \fBdispadmin\fR for the real-time class allows the administrator to retrieve @@ -120,7 +116,6 @@ level. Each \fBrt_quantum\fR entry must be either a positive integer specifying the desired time quantum (in the resolution given by \fIres\fR), or the value -2 indicating an infinite time quantum for that level. .SH EXAMPLES -.LP \fBExample 1 \fRA Sample \fBdispadmin\fR Configuration File .sp .LP @@ -341,8 +336,6 @@ rtdpent_t config_rt_dptbl[] = { .in -2 .SH SEE ALSO -.sp -.LP \fBpriocntl\fR(1), \fBdispadmin\fR(1M), \fBpriocntl\fR(2), \fBsystem\fR(4) .sp .LP diff --git a/usr/src/man/man4/ts_dptbl.4 b/usr/src/man/man4/ts_dptbl.4 index f6e7db3482..9dbcc11d15 100644 --- a/usr/src/man/man4/ts_dptbl.4 +++ b/usr/src/man/man4/ts_dptbl.4 @@ -7,8 +7,6 @@ .SH NAME ts_dptbl \- time-sharing dispatcher parameter table .SH DESCRIPTION -.sp -.LP The process scheduler (or dispatcher) is the portion of the kernel that controls allocation of the \fBCPU\fR to processes. The scheduler supports the notion of scheduling classes where each class defines a scheduling policy, used @@ -65,9 +63,11 @@ only member of the \fBts_dptbl\fR which cannot be changed with The length of the time quantum allocated to processes at this level in ticks (\fBhz\fR). .sp -In the high resolution clock mode (\fBhires_tick\fR set to \fB1\fR), the value -of \fBhz\fR is set to \fB1000\fR. Increase quantums to maintain the same -absolute time quantums. +In the default high resolution clock mode (\fBhires_tick\fR set to \fB1\fR), +the value of \fBhz\fR is set to \fB1000\fR. If this value is overridden to +\fB0\fR then \fBhz\fR will instead be \fB100\fR; the number of ticks per +quantum must then be decreased to maintain the same length of quantum in +absolute time. .RE .sp @@ -129,8 +129,6 @@ scheduling classes. There are two methods available for doing this: reconfigure with a loadable module at boot-time or by using \fBdispadmin\fR(1M) at run-time. .SS "ts_dptbl Loadable Module" -.sp -.LP The \fBts_dptbl\fR can be reconfigured with a loadable module which contains a new time sharing dispatch table. The module containing the dispatch table is separate from the TS loadable module which contains the rest of the @@ -140,8 +138,6 @@ scheduling priorities used by the time-sharing and inter-active classes. The relevant procedure and source code is described in the \fBREPLACING THE TS_DPTBL LOADABLE MODULE\fR section. .SS "dispadmin Configuration File" -.sp -.LP With the exception of \fBts_globpri\fR all of the members of the \fBts_dptbl\fR can be examined and modified on a running system using the \fBdispadmin\fR(1M) command. Invoking \fBdispadmin\fR for the time-sharing or inter-active class @@ -177,7 +173,6 @@ parameters for time-sharing level 0, the second line specifies the parameters for time-sharing level 1, etc. There must be exactly one line for each configured time-sharing priority level. .SH EXAMPLES -.LP \fBExample 1 \fRA Sample From a Configuration File .sp .LP @@ -435,8 +430,6 @@ ts_getmaxumdpri() .in -2 .SH SEE ALSO -.sp -.LP \fBpriocntl\fR(1), \fBdispadmin\fR(1M), \fBpriocntl\fR(2), \fBsystem\fR(4) .sp .LP @@ -445,8 +438,6 @@ ts_getmaxumdpri() .LP \fIProgramming Interfaces Guide\fR .SH NOTES -.sp -.LP \fBdispadmin\fR does some limited sanity checking on the values supplied in the configuration file. The sanity checking is intended to ensure that the new \fBts_dptbl\fR values do not cause the system to panic. The sanity checking diff --git a/usr/src/man/man7d/mlxcx.7d b/usr/src/man/man7d/mlxcx.7d index d7b0cf8ad9..ccbc257641 100644 --- a/usr/src/man/man7d/mlxcx.7d +++ b/usr/src/man/man7d/mlxcx.7d @@ -11,7 +11,7 @@ .\" .\" Copyright 2020 the University of Queensland .\" -.Dd April 9, 2020 +.Dd August 27, 2020 .Dt MLXCX 7D .Os .Sh NAME @@ -44,6 +44,8 @@ Promiscuous access via LED control .It Transceiver information +.It +Internal temperature sensors .El .Pp At this time, the driver does not support Large Send Offload (LSO), energy diff --git a/usr/src/man/man9f/Makefile b/usr/src/man/man9f/Makefile index 82b64823b1..a61f028374 100644 --- a/usr/src/man/man9f/Makefile +++ b/usr/src/man/man9f/Makefile @@ -13,7 +13,7 @@ # Copyright 2017, Richard Lowe # Copyright 2014 Garrett D'Amore <garrett@damore> # Copyright 2019 Joyent, Inc. -# Copyright 2016 Nexenta Systems, Inc. +# Copyright 2020 Nexenta by DDN, Inc. All rights reserved. # Copyright 2016 Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org> # @@ -70,6 +70,7 @@ MANFILES= ASSERT.9f \ copyin.9f \ copymsg.9f \ copyout.9f \ + credentials.9f \ csx_AccessConfigurationRegister.9f \ csx_CS_DDI_Info.9f \ csx_ConvertSize.9f \ @@ -556,6 +557,7 @@ MANFILES= ASSERT.9f \ MANLINKS= AVL_NEXT.9f \ AVL_PREV.9f \ + CRED.9f \ SIZEOF_PTR.9f \ SIZEOF_STRUCT.9f \ STRUCT_BUF.9f \ @@ -690,6 +692,9 @@ MANLINKS= AVL_NEXT.9f \ avl_remove.9f \ avl_swap.9f \ bcanputnext.9f \ + crdup.9f \ + crfree.9f \ + crget.9f \ crgetgid.9f \ crgetgroups.9f \ crgetngroups.9f \ @@ -699,6 +704,7 @@ MANLINKS= AVL_NEXT.9f \ crgetsuid.9f \ crgetuid.9f \ crgetzoneid.9f \ + crhold.9f \ csx_Get16.9f \ csx_Get32.9f \ csx_Get64.9f \ @@ -971,6 +977,7 @@ MANLINKS= AVL_NEXT.9f \ inl.9f \ intro.9f \ inw.9f \ + kcred.9f \ kmem_cache_alloc.9f \ kmem_cache_destroy.9f \ kmem_cache_free.9f \ @@ -1312,7 +1319,8 @@ MANLINKS= AVL_NEXT.9f \ vsprintf.9f \ vzcmn_err.9f \ wr.9f \ - zcmn_err.9f + zcmn_err.9f \ + zone_kcred.9f assert.9f := LINKSRC = ASSERT.9f @@ -1485,6 +1493,14 @@ cv_timedwait_sig.9f := LINKSRC = condvar.9f cv_wait.9f := LINKSRC = condvar.9f cv_wait_sig.9f := LINKSRC = condvar.9f +CRED.9f := LINKSRC = credentials.9f +crdup.9f := LINKSRC = credentials.9f +crfree.9f := LINKSRC = credentials.9f +crget.9f := LINKSRC = credentials.9f +crhold.9f := LINKSRC = credentials.9f +kcred.9f := LINKSRC = credentials.9f +zone_kcred.9f := LINKSRC = credentials.9f + csx_Get16.9f := LINKSRC = csx_Get8.9f csx_Get32.9f := LINKSRC = csx_Get8.9f csx_Get64.9f := LINKSRC = csx_Get8.9f diff --git a/usr/src/man/man9f/credentials.9f b/usr/src/man/man9f/credentials.9f new file mode 100644 index 0000000000..89d2138c95 --- /dev/null +++ b/usr/src/man/man9f/credentials.9f @@ -0,0 +1,201 @@ +.\" +.\" This file and its contents are supplied under the terms of the +.\" Common Development and Distribution License ("CDDL"), version 1.0. +.\" You may only use this file in accordance with the terms of version +.\" 1.0 of the CDDL. +.\" +.\" A full copy of the text of the CDDL should have accompanied this +.\" source. A copy of the CDDL is also available via the Internet at +.\" http://www.illumos.org/license/CDDL. +.\" +.\" +.\" Copyright 2020 Nexenta by DDN, Inc. All rights reserved. +.\" +.Dd Aug 21, 2020 +.Dt CREDENTIALS 9F +.Os +.Sh NAME +.Nm credentials , +.Nm CRED , +.Nm crdup , +.Nm crfree , +.Nm crget , +.Nm crhold , +.Nm kcred , +.Nm zone_kcred +.Nd Functions for obtaining credentials in the kernel +.Sh SYNOPSIS +.In sys/cred.h +.Ft "cred_t *" +.Fo CRED +.Fc +.Ft "cred_t *" +.Fo crdup +.Fa "cred_t *cr" +.Fc +.Ft "void" +.Fo crfree +.Fa "cred_t *cr" +.Fc +.Ft "cred_t *" +.Fo crget +.Fc +.Ft "void" +.Fo crhold +.Fa "cred_t *cr" +.Fc +.Ft "cred_t *" +.Fo zone_kcred +.Fc +.Vt cred_t *kcred +.Sh INTERFACE LEVEL +.Sy Volatile - +This interface is still evolving in illumos. +API and ABI stability is not guaranteed. +.Sh PARAMETERS +.Bl -tag -width Fa +.It Fa cr +pointer to the user credential structure. +.El +.Sh DESCRIPTION +Some kernel interfaces require a credential as an argument. +This page documents the credentials available in the system, +as well as interfaces for creating new credentials. +.Pp +Most users do not need to create new credentials. +Instead, users should generally use the credentials of the executing context. +.Pp +This interface is primarily intended for services that must perform operations +on behalf of multiple remotely authenticated users, whose authentication context +is unrelated to the context of the executing thread or process. +Drivers MUST NOT create new credentials. +Drivers should use the provided credential. +.Pp +For functions that do not return new credentials, +if the credentials will be used outside of their context +(i.e. if the output of zone_kcred() is referenced outside of the zone), +then one should use +.Fn crdup +or +.Fn crhold +to ensure that the credentials remain valid. +.Ss Fn CRED +The +.Fn CRED +function returns the credential of the calling thread. +Its contents depend on the calling context (user, kernel, interrupt). +.Ss Fn crdup +.Fn crdup +returns a newly-allocated copy of +.Fa cr +with reference count of 1. +It sleeps until the allocation succeeds. +.Ss Fn crfree +.Fn crfree +releases a reference to +.Fa cr . +If this is the last reference, the credential is destroyed. +.Ss Fn crhold +.Fn crhold +takes a reference to +.Fa cr . +.Ss Va kcred +.Va kcred +is the root credential of the global zone. +Its UIDs and GIDs are all 0. +It has the following privilege sets by default: +.Bd -literal -offset indent +E: basic,proc_secflags +I: basic,proc_secflags +P: basic,proc_secflags +L: all +.Ed +.Pp +.Dv NET_MAC_AWARE +is set in the credential's flags. +It is not marked privilege-aware. +.Pp +.Va kcred +will never be freed by the system. +.Ss Fn zone_kcred +The +.Fn zone_kcred +function returns the root credential of the zone to which the calling thread belongs. +This cred is derived from the global kcred, minus any privileges denied to the zone. +.Ss Fn crget +The +.Fn crget +function returns a copy of +.Fn zone_kcred +suitable for modification by the caller. +This is useful for obtaining a default, +well-initialized credential in the appropriate zone context, +that is free of privileges or limitations of the originating thread. +It must be freed with +.Fn crfree . +It sleeps until the allocation succeeds. +.Ss Considerations +.Va kcred +and +.Fn zone_kcred +are not privilege-aware, and have all IDs set to 0. +This causes their Limit set to be used in place of the Effective and Permitted sets, +which significantly expands their privileges. +.Pp +If the output of +.Fn crget +is not later marked as privilege aware, and its UID is not set to a non-zero value, +then its Limit set will be used in place of its Effective and Permitted sets, +significantly expanding its privileges. +Callers should either mark the credential as privilege-aware, +reduce the Limit set appropriately, +or ensure that they intend for zero-uid users to have expanded privileges. +.Pp +.Va kcred , +.Fn zone_kcred , +and +.Fn CRED +are not suitable for modfication by the caller. +Callers must use +.Fn crdup +to create a copy of these credentials that are suitable for modification. +.Pp +Callers of +.Fn zone_kcred +and +.Fn crget +must take care to ensure that the calling thread is +executing in the context of the appropriate zone. +If the thread is performing work on behalf of a different zone, +or if one is uncertain of the zone context of the calling thread, +then one should find the appropriate zone by other means, and reference +.Em zone->zone_kcred +explicitly. +.Sh CONTEXT +These functions can be called from +.Sy user +and +.Sy kernel +contexts. +.Sh RETURN VALUES +.Fn zone_kcred +and +.Fn CRED +return a pointer to a +.Vt cred_t +that should not be modified. +.Pp +.Fn crget +and +.Fn crdup +return a pointer to a newly allocated +.Vt cred_t . +.Pp +.Fn zone_kcred , +.Fn CRED , +.Fn crdup , +and +.Fn crget +can never fail, and always return a valid credential. +.Sh SEE ALSO +.Xr ddi_cred 9f |