diff options
Diffstat (limited to 'lib/libc')
178 files changed, 991 insertions, 396 deletions
diff --git a/lib/libc/compat-43/killpg.2 b/lib/libc/compat-43/killpg.2 index 937140f..fe78a96 100644 --- a/lib/libc/compat-43/killpg.2 +++ b/lib/libc/compat-43/killpg.2 @@ -76,7 +76,9 @@ function will fail and no signal will be sent if: .Bl -tag -width Er .It Bq Er EINVAL -.Fa Sig +The +.Fa sig +argument is not a valid signal number. .It Bq Er ESRCH No process can be found in the process group specified by diff --git a/lib/libc/compat-43/sigpause.2 b/lib/libc/compat-43/sigpause.2 index 611b06c..331a6b3 100644 --- a/lib/libc/compat-43/sigpause.2 +++ b/lib/libc/compat-43/sigpause.2 @@ -56,7 +56,9 @@ assigns to the set of masked signals and then waits for a signal to arrive; on return the set of masked signals is restored. -.Fa Sigmask +The +.Fa sigmask +argument is usually 0 to indicate that no signals are to be blocked. The diff --git a/lib/libc/compat-43/sigvec.2 b/lib/libc/compat-43/sigvec.2 index 3354136..4a0db25 100644 --- a/lib/libc/compat-43/sigvec.2 +++ b/lib/libc/compat-43/sigvec.2 @@ -274,7 +274,9 @@ or points to memory that is not a valid part of the process address space. .It Bq Er EINVAL -.Fa Sig +The +.Fa sig +argument is not a valid signal number. .It Bq Er EINVAL An attempt is made to ignore or supply a handler for @@ -312,8 +314,10 @@ Here .Fa sig is the signal number, into which the hardware faults and traps are mapped as defined below. -.Fa Code -is a parameter that is either a constant +The +.Fa code +argument +is either a constant as given below or, for compatibility mode faults, the code provided by the hardware (Compatibility mode faults are distinguished from the other @@ -321,7 +325,9 @@ other traps by having .Dv PSL_CM set in the psl). -.Fa Scp +The +.Fa scp +argument is a pointer to the .Fa sigcontext structure (defined in diff --git a/lib/libc/db/man/btree.3 b/lib/libc/db/man/btree.3 index 99b2b15..b861aeb 100644 --- a/lib/libc/db/man/btree.3 +++ b/lib/libc/db/man/btree.3 @@ -172,7 +172,9 @@ is (no comparison function is specified), the keys are compared lexically, with shorter keys considered less than longer keys. .It Va prefix -.Va Prefix +The +.Va prefix +element is the prefix comparison function. If specified, this routine must return the number of bytes of the second key argument which are necessary to determine that it is greater than the first @@ -206,10 +208,11 @@ is 0 (no order is specified) the current host order is used. If the file already exists (and the .Dv O_TRUNC flag is not specified), the -values specified for the parameters +values specified for the .Va flags , lorder and .Va psize +arguments are ignored in favor of the values used when the tree was created. .Pp diff --git a/lib/libc/db/man/dbm.3 b/lib/libc/db/man/dbm.3 index a78d35a..1fd4d85 100644 --- a/lib/libc/db/man/dbm.3 +++ b/lib/libc/db/man/dbm.3 @@ -77,7 +77,9 @@ The .Fn dbm_open base flags mode function opens or creates a database. +The .Fa base +argument is the basename of the file containing the database; the actual database has a .Pa .db @@ -88,9 +90,11 @@ is .Qq Li /home/me/mystuff then the actual database is in the file .Pa /home/me/mystuff.db . +The .Fa flags and .Fa mode +arguments are passed to .Xr open 2 . .Pq Dv O_RDWR | O_CREAT @@ -129,7 +133,9 @@ The .Fn dbm_store db key data flags function inserts or replaces an entry in the database. +The .Fa flags +argument is either .Dv DBM_INSERT or diff --git a/lib/libc/db/man/dbopen.3 b/lib/libc/db/man/dbopen.3 index 44ff657..e67fc29 100644 --- a/lib/libc/db/man/dbopen.3 +++ b/lib/libc/db/man/dbopen.3 @@ -69,7 +69,9 @@ opens .Fa file for reading and/or writing. Files never intended to be preserved on disk may be created by setting -the file parameter to +the +.Fa file +argument to .Dv NULL . .Pp The @@ -180,15 +182,16 @@ with a or .Va sync function may result in inconsistent or lost information. -.Va Close +.Va close routines return -1 on error (setting .Va errno ) and 0 on success. .It Va del A pointer to a routine to remove key/data pairs from the database. .Pp -The parameter +The .Fa flags +argument may be set to the following value: .Bl -tag -width indent .It Dv R_CURSOR @@ -196,7 +199,7 @@ Delete the record referenced by the cursor. The cursor must have previously been initialized. .El .Pp -.Va Delete +.Va delete routines return -1 on error (setting .Va errno ) , 0 on success, and 1 if the specified @@ -230,7 +233,7 @@ The address and length of the data associated with the specified .Fa key are returned in the structure referenced by .Fa data . -.Va Get +.Va get routines return -1 on error (setting .Va errno ) , 0 on success, and 1 if the @@ -239,8 +242,9 @@ was not in the file. .It Va put A pointer to a routine to store key/data pairs in the database. .Pp -The parameter +The .Fa flags +argument may be set to one of the following values: .Bl -tag -width indent .It Dv R_CURSOR @@ -302,7 +306,7 @@ The default behavior of the routines is to enter the new key/data pair, replacing any previously existing key. .Pp -.Va Put +.Va put routines return -1 on error (setting .Va errno ) , 0 on success, and 1 if the @@ -336,7 +340,7 @@ while records inserted in front of the cursor will be returned. .Pp The .Fa flags -value +argument .Em must be set to one of the following values: .Bl -tag -width indent @@ -390,7 +394,7 @@ and access methods because they each imply that the keys have an inherent order which does not change. .Pp -.Va Seq +.Va seq routines return -1 on error (setting .Va errno ) , 0 on success and 1 if there are no key/data pairs less than or greater @@ -410,7 +414,7 @@ routine has no effect and will always succeed. .Pp The .Fa flags -value may be set to the following value: +argument may be set to the following value: .Bl -tag -width indent .It Dv R_RECNOSYNC If the @@ -427,7 +431,7 @@ field of the manual page for more information.) .El .Pp -.Va Sync +.Va sync routines return -1 on error (setting .Va errno ) and 0 on success. @@ -471,7 +475,7 @@ or the following: .It Bq Er EFTYPE A file is incorrectly formatted. .It Bq Er EINVAL -A parameter has been specified (hash function, pad byte etc.) that is +An argument has been specified (hash function, pad byte etc.) that is incompatible with the current file specification or which is not meaningful for the function (for example, use of the cursor without prior initialization) or there is a mismatch between the version diff --git a/lib/libc/db/man/hash.3 b/lib/libc/db/man/hash.3 index 4ed6df9..527f59f 100644 --- a/lib/libc/db/man/hash.3 +++ b/lib/libc/db/man/hash.3 @@ -77,14 +77,18 @@ typedef struct { The elements of this structure are as follows: .Bl -tag -width indent .It Va bsize -.Va Bsize +The +.Va bsize +element defines the .Nm table bucket size, and is, by default, 256 bytes. It may be preferable to increase the page size for disk-resident tables and tables with large data items. .It Va ffactor -.Va Ffactor +The +.Va ffactor +element indicates a desired density within the .Nm table. @@ -94,7 +98,9 @@ one bucket, determining when the table grows or shrinks. The default value is 8. .It Va nelem -.Va Nelem +The +.Va nelem +element is an estimate of the final size of the .Nm table. @@ -110,7 +116,9 @@ This value is advisory, and the access method will allocate more memory rather than fail. .It Va hash -.Va Hash +The +.Va hash +element is a user defined .Nm function. @@ -141,10 +149,11 @@ value specified when the tree was created is used. If the file already exists (and the .Dv O_TRUNC flag is not specified), the -values specified for the parameters +values specified for the .Va bsize , ffactor , lorder and .Va nelem +arguments are ignored and the values specified when the tree was created are used. .Pp diff --git a/lib/libc/db/man/mpool.3 b/lib/libc/db/man/mpool.3 index 26333b8..965be55 100644 --- a/lib/libc/db/man/mpool.3 +++ b/lib/libc/db/man/mpool.3 @@ -146,20 +146,22 @@ is returned and is set. The .Fa flags -parameter is not currently used. +argument is not currently used. .Pp The function .Fn mpool_put unpins the page referenced by .Fa pgaddr . -.Fa Pgaddr +The +.Fa pgaddr +argument must be an address previously returned by .Fn mpool_get or .Fn mpool_new . The .Fa flags -value is specified by +argument is specified by .Em or Ns 'ing any of the following values: .Bl -tag -width indent diff --git a/lib/libc/gen/dllockinit.3 b/lib/libc/gen/dllockinit.3 index f117728..6af2cf7 100644 --- a/lib/libc/gen/dllockinit.3 +++ b/lib/libc/gen/dllockinit.3 @@ -52,7 +52,7 @@ threads from entering its critical sections simultaneously. .Pp The .Fa context -parameter specifies an opaque context for creating locks. The +argument specifies an opaque context for creating locks. The dynamic linker will pass it to the .Fa lock_create function when creating the locks it needs. When the dynamic linker @@ -65,26 +65,26 @@ to destroy the context. .Pp The .Fa lock_create -parameter specifies a function for creating a read/write lock. It +argument specifies a function for creating a read/write lock. It must return a pointer to the new lock. .Pp The .Fa rlock_acquire and .Fa wlock_acquire -parameters specify functions which lock a lock for reading or +arguments specify functions which lock a lock for reading or writing, respectively. The .Fa lock_release -parameter specifies a function which unlocks a lock. Each of these +argument specifies a function which unlocks a lock. Each of these functions is passed a pointer to the lock. .Pp The .Fa lock_destroy -parameter specifies a function to destroy a lock. It may be +argument specifies a function to destroy a lock. It may be .Dv NULL if locks do not need to be destroyed. The .Fa context_destroy -parameter specifies a function to destroy the context. It may be +argument specifies a function to destroy the context. It may be .Dv NULL if the context does not need to be destroyed. .Pp diff --git a/lib/libc/gen/dlopen.3 b/lib/libc/gen/dlopen.3 index ba37c6f..d6bb9f9 100644 --- a/lib/libc/gen/dlopen.3 +++ b/lib/libc/gen/dlopen.3 @@ -92,7 +92,9 @@ A null pointer supplied for .Fa path is interpreted as a reference to the main executable of the process. +The .Fa mode +argument controls the way in which external function references from the loaded object are bound to their referents. It must contain one of the following values, possibly ORed with diff --git a/lib/libc/gen/exec.3 b/lib/libc/gen/exec.3 index a17a7de..4875575 100644 --- a/lib/libc/gen/exec.3 +++ b/lib/libc/gen/exec.3 @@ -118,9 +118,9 @@ and functions also specify the environment of the executed process by following the .Dv NULL -pointer that terminates the list of arguments in the parameter list -or the pointer to the argv array with an additional parameter. -This additional parameter is an array of pointers to null-terminated strings +pointer that terminates the list of arguments in the argument list +or the pointer to the argv array with an additional argument. +This additional argument is an array of pointers to null-terminated strings and .Em must be terminated by a diff --git a/lib/libc/gen/fmtcheck.3 b/lib/libc/gen/fmtcheck.3 index 507ef27..1cb4883 100644 --- a/lib/libc/gen/fmtcheck.3 +++ b/lib/libc/gen/fmtcheck.3 @@ -67,7 +67,7 @@ family of functions cannot verify the types of arguments that they are passed at run-time. In some cases, like .Xr catgets 3 , it is useful or necessary to use a user-supplied format string with no -guarantee that the format string matches the specified parameters. +guarantee that the format string matches the specified arguments. .Pp The .Fn fmtcheck @@ -94,7 +94,7 @@ Otherwise, it will return .Fa fmt_default . .Sh SECURITY CONSIDERATIONS Note that the formats may be quite different as long as they accept the -same parameters. For example, +same arguments. For example, .Qq Li "%p %o %30s %#llx %-10.*e %n" is compatible with .Qq Li "This number %lu %d%% and string %s has %qd numbers and %.*g floats (%n)" . diff --git a/lib/libc/gen/fts.3 b/lib/libc/gen/fts.3 index b50b316..541286d 100644 --- a/lib/libc/gen/fts.3 +++ b/lib/libc/gen/fts.3 @@ -95,25 +95,25 @@ prune and/or re-visit portions of the hierarchy. Two structures are defined (and typedef'd) in the include file .Aq Pa fts.h . The first is -.Fa FTS , +.Vt FTS , the structure that represents the file hierarchy itself. The second is -.Fa FTSENT , +.Vt FTSENT , the structure that represents a file in the file hierarchy. Normally, an -.Fa FTSENT +.Vt FTSENT structure is returned for every file in the file hierarchy. In this manual page, .Dq file and -.Dq Fa FTSENT No structure +.Dq Vt FTSENT No structure are generally interchangeable. .Pp The -.Fa FTS +.Vt FTS structure contains space for a single pointer, which may be used to store application data or per-hierarchy state. The @@ -123,7 +123,7 @@ and functions may be used to set and retrieve this pointer. This is likely to be useful only when accessed from the sort comparison function, which can determine the original -.Fa FTS +.Vt FTS stream of its arguments using the .Fn fts_get_stream function. @@ -132,7 +132,7 @@ The two functions are also available as macros of the same name. .Pp The -.Fa FTSENT +.Vt FTSENT structure contains at least the following fields, which are described in greater detail below: .Bd -literal @@ -158,7 +158,7 @@ These fields are defined as follows: .Bl -tag -width "fts_namelen" .It Fa fts_info One of the following values describing the returned -.Fa FTSENT +.Vt FTSENT structure and the file it represents. With the exception of directories without errors @@ -174,11 +174,11 @@ A directory that causes a cycle in the tree. (The .Fa fts_cycle field of the -.Fa FTSENT +.Vt FTSENT structure will be filled in as well.) .It Dv FTS_DEFAULT Any -.Fa FTSENT +.Vt FTSENT structure that represents a file type not explicitly described by one of the other .Fa fts_info @@ -200,7 +200,7 @@ which was not specified as a file name to .It Dv FTS_DP A directory being visited in post-order. The contents of the -.Fa FTSENT +.Vt FTSENT structure will be unchanged from when it was returned in pre-order, i.e. with the .Fa fts_info @@ -257,19 +257,19 @@ The length of the string referenced by The depth of the traversal, numbered from \-1 to N, where this file was found. The -.Fa FTSENT +.Vt FTSENT structure representing the parent of the starting point (or root) of the traversal is numbered .Dv FTS_ROOTPARENTLEVEL (\-1), and the -.Fa FTSENT +.Vt FTSENT structure for the root itself is numbered .Dv FTS_ROOTLEVEL (0). .It Fa fts_errno Upon return of a -.Fa FTSENT +.Vt FTSENT structure from the .Fn fts_children or @@ -304,7 +304,7 @@ It is initialized to .Dv NULL . .It Fa fts_parent A pointer to the -.Fa FTSENT +.Vt FTSENT structure referencing the file in the hierarchy immediately above the current file, i.e. the directory of which this file is a member. @@ -333,9 +333,9 @@ of a hard link between two directories, or a symbolic link pointing to a directory, the .Fa fts_cycle field of the structure will point to the -.Fa FTSENT +.Vt FTSENT structure in the hierarchy that references the same file as the current -.Fa FTSENT +.Vt FTSENT structure. Otherwise, the contents of the .Fa fts_cycle @@ -358,10 +358,10 @@ fields are guaranteed to be for the file most recently returned by .Fn fts_read . To use these fields to reference any files represented by other -.Fa FTSENT +.Vt FTSENT structures will require that the path buffer be modified using the information contained in that -.Fa FTSENT +.Vt FTSENT structure's .Fa fts_pathlen field. @@ -400,11 +400,11 @@ is also specified. This option causes the .Nm routines to return -.Fa FTSENT +.Vt FTSENT structures for the targets of symbolic links instead of the symbolic links themselves. If this option is set, the only symbolic links for which -.Fa FTSENT +.Vt FTSENT structures are returned to the application are those referencing non-existent files. Either @@ -434,7 +434,7 @@ pathnames were provided as arguments to .Fn fts_open . .It Dv FTS_NOSTAT By default, returned -.Fa FTSENT +.Vt FTSENT structures reference file characteristic information (the .Fa statp field) for each file visited. @@ -452,11 +452,11 @@ field undefined. This option causes the .Nm routines to return -.Fa FTSENT +.Vt FTSENT structures for symbolic links themselves instead of the target files they point to. If this option is set, -.Fa FTSENT +.Vt FTSENT structures for all symbolic links in the hierarchy are returned to the application. Either @@ -478,7 +478,7 @@ encountered in the file hierarchy are ignored. This option causes the .Nm routines to return -.Fa FTSENT +.Vt FTSENT structures for them. .It Dv FTS_XDEV This option prevents @@ -493,7 +493,7 @@ specifies a user-defined function which may be used to order the traversal of the hierarchy. It takes two pointers to pointers to -.Fa FTSENT +.Vt FTSENT structures as arguments and should return a negative value, zero, or a positive value to indicate if the file referenced by its first argument comes before, in any order @@ -504,7 +504,7 @@ The and .Fa fts_pathlen fields of the -.Fa FTSENT +.Vt FTSENT structures may .Em never be used in this comparison. @@ -529,7 +529,7 @@ everything else. The .Fn fts_read function returns a pointer to an -.Fa FTSENT +.Vt FTSENT structure describing a file in the hierarchy. Directories (that are readable and do not cause cycles) are visited at @@ -554,14 +554,14 @@ and sets .Va errno appropriately. If an error related to a returned file occurs, a pointer to an -.Fa FTSENT +.Vt FTSENT structure is returned, and .Va errno may or may not have been set (see .Fa fts_info ) . .Pp The -.Fa FTSENT +.Vt FTSENT structures returned by .Fn fts_read may be overwritten after a call to @@ -572,7 +572,7 @@ on the same file hierarchy stream unless they represent a file of type directory, in which case they will not be overwritten until after a call to .Fn fts_read after the -.Fa FTSENT +.Vt FTSENT structure has been returned by the function .Fn fts_read in post-order. @@ -580,16 +580,16 @@ in post-order. The .Fn fts_children function returns a pointer to an -.Fa FTSENT +.Vt FTSENT structure describing the first entry in a NULL-terminated linked list of the files in the directory represented by the -.Fa FTSENT +.Vt FTSENT structure most recently returned by .Fn fts_read . The list is linked through the .Fa fts_link field of the -.Fa FTSENT +.Vt FTSENT structure, and is ordered by the user-specified comparison function, if any. Repeated calls to .Fn fts_children @@ -604,7 +604,7 @@ will return a pointer to the files in the logical directory specified to i.e. the arguments specified to .Fn fts_open . Otherwise, if the -.Fa FTSENT +.Vt FTSENT structure most recently returned by .Fn fts_read is not a directory being visited in pre-order, @@ -624,7 +624,7 @@ and sets appropriately. .Pp The -.Fa FTSENT +.Vt FTSENT structures returned by .Fn fts_children may be overwritten after a call to diff --git a/lib/libc/gen/getcap.3 b/lib/libc/gen/getcap.3 index 9b4b4f8..a2c2e7d 100644 --- a/lib/libc/gen/getcap.3 +++ b/lib/libc/gen/getcap.3 @@ -94,7 +94,9 @@ function will first look for files ending in (see .Xr cap_mkdb 1 ) before accessing the ASCII file. -.Fa Buf +The +.Fa buf +argument must be retained through all subsequent calls to .Fn cgetmatch , .Fn cgetcap , diff --git a/lib/libc/gen/getdomainname.3 b/lib/libc/gen/getdomainname.3 index 7fd3d48..6e0ed6b 100644 --- a/lib/libc/gen/getdomainname.3 +++ b/lib/libc/gen/getdomainname.3 @@ -54,8 +54,9 @@ function returns the standard domain name for the current processor, as previously set by .Fn setdomainname . -The parameter +The .Fa namelen +argument specifies the size of the .Fa name array. The returned name is null-terminated unless insufficient @@ -80,7 +81,7 @@ The .Fa name or .Fa namelen -parameter gave an +argument gave an invalid address. .It Bq Er EPERM The caller tried to set the hostname and was not the super-user. diff --git a/lib/libc/gen/gethostname.3 b/lib/libc/gen/gethostname.3 index c8cd1cb..7822322 100644 --- a/lib/libc/gen/gethostname.3 +++ b/lib/libc/gen/gethostname.3 @@ -54,8 +54,9 @@ function returns the standard host name for the current processor, as previously set by .Fn sethostname . -The parameter +The .Fa namelen +argument specifies the size of the .Fa name array. The returned name is null-terminated unless insufficient @@ -80,7 +81,7 @@ The .Fa name or .Fa namelen -parameter gave an +argument gave an invalid address. .It Bq Er EPERM The caller tried to set the hostname and was not the super-user. diff --git a/lib/libc/gen/getmntinfo.3 b/lib/libc/gen/getmntinfo.3 index 16f6fcc..7a3cc02 100644 --- a/lib/libc/gen/getmntinfo.3 +++ b/lib/libc/gen/getmntinfo.3 @@ -60,7 +60,7 @@ The function passes its .Fa flags -parameter transparently to +argument transparently to .Xr getfsstat 2 . .Sh RETURN VALUES On successful completion, diff --git a/lib/libc/gen/getttyent.3 b/lib/libc/gen/getttyent.3 index 593bef1..4a8535f 100644 --- a/lib/libc/gen/getttyent.3 +++ b/lib/libc/gen/getttyent.3 @@ -183,7 +183,7 @@ The routines and .Fn isnettty return non-zero if the dialup or network flag is set for the -tty entry relating to the tty named by the parameter, and +tty entry relating to the tty named by the argument, and zero otherwise. .Sh FILES .Bl -tag -width /etc/ttys -compact diff --git a/lib/libc/gen/getvfsbyname.3 b/lib/libc/gen/getvfsbyname.3 index 067e87a..a7cfa2e 100644 --- a/lib/libc/gen/getvfsbyname.3 +++ b/lib/libc/gen/getvfsbyname.3 @@ -94,10 +94,12 @@ The following errors may be reported: .It Bq Er EFAULT The .Fa vfc -pointer contains an invalid address. +argument +points to an invalid address. .It Bq Er ENOENT The .Fa name +argument specifies a file system that is unknown or not configured in the kernel. .El .Sh SEE ALSO diff --git a/lib/libc/gen/getvfsent.3 b/lib/libc/gen/getvfsent.3 index 89d52e7..7c4a934 100644 --- a/lib/libc/gen/getvfsent.3 +++ b/lib/libc/gen/getvfsent.3 @@ -77,7 +77,7 @@ obtained in toto from the kernel via .Xr sysctl 3 . If the .Fa cachelist -parameter to +argument to .Fn setvfsent is non-zero, the list will be retrieved only once, upon the first call to one of the retrieval functions, until diff --git a/lib/libc/gen/glob.3 b/lib/libc/gen/glob.3 index 9aac9b0..93f0c8f 100644 --- a/lib/libc/gen/glob.3 +++ b/lib/libc/gen/glob.3 @@ -354,7 +354,7 @@ contains the number of matched pathnames in the current invocation of .It Fa gl_flags contains a copy of the .Fa flags -parameter with the bit +argument with the bit .Dv GLOB_MAGCHAR set if .Fa pattern diff --git a/lib/libc/gen/makecontext.3 b/lib/libc/gen/makecontext.3 index 0419853..ad55e7a 100644 --- a/lib/libc/gen/makecontext.3 +++ b/lib/libc/gen/makecontext.3 @@ -65,14 +65,18 @@ and had a stack allocated for it. The context is modified so that it will continue execution by invoking .Fn func with the arguments provided. +The .Fa argc +argument must be equal to the number of additional arguments provided to .Fn makecontext -and also equal to the number of parameters to +and also equal to the number of arguments to .Fn func , or else the behavior is undefined. .Pp +The .Fa "ucp->uc_link" +argument must be initialized before calling .Fn makecontext and determines the action to take when diff --git a/lib/libc/gen/msgctl.3 b/lib/libc/gen/msgctl.3 index 45db2b9..b0264b5 100644 --- a/lib/libc/gen/msgctl.3 +++ b/lib/libc/gen/msgctl.3 @@ -174,7 +174,9 @@ function will fail if: .Bl -tag -width Er .It Bq Er EPERM +The .Fa cmd +argument is equal to IPC_SET or IPC_RMID and the caller is not the super-user, nor does the effective uid match either the .Va msg_perm.uid @@ -190,13 +192,17 @@ but the caller is not the super-user. The command is IPC_STAT and the caller has no read permission for this message queue. .It Bq Er EINVAL +The .Fa msqid +argument is not a valid message queue identifier. .Pp .Va cmd is not a valid command. .It Bq Er EFAULT +The .Fa buf +argument specifies an invalid address. .El .Sh SEE ALSO diff --git a/lib/libc/gen/msgrcv.3 b/lib/libc/gen/msgrcv.3 index 2985761..d6401b6 100644 --- a/lib/libc/gen/msgrcv.3 +++ b/lib/libc/gen/msgrcv.3 @@ -69,22 +69,30 @@ The value of has one of the following meanings: .Bl -bullet .It +The .Fa msgtyp +argument is greater than 0. The first message of type .Fa msgtyp will be received. .It +The .Fa msgtyp +argument is equal to 0. The first message on the queue will be received. .It +The .Fa msgtyp +argument is less than 0. The first message of the lowest message type that is less than or equal to the absolute value of .Fa msgtyp will be received. .El .Pp +The .Fa msgsz +argument specifies the maximum length of the requested message. If the received message has a length greater than @@ -165,14 +173,18 @@ function will fail if: .Bl -tag -width Er .It Bq Er EINVAL +The .Fa msqid +argument is not a valid message queue identifier. .Pp The message queue was removed while .Fn msgrcv was waiting for a message of the requested type to become available on it. .Pp +The .Fa msgsz +argument is less than 0. .It Bq Er E2BIG A matching message was received, but its size was greater than @@ -184,7 +196,9 @@ flag was not set in .It Bq Er EACCES The calling process does not have read access to the message queue. .It Bq Er EFAULT +The .Fa msgp +argument points to an invalid address. .It Bq Er EINTR The system call was interrupted by the delivery of a signal. diff --git a/lib/libc/gen/msgsnd.3 b/lib/libc/gen/msgsnd.3 index 70ed45a..f41c173 100644 --- a/lib/libc/gen/msgsnd.3 +++ b/lib/libc/gen/msgsnd.3 @@ -50,7 +50,9 @@ The .Fn msgsnd function sends a message to the message queue specified in .Fa msqid . +The .Fa msgp +argument points to a structure containing the message. This structure should consist of the following members: @@ -129,7 +131,9 @@ function will fail if: .Bl -tag -width Er .It Bq Er EINVAL +The .Fa msqid +argument is not a valid message queue identifier .Pp The message queue was removed while @@ -137,11 +141,15 @@ The message queue was removed while was waiting for a resource to become available in order to deliver the message. .Pp +The .Fa msgsz +argument is less than 0, or greater than .Va msg_qbytes . .Pp +The .Fa mtype +argument is not greater than 0. .It Bq Er EACCES The calling process does not have write access to the message queue. @@ -152,7 +160,9 @@ system, and was set in .Fa msgflg . .It Bq Er EFAULT +The .Fa msgp +argument points to an invalid address. .It Bq Er EINTR The system call was interrupted by the delivery of a signal. diff --git a/lib/libc/gen/rand48.3 b/lib/libc/gen/rand48.3 index 0fe766a..3a263c8 100644 --- a/lib/libc/gen/rand48.3 +++ b/lib/libc/gen/rand48.3 @@ -163,7 +163,7 @@ and the seed used in .Fn lrand48 , and .Fn mrand48 . -An array of 7 shorts is passed as parameter; the first three shorts are +An array of 7 shorts is passed as argument; the first three shorts are used to initialize the seed; the second three are used to initialize the multiplicand; and the last short is used to initialize the addend. It is thus not possible to use values greater than 0xffff as the addend. diff --git a/lib/libc/gen/scandir.3 b/lib/libc/gen/scandir.3 index fd090cc..045e4ec 100644 --- a/lib/libc/gen/scandir.3 +++ b/lib/libc/gen/scandir.3 @@ -64,7 +64,7 @@ referenced by .Pp The .Fa select -parameter is a pointer to a user supplied subroutine which is called by +argument is a pointer to a user supplied subroutine which is called by .Fn scandir to select which entries are to be included in the array. The select routine is passed a @@ -76,7 +76,7 @@ is null, then all the directory entries will be included. .Pp The .Fa compar -parameter is a pointer to a user supplied subroutine which is passed to +argument is a pointer to a user supplied subroutine which is passed to .Xr qsort 3 to sort the completed array. If this pointer is null, the array is not sorted. @@ -86,7 +86,7 @@ The function is a routine which can be used for the .Fa compar -parameter to sort the array alphabetically. +argument to sort the array alphabetically. .Pp The memory allocated for the array can be deallocated with .Xr free 3 , diff --git a/lib/libc/gen/siginterrupt.3 b/lib/libc/gen/siginterrupt.3 index 79aed04..9680a15 100644 --- a/lib/libc/gen/siginterrupt.3 +++ b/lib/libc/gen/siginterrupt.3 @@ -106,7 +106,9 @@ The call fails if: .Bl -tag -width Er .It Bq Er EINVAL +The .Fa sig +argument is not a valid signal number. .El .Sh SEE ALSO diff --git a/lib/libc/gen/signal.3 b/lib/libc/gen/signal.3 index a311e86..c536cd7 100644 --- a/lib/libc/gen/signal.3 +++ b/lib/libc/gen/signal.3 @@ -135,7 +135,7 @@ is possible on a descriptor (see .Pp The .Fa sig -parameter specifies which signal was received. +argument specifies which signal was received. The .Fa func procedure allows a user to choose the action upon receipt of a signal. @@ -218,7 +218,9 @@ will fail and no action will take place if one of the following occur: .Bl -tag -width Er .It Bq Er EINVAL +The .Fa sig +argument is not a valid signal number. .It Bq Er EINVAL An attempt is made to ignore or supply a handler for diff --git a/lib/libc/gen/sysctl.3 b/lib/libc/gen/sysctl.3 index 6ea38c3..8bf54ab 100644 --- a/lib/libc/gen/sysctl.3 +++ b/lib/libc/gen/sysctl.3 @@ -109,7 +109,9 @@ should be set to NULL. .Pp The size of the available data can be determined by calling .Fn sysctl -with a NULL parameter for +with the +.Dv NULL +argument for .Fa oldp . The size of the available data will be returned in the location pointed to by .Fa oldlenp . diff --git a/lib/libc/gen/syslog.3 b/lib/libc/gen/syslog.3 index 96c0cfa..a82d36a 100644 --- a/lib/libc/gen/syslog.3 +++ b/lib/libc/gen/syslog.3 @@ -130,8 +130,9 @@ by .Fn syslog and .Fn vsyslog . -The parameter +The .Fa ident +argument is a string that will be prepended to every message. The .Fa logopt @@ -163,7 +164,7 @@ instantiations of daemons. .Pp The .Fa facility -parameter encodes a default facility to be assigned to all messages +argument encodes a default facility to be assigned to all messages that do not have an explicit facility encoded: .Bl -tag -width LOG_AUTHPRIV .It Dv LOG_AUTH diff --git a/lib/libc/gen/tcsendbreak.3 b/lib/libc/gen/tcsendbreak.3 index 5c9c362..e85d104 100644 --- a/lib/libc/gen/tcsendbreak.3 +++ b/lib/libc/gen/tcsendbreak.3 @@ -117,7 +117,7 @@ of a second to the terminal referenced by .Fa fd . The .Fa len -parameter is ignored in this implementation. +argument is ignored in this implementation. .Sh RETURN VALUES Upon successful completion, all of these functions return a value of zero. .Sh ERRORS diff --git a/lib/libc/gen/tcsetattr.3 b/lib/libc/gen/tcsetattr.3 index 24717a8..f52742b 100644 --- a/lib/libc/gen/tcsetattr.3 +++ b/lib/libc/gen/tcsetattr.3 @@ -215,7 +215,7 @@ termios structure referenced by .Fa tp . The .Fa action -field is created by +argument is created by .Em or Ns 'ing the following values, as specified in the include file .Aq Pa termios.h . diff --git a/lib/libc/gen/timezone.3 b/lib/libc/gen/timezone.3 index e506d61..2a90c11 100644 --- a/lib/libc/gen/timezone.3 +++ b/lib/libc/gen/timezone.3 @@ -58,7 +58,9 @@ function returns a pointer to a time zone abbreviation for the specified and .Fa dst values. -.Fa Zone +The +.Fa zone +argument is the number of minutes west of GMT and .Fa dst is non-zero if daylight savings time is in effect. diff --git a/lib/libc/gen/ulimit.3 b/lib/libc/gen/ulimit.3 index fc58dfe..c5030a5 100644 --- a/lib/libc/gen/ulimit.3 +++ b/lib/libc/gen/ulimit.3 @@ -42,7 +42,7 @@ function will get and set process limits. Currently this is limited to the maximum file size. The .Fa cmd -parameter is one of the following: +argument is one of the following: .Bl -tag -width ".Dv UL_GETSIZE" .It Dv UL_GETSIZE will return the maximum file size in units of 512 blocks of diff --git a/lib/libc/gen/vis.3 b/lib/libc/gen/vis.3 index 67bbc1f..6f685a9 100644 --- a/lib/libc/gen/vis.3 +++ b/lib/libc/gen/vis.3 @@ -67,7 +67,9 @@ thus, when encoding a set of characters into a buffer, the size of the buffer should be four times the number of characters encoded, plus one for the trailing .Dv NUL . -The flag parameter is used for altering the default range of +The +.Fa flag +argument is used for altering the default range of characters considered for encoding and for altering the visual representation. The additional character, @@ -227,7 +229,9 @@ The following sequences are used to represent the indicated characters: .Li \e0 Tn - NUL No (000) .Ed .Pp -When using this format, the nextc parameter is looked at to determine +When using this format, the +.Fa nextc +argument is looked at to determine if a .Dv NUL character can be encoded as diff --git a/lib/libc/gmon/moncontrol.3 b/lib/libc/gmon/moncontrol.3 index 6d07aa7..07636c4 100644 --- a/lib/libc/gmon/moncontrol.3 +++ b/lib/libc/gmon/moncontrol.3 @@ -82,9 +82,11 @@ Programs that are not loaded with may selectively collect profiling statistics by calling .Fn monstartup with the range of addresses to be profiled. +The .Fa lowpc and .Fa highpc +arguments specify the address range that is to be sampled; the lowest address sampled is that of .Fa lowpc diff --git a/lib/libc/i386/sys/i386_get_ldt.2 b/lib/libc/i386/sys/i386_get_ldt.2 index 9bc8583..a64742c 100644 --- a/lib/libc/i386/sys/i386_get_ldt.2 +++ b/lib/libc/i386/sys/i386_get_ldt.2 @@ -98,7 +98,7 @@ system calls will fail if: .Bl -tag -width Er .It Bq Er EINVAL -An inappropriate parameter was used for +An inappropriate value was used for .Fa start_sel or .Fa num_sels . diff --git a/lib/libc/i386/sys/i386_set_watch.3 b/lib/libc/i386/sys/i386_set_watch.3 index 8f02555..b388c46 100644 --- a/lib/libc/i386/sys/i386_set_watch.3 +++ b/lib/libc/i386/sys/i386_set_watch.3 @@ -54,13 +54,15 @@ The .Fn i386_set_watch function will set up the specified debug registers as indicated by the -parameters. The +arguments. The .Fa watchnum argument specifies which watch register is used, 0, 1, 2, 3, or -1. If .Fa watchnum is -1, a free watch register is found and used. If there are no free watch registers, an error code of -1 is returned. -.Fa Watchaddr +The +.Fa watchaddr +argument specifies the watch address, .Fa size specifies the size in bytes of the area to be watched (1, 2, or 4 bytes), diff --git a/lib/libc/i386/sys/i386_vm86.2 b/lib/libc/i386/sys/i386_vm86.2 index 2ba0580..ab22633 100644 --- a/lib/libc/i386/sys/i386_vm86.2 +++ b/lib/libc/i386/sys/i386_vm86.2 @@ -43,13 +43,17 @@ The .Fn i386_vm86 system call is used to call various vm86 related functions. +The .Fa function +argument can be one of the following values: .Bl -tag -offset indent -width VM86_SET_VME .It Dv VM86_INIT This will initialize the kernel's vm86 parameter area for the process, and permit the process to make vm86 calls. +The .Fa data +argument points to the following structure: .Bd -literal struct vm86_init_args { @@ -59,11 +63,17 @@ struct vm86_init_args { }; .Ed .Pp +The .Fa debug +argument is used to turn on debugging code. +The .Fa cpu_type +argument controls the type of CPU being emulated, and is currently unimplemented. +The .Fa int_map +argument is a bitmap which determines whether vm86 interrupts should be handled in vm86 mode, or reflected back to the process. If the .Em Nth diff --git a/lib/libc/locale/rune.3 b/lib/libc/locale/rune.3 index a880dee..3e90e20 100644 --- a/lib/libc/locale/rune.3 +++ b/lib/libc/locale/rune.3 @@ -239,6 +239,7 @@ The function was successful. .It Bq Er EINVAL +The .Fa locale name was incorrect. .It Bq Er ENOENT diff --git a/lib/libc/net/addr2ascii.3 b/lib/libc/net/addr2ascii.3 index ce5d720..31e9f3f 100644 --- a/lib/libc/net/addr2ascii.3 +++ b/lib/libc/net/addr2ascii.3 @@ -87,16 +87,16 @@ function performs the inverse operation to .Fn addr2ascii . In addition to .Fa af , -it takes two parameters, +it takes two arguments, .Fa ascii and .Fa result . The .Fa ascii -parameter is a pointer to the string which is to be converted into +argument is a pointer to the string which is to be converted into binary. The .Fa result -parameter is a pointer to an appropriate network address structure for +argument is a pointer to an appropriate network address structure for the specified family. .Pp The following gives the appropriate structure to use for binary @@ -171,12 +171,12 @@ The .Fn addr2ascii routine was passed a .Fa len -parameter which was inappropriate for the address family given by +argument which was inappropriate for the address family given by .Fa af . .It Bq Er EPROTONOSUPPORT Either routine was passed an .Fa af -parameter other than +argument other than .Dv AF_INET or .Dv AF_LINK . diff --git a/lib/libc/net/getaddrinfo.3 b/lib/libc/net/getaddrinfo.3 index 4dbd771..f8c8f57 100644 --- a/lib/libc/net/getaddrinfo.3 +++ b/lib/libc/net/getaddrinfo.3 @@ -342,9 +342,10 @@ To return this information to the system the function .Fn freeaddrinfo is called. The -.Fa addrinfo +.Vt addrinfo structure pointed to by the -.Fa ai argument +.Fa ai +argument is freed, along with any dynamic storage pointed to by the structure. This operation is repeated until a .Dv NULL @@ -531,7 +532,9 @@ Invalid value for .It Dv EAI_FAIL Non-recoverable failure in name resolution. .It Dv EAI_FAMILY +The .Fa ai_family +address family is not supported. .It Dv EAI_MEMORY Memory allocation failure. @@ -539,16 +542,21 @@ Memory allocation failure. No address associated with .Fa nodename . .It Dv EAI_NONAME +Neither .Fa nodename nor .Fa servname provided, or not known. .It Dv EAI_SERVICE +The .Fa servname +service name is not supported for .Fa ai_socktype . .It Dv EAI_SOCKTYPE +The .Fa ai_socktype +socket type is not supported. .It Dv EAI_SYSTEM System error returned in diff --git a/lib/libc/net/gethostbyname.3 b/lib/libc/net/gethostbyname.3 index 4f4b9dc..c6f7b90 100644 --- a/lib/libc/net/gethostbyname.3 +++ b/lib/libc/net/gethostbyname.3 @@ -92,7 +92,7 @@ referenced by name or by address, respectively. .Pp The .Fa name -parameter passed to +argument passed to .Fn gethostbyname or .Fn gethostbyname2 @@ -101,7 +101,7 @@ should point to a hostname. The .Fa addr -parameter passed to +argument passed to .Fn gethostbyaddr should point to an address which is .Fa len @@ -112,7 +112,7 @@ in binary form form). The .Fa type -parameter specifies the address family +argument specifies the address family (e.g.\& .Dv AF_INET , AF_INET6 , etc.) of this address. @@ -217,8 +217,8 @@ connection. The .Fn herror function writes a message to the diagnostic output consisting of the -string parameter -.Fa s , +string argument +.Fa string , the constant string .Qq Li ":\ " , and a message corresponding to the value of @@ -229,7 +229,7 @@ The function returns a string which is the message text corresponding to the value of the .Fa err -parameter. +argument. .Sh FILES .Bl -tag -width /etc/nsswitch.conf -compact .It Pa /etc/hosts diff --git a/lib/libc/net/getnameinfo.3 b/lib/libc/net/getnameinfo.3 index 09da4a8..f0496e7 100644 --- a/lib/libc/net/getnameinfo.3 +++ b/lib/libc/net/getnameinfo.3 @@ -246,7 +246,7 @@ for the specified family. .It Bq Er EAI_MEMORY There was a memory allocation failure. .It Bq Er EAI_NONAME -The name does not resolve for the supplied parameters. +The name does not resolve for the supplied arguments. .Dv NI_NAMEREQD is set and the host's name cannot be located, or both nodename and servname were null. diff --git a/lib/libc/net/getnetent.3 b/lib/libc/net/getnetent.3 index 8a9fb69..f05df36 100644 --- a/lib/libc/net/getnetent.3 +++ b/lib/libc/net/getnetent.3 @@ -133,6 +133,7 @@ or until is encountered. The .Fa type +argument must be .Dv AF_INET . Network numbers are supplied in host order. diff --git a/lib/libc/net/inet6_option_space.3 b/lib/libc/net/inet6_option_space.3 index 00a9b46..aae9791 100644 --- a/lib/libc/net/inet6_option_space.3 +++ b/lib/libc/net/inet6_option_space.3 @@ -118,7 +118,9 @@ on success or .Li -1 on an error. .Pp +The .Fa bp +argument is a pointer to previously allocated space that will contain the ancillary data object. It must be large enough to contain all the @@ -127,17 +129,23 @@ individual options to be added by later calls to and .Fn inet6_option_alloc . .Pp +The .Fa cmsgp +argument is a pointer to a pointer to a .Li cmsghdr structure. +The .Fa *cmsgp +argument is initialized by this function to point to the .Li cmsghdr structure constructed by this function in the buffer pointed to by .Fa bp . .Pp +The .Fa type +argument is either .Dv IPV6_HOPOPTS or @@ -161,14 +169,18 @@ if it succeeds or .Li -1 on an error. .Pp +The .Fa cmsg +argument is a pointer to the .Li cmsghdr structure that must have been initialized by .Fn inet6_option_init . .Pp +The .Fa typep +argument is a pointer to the 8-bit option type. It is assumed that this field is immediately followed by the 8-bit option data length field, @@ -198,7 +210,9 @@ and .Li 255 , inclusive, and is the length of the option data that follows. .Pp +The .Fa multx +argument is the value .Li x in the alignment term @@ -210,7 +224,9 @@ It must have a value of or .Li 8 . .Pp +The .Fa plusy +argument is the value .Li y in the alignment term @@ -237,14 +253,18 @@ the ancillary data object while the current function returns a pointer to the space in the data object where the option's TLV must then be built by the caller. .Pp +The .Fa cmsg +argument is a pointer to the .Li cmsghdr structure that must have been initialized by .Fn inet6_option_init . .Pp +The .Fa datalen +argument is the value of the option data length byte for this option. This value is required as an argument to allow the function to determine if padding must be appended at the end of the option. @@ -253,7 +273,9 @@ determine if padding must be appended at the end of the option. function does not need a data length argument since the option data length must already be stored by the caller.) .Pp +The .Fa multx +argument is the value .Li x in the alignment term @@ -265,7 +287,9 @@ It must have a value of or .Li 8 . .Pp +The .Fa plusy +argument is the value .Li y in the alignment term @@ -302,7 +326,9 @@ and is not .Dv NULL . .Pp +The .Fa cmsg +argument is a pointer to .Li cmsghdr structure of which @@ -316,7 +342,9 @@ equals either or .Dv IPV6_DSTOPTS . .Pp +The .Fa tptrp +argument is a pointer to a pointer to an 8-bit byte and .Fa *tptrp is used @@ -339,7 +367,9 @@ This function is similar to the previously described function, except this function lets the caller specify the option type to be searched for, instead of always returning the next option in the ancillary data object. +The .Fa cmsg +argument is a pointer to .Li cmsghdr @@ -354,7 +384,9 @@ equals either or .Dv IPV6_DSTOPTS . .Pp +The .Fa tptrp +argument is a pointer to a pointer to an 8-bit byte and .Fa *tptrp is used diff --git a/lib/libc/net/inet_net.3 b/lib/libc/net/inet_net.3 index 72fc445..9ca00a6 100644 --- a/lib/libc/net/inet_net.3 +++ b/lib/libc/net/inet_net.3 @@ -61,7 +61,9 @@ function converts an Internet network number from network format (usually a .Vt "struct in_addr" or some other binary form, in network byte order) to CIDR presentation format (suitable for external display purposes). +The .Fa bits +argument is the number of bits in .Fa src that are the network number. @@ -90,7 +92,9 @@ The only value for .Fa af currently supported is .Dv AF_INET . +The .Fa size +argument is the size of the result buffer .Fa dst . .Pp diff --git a/lib/libc/net/rcmdsh.3 b/lib/libc/net/rcmdsh.3 index 10d95a2..91b81b9 100644 --- a/lib/libc/net/rcmdsh.3 +++ b/lib/libc/net/rcmdsh.3 @@ -79,8 +79,9 @@ residing at the well-known Internet port .Dq Li shell/tcp (or whatever port is used by .Fa rshprog ) . -The parameter +The .Fa inport +argument is ignored; it is only included to provide an interface similar to .Xr rcmd 3 . .Pp diff --git a/lib/libc/net/resolver.3 b/lib/libc/net/resolver.3 index 60c1193..2a89500 100644 --- a/lib/libc/net/resolver.3 +++ b/lib/libc/net/resolver.3 @@ -292,7 +292,9 @@ but can be any of the query types defined in .Aq Pa arpa/nameser.h . The domain name for the query is given by .Fa dname . -.Fa Newrr +The +.Fa newrr_in +argument is currently unused but is intended for making update messages. .Pp The diff --git a/lib/libc/net/sockatmark.3 b/lib/libc/net/sockatmark.3 index da073c0..61a1a9f 100644 --- a/lib/libc/net/sockatmark.3 +++ b/lib/libc/net/sockatmark.3 @@ -94,10 +94,14 @@ The call fails if: .Bl -tag -width Er .It Bq Er EBADF +The .Fa s +argument is not a valid descriptor. .It Bq Er ENOTTY +The .Fa s +argument is a descriptor for a file, not a socket. .El .Sh SEE ALSO diff --git a/lib/libc/posix1e/mac_set.3 b/lib/libc/posix1e/mac_set.3 index 04ab221..9209775 100644 --- a/lib/libc/posix1e/mac_set.3 +++ b/lib/libc/posix1e/mac_set.3 @@ -87,10 +87,14 @@ or has appropriate privileges. .It Bq Er EACCES MAC write access to the file is denied. .It Bq Er EBADF +The .Fa fd +argument is not a valid file descriptor. .It Bq Er EINVAL +The .Fa label +argument is not a valid MAC label. .It Bq Er EOPNOTSUPP Setting MAC labels is not supported diff --git a/lib/libc/regex/regex.3 b/lib/libc/regex/regex.3 index 22e8447..af7f575 100644 --- a/lib/libc/regex/regex.3 +++ b/lib/libc/regex/regex.3 @@ -110,7 +110,9 @@ and places the results in the .Ft regex_t structure pointed to by .Fa preg . -.Fa Cflags +The +.Fa cflags +argument is the bitwise OR of zero or more of the following flags: .Bl -tag -width REG_EXTENDED .It Dv REG_EXTENDED @@ -669,7 +671,9 @@ The function performance is poor. This will improve with later releases. -.Fa Nmatch +The +.Fa nmatch +argument exceeding 0 is expensive; .Fa nmatch exceeding 1 is worse. diff --git a/lib/libc/rpc/des_crypt.3 b/lib/libc/rpc/des_crypt.3 index 39b927b..b40a62c 100644 --- a/lib/libc/rpc/des_crypt.3 +++ b/lib/libc/rpc/des_crypt.3 @@ -54,23 +54,23 @@ Also, regularities in the clear text will not appear in the cipher text. .Pp Here is how to use these routines. -The first parameter, +The first argument, .Fa key , is the 8-byte encryption key with parity. To set the key's parity, which for .Tn DES is in the low bit of each byte, use .Fn des_setparity . -The second parameter, +The second argument, .Fa data , contains the data to be encrypted or decrypted. The -third parameter, +third argument, .Fa datalen , is the length in bytes of .Fa data , which must be a multiple of 8. -The fourth parameter, +The fourth argument, .Fa mode , is formed by .Em OR Ns 'ing @@ -95,8 +95,9 @@ in software and the routine returns .Er DESERR_NOHWDEVICE . For .Fn cbc_crypt , -the parameter +the .Fa ivec +argument is the 8-byte initialization vector for the chaining. It is updated to the next initialization @@ -110,7 +111,7 @@ Encryption succeeded, but done in software instead of the requested hardware. .It Bq Er DESERR_HWERR An error occurred in the hardware or driver. .It Bq Er DESERR_BADPARAM -Bad parameter to routine. +Bad argument to routine. .El .Pp Given a result status diff --git a/lib/libc/rpc/getnetconfig.3 b/lib/libc/rpc/getnetconfig.3 index 241b946..e67b9bb 100644 --- a/lib/libc/rpc/getnetconfig.3 +++ b/lib/libc/rpc/getnetconfig.3 @@ -58,7 +58,9 @@ function returns .Dv NULL at the end of the file. +The .Fa handlep +argument is the handle obtained through .Fn setnetconfig . .Pp @@ -90,7 +92,9 @@ The .Fn endnetconfig function should be called when processing is complete to release resources for reuse. +The .Fa handlep +argument is the handle obtained through .Fn setnetconfig . Programmers should be aware, however, that the last call to diff --git a/lib/libc/rpc/rpc.3 b/lib/libc/rpc/rpc.3 index 835ae2d..b8688ad 100644 --- a/lib/libc/rpc/rpc.3 +++ b/lib/libc/rpc/rpc.3 @@ -33,7 +33,7 @@ be included. Some of the high-level RPC interface routines take a .Fa nettype -string as one of the parameters +string as one of the arguments (for example, .Fn clnt_create , .Fn svc_create , @@ -42,7 +42,9 @@ string as one of the parameters This string defines a class of transports which can be used for a particular application. .Pp +The .Fa nettype +argument can be one of the following: .Bl -tag -width datagram_v .It netpath diff --git a/lib/libc/rpc/rpc_clnt_auth.3 b/lib/libc/rpc/rpc_clnt_auth.3 index 3a5b5b3..1412c61 100644 --- a/lib/libc/rpc/rpc_clnt_auth.3 +++ b/lib/libc/rpc/rpc_clnt_auth.3 @@ -72,8 +72,9 @@ This is the default authentication used by RPC. Create and return an RPC authentication handle that contains .Dv AUTH_SYS authentication information. -The parameter +The .Fa host +argument is the name of the machine on which the information was created; .Fa uid @@ -87,7 +88,7 @@ refer to a counted array of groups to which the user belongs. .It Fn authsys_create_default Call .Fn authsys_create -with the appropriate parameters. +with the appropriate arguments. .El .Sh SEE ALSO .Xr rpc 3 , diff --git a/lib/libc/rpc/rpc_clnt_calls.3 b/lib/libc/rpc/rpc_clnt_calls.3 index 08435b8..0626d90 100644 --- a/lib/libc/rpc/rpc_clnt_calls.3 +++ b/lib/libc/rpc/rpc_clnt_calls.3 @@ -77,7 +77,7 @@ The remaining routines deal with error handling in the case of errors. .Pp Some of the routines take a .Vt CLIENT -handle as one of the parameters. +handle as one of the arguments. A .Vt CLIENT handle can be created by an RPC creation routine such as @@ -107,16 +107,19 @@ client creation routine such as .Fn clnt_create (see .Xr rpc_clnt_create 3 ) . -The parameter +The .Fa inproc -is the XDR function used to encode the procedure's parameters, and +argument +is the XDR function used to encode the procedure's arguments, and .Fa outproc is the XDR function used to decode the procedure's results; .Fa in is the address of the procedure's argument(s), and .Fa out is the address of where to place the result(s). +The .Fa tout +argument is the time allowed for results to be returned, which is overridden by a time-out set explicitly through .Fn clnt_control , @@ -128,8 +131,9 @@ otherwise an appropriate status is returned. .It Fn clnt_freeres A function macro that frees any data allocated by the RPC/XDR system when it decoded the results of an RPC call. -The parameter +The .Fa out +argument is the address of the results, and .Fa outproc is the XDR routine describing the results. @@ -257,7 +261,9 @@ except that the initial timeout, and the maximum timeout, .Fa waittime are specified in milliseconds. +The .Fa inittime +argument is the initial time that .Fn rpc_broadcast_exp waits before resending the request. @@ -272,16 +278,19 @@ and .Fa procnum on the machine, .Fa host . -The parameter +The .Fa inproc -is used to encode the procedure's parameters, and +argument +is used to encode the procedure's arguments, and .Fa outproc is used to decode the procedure's results; .Fa in is the address of the procedure's argument(s), and .Fa out is the address of where to place the result(s). +The .Fa nettype +argument can be any of the values listed on .Xr rpc 3 . This routine returns diff --git a/lib/libc/rpc/rpc_clnt_create.3 b/lib/libc/rpc/rpc_clnt_create.3 index ca6f92e..c083c6f 100644 --- a/lib/libc/rpc/rpc_clnt_create.3 +++ b/lib/libc/rpc/rpc_clnt_create.3 @@ -73,7 +73,9 @@ to perform the requested service, and then sends a reply. .It Fn clnt_control A function macro to change or retrieve various information about a client object. +The .Fa req +argument indicates the type of operation, and .Fa info is a pointer to the information. @@ -98,7 +100,7 @@ If you set the timeout value to 0, .Fn clnt_control immediately returns an error .Pq Dv RPC_TIMEDOUT . -Set the timeout parameter to 0 for batching calls. +Set the timeout argument to 0 for batching calls. .Bl -column CLSET_FD_NCLOSE "struct timeval *" "do not close fd on destroy" .It Dv CLGET_SVC_ADDR Ta "struct netbuf *" Ta "get servers address" .It Dv CLGET_FD Ta "int *" Ta "get fd from handle" @@ -132,10 +134,14 @@ Generic client creation routine for program .Fa prognum and version .Fa versnum . +The .Fa host +argument identifies the name of the remote host where the server is located. +The .Fa nettype +argument indicates the class of transport protocol to use. The transports are tried in left to right order in .Ev NETPATH @@ -174,7 +180,7 @@ later (see .It Fn clnt_create_timed Generic client creation routine which is similar to .Fn clnt_create -but which also has the additional parameter +but which also has the additional argument .Fa timeout that specifies the maximum amount of time allowed for each transport class tried. @@ -188,10 +194,14 @@ Generic client creation routine which is similar to .Fn clnt_create but which also checks for the version availability. +The .Fa host +argument identifies the name of the remote host where the server is located. +The .Fa nettype +argument indicates the class transport protocols to be used. If the routine is successful it returns a client handle created for the highest version between @@ -199,7 +209,9 @@ the highest version between and .Fa vers_high that is supported by the server. +The .Fa vers_outp +argument is set to this value. That is, after a successful return .Fa vers_low @@ -241,7 +253,7 @@ the range supplied is supported by the server. .It Fn clnt_create_vers_timed Generic client creation routine which is similar to .Fn clnt_create_vers -but which also has the additional parameter +but which also has the additional argument .Fa timeout that specifies the maximum amount of time allowed for each transport class tried. @@ -281,8 +293,9 @@ and version the client uses a connectionless transport. The remote program is located at address .Fa svcaddr . -The parameter +The .Fa fildes +argument is an open and bound file descriptor. This routine will resend the call message in intervals of 15 seconds until a response is received or until the @@ -297,10 +310,11 @@ The retry time out and the total time out periods can be changed using .Fn clnt_control . The user may set the size of the send and receive -buffers with the parameters +buffers with the .Fa sendsz and -.Fa recvsz ; +.Fa recvsz +arguments; values of 0 choose suitable defaults. This routine returns .Dv NULL @@ -365,7 +379,9 @@ is .Dv NULL , .Dv RPC_UNKNOWNADDR error is set. +The .Fa fildes +argument is a file descriptor which may be open, bound and connected. If it is .Dv RPC_ANYFD , @@ -385,10 +401,11 @@ error is set. If .Fa fildes is unbound, then it will attempt to bind the descriptor. -The user may specify the size of the buffers with the parameters +The user may specify the size of the buffers with the .Fa sendsz and -.Fa recvsz ; +.Fa recvsz +arguments; values of 0 choose suitable defaults. Depending upon the type of the transport (connection-oriented or connectionless), @@ -439,7 +456,7 @@ Like .Fn clnt_tp_create except .Fn clnt_tp_create_timed -has the extra parameter +has the extra argument .Fa timeout which specifies the maximum time allowed for for the creation attempt to succeed. @@ -457,14 +474,16 @@ and version the client uses a connection-oriented transport. The remote program is located at address .Fa svcaddr . -The parameter +The .Fa fildes +argument is an open and bound file descriptor. The user may specify the size of the send and receive buffers -with the parameters +with the .Fa sendsz and -.Fa recvsz ; +.Fa recvsz +arguments; values of 0 choose suitable defaults. This routine returns .Dv NULL diff --git a/lib/libc/rpc/rpc_secure.3 b/lib/libc/rpc/rpc_secure.3 index 27b9870..559cb6b 100644 --- a/lib/libc/rpc/rpc_secure.3 +++ b/lib/libc/rpc/rpc_secure.3 @@ -68,7 +68,7 @@ The function, used on the client side, returns an authentication handle that will enable the use of the secure authentication system. -The first parameter +The first argument .Fa name is the network name, or .Fa netname , @@ -86,7 +86,7 @@ window is more secure than a large one, but choosing too small of a window will increase the frequency of resynchronizations because of clock drift. The third -parameter +argument .Fa addr is optional. If it is .Dv NULL , @@ -98,11 +98,11 @@ is supplied, however, then the system will use the address for consulting the remote time service whenever resynchronization is required. -This parameter is usually the +This argument is usually the address of the .Tn RPC server itself. -The final parameter +The final argument .Fa ckey is also optional. If it is .Dv NULL , diff --git a/lib/libc/rpc/rpc_soc.3 b/lib/libc/rpc/rpc_soc.3 index 5bf4099..453c45d 100644 --- a/lib/libc/rpc/rpc_soc.3 +++ b/lib/libc/rpc/rpc_soc.3 @@ -156,8 +156,9 @@ Create and return an authentication handle that contains .Ux authentication information. -The parameter +The .Fa host +argument is the name of the machine on which the information was created; .Fa uid @@ -179,7 +180,7 @@ It is easy to impersonate a user. .Pp Calls .Fn authunix_create -with the appropriate parameters. +with the appropriate arguments. .Pp .It Xo .Ft int @@ -202,13 +203,14 @@ and .Fa procnum on the machine .Fa host . -The parameter +The .Fa in +argument is the address of the procedure's argument(s), and .Fa out is the address of where to place the result(s); .Fa inproc -is used to encode the procedure's parameters, and +is used to encode the procedure's arguments, and .Fa outproc is used to decode the procedure's results. This routine returns zero if it succeeds, or the value of @@ -300,13 +302,14 @@ which is obtained with an .Tn RPC client creation routine such as .Fn clnt_create . -The parameter +The .Fa in +argument is the address of the procedure's argument(s), and .Fa out is the address of where to place the result(s); .Fa inproc -is used to encode the procedure's parameters, and +is used to encode the procedure's arguments, and .Fa outproc is used to decode the procedure's results; .Fa tout @@ -341,10 +344,14 @@ Otherwise, the socket remains open. .Xc .Pp Generic client creation routine. +The .Fa host +argument identifies the name of the remote host where the server is located. +The .Fa proto +argument indicates which kind of transport protocol to use. The currently supported values for this field are @@ -373,7 +380,9 @@ large arguments or return huge results. .Pp A macro used to change or retrieve various information about a client object. +The .Fa req +argument indicates the type of operation, and .Fa info is a pointer to the information. @@ -395,7 +404,7 @@ and their argument types and what they do are: .Pp Note: if you set the timeout using .Fn clnt_control , -the timeout parameter passed to +the timeout argument passed to .Fn clnt_call will be ignored in all future calls. .Bl -column "CLSET_RETRY_TIMEOUT" "struct sockaddr_in" @@ -431,8 +440,9 @@ A macro that frees any data allocated by the system when it decoded the results of an .Tn RPC call. -The parameter +The .Fa out +argument is the address of the results, and .Fa outproc is the @@ -637,8 +647,9 @@ is zero, then it is set to the actual port that the remote program is listening on (the remote .Xr rpcbind 8 service is consulted for this information). -The parameter +The .Fa sockp +argument is a socket; if it is .Dv RPC_ANYSOCK , then this routine opens a new one and sets @@ -649,10 +660,11 @@ Since uses buffered .Tn I/O , the user may specify the size of the send and receive buffers -with the parameters +with the .Fa sendsz and -.Fa recvsz ; +.Fa recvsz +arguments; values of zero choose suitable defaults. This routine returns .Dv NULL @@ -689,8 +701,9 @@ is zero, then it is set to actual port that the remote program is listening on (the remote .Xr rpcbind 8 service is consulted for this information). -The parameter +The .Fa sockp +argument is a socket; if it is .Dv RPC_ANYSOCK , then this routine opens a new one and sets @@ -744,8 +757,9 @@ is zero, then it is set to actual port that the remote program is listening on (the remote .Xr rpcbind 8 service is consulted for this information). -The parameter +The .Fa sockp +argument is a socket; if it is .Dv RPC_ANYSOCK , then this routine opens a new one and sets @@ -791,8 +805,9 @@ the client uses sockets as a transport. The local program is located at the .Fa *raddr . -The parameter +The .Fa sockp +argument is a socket; if it is .Dv RPC_ANYSOCK , then this routine opens a new one and sets @@ -803,10 +818,11 @@ Since uses buffered .Tn I/O , the user may specify the size of the send and receive buffers -with the parameters +with the .Fa sendsz and -.Fa recvsz ; +.Fa recvsz +arguments; values of zero choose suitable defaults. This routine returns .Dv NULL @@ -920,12 +936,13 @@ address to make an .Tn RPC call on your behalf to a procedure on that host. -The parameter +The .Fa portp +argument will be modified to the program's port number if the procedure succeeds. -The definitions of other parameters are discussed +The definitions of other arguments are discussed in .Fn callrpc and @@ -1002,11 +1019,11 @@ version and procedure .Fa procnum , .Fa procname -is called with a pointer to its parameter(s); +is called with a pointer to its argument(s); .Fa progname should return a pointer to its static result(s); .Fa inproc -is used to decode the parameters while +is used to decode the arguments while .Fa outproc is used to encode the results. This routine returns zero if the registration succeeded, \-1 @@ -1055,7 +1072,7 @@ is undefined after calling this routine. A global variable reflecting the .Tn RPC service side's -read file descriptor bit mask; it is suitable as a template parameter +read file descriptor bit mask; it is suitable as a template argument to the .Xr select 2 system call. @@ -1112,8 +1129,9 @@ associated with the .Tn RPC service transport handle, .Fa xprt . -The parameter +The .Fa in +argument is the address where the arguments will be placed; .Fa inproc is the @@ -1241,8 +1259,9 @@ Called by an .Tn RPC service's dispatch routine to send the results of a remote procedure call. -The parameter +The .Fa xprt +argument is the request's associated transport handle; .Fa outproc is the @@ -1283,7 +1302,7 @@ a remote procedure call due to an authentication error. .Xc .Pp Called by a service dispatch routine that cannot successfully -decode its parameters. +decode its arguments. See also .Fn svc_getargs . .Pp @@ -1344,7 +1363,7 @@ it may call this routine. .Pp Called by a service dispatch routine that refuses to perform a remote procedure call due to insufficient -authentication parameters. +authentication arguments. The routine calls .Fn svcerr_auth xprt AUTH_TOOWEAK . .Pp @@ -1427,7 +1446,9 @@ The transport is associated with the socket which may be .Dv RPC_ANYSOCK , in which case a new socket is created. +The .Fa *path +argument is a variable-length file system pathname of at most 104 characters. This file is @@ -1457,9 +1478,11 @@ choose suitable defaults. .Xc .Pp Create a service on top of any open descriptor. +The .Fa sendsize and .Fa recvsize +arguments indicate sizes for the send and receive buffers. If they are zero, a reasonable default is chosen. @@ -1477,9 +1500,11 @@ this descriptor is a connected socket for a stream protocol such as .Tn TCP . +The .Fa sendsize and .Fa recvsize +arguments indicate sizes for the send and receive buffers. If they are zero, a reasonable default is chosen. @@ -1600,11 +1625,11 @@ package. .Fn xdr_pmap "XDR *xdrs" "struct pmap *regs" .Xc .Pp -Used for describing parameters to various +Used for describing arguments to various .Xr rpcbind 8 procedures, externally. This routine is useful for users who wish to generate -these parameters without using the +these arguments without using the .Fn pmap_* interface. .Pp @@ -1615,7 +1640,7 @@ interface. .Pp Used for describing a list of port mappings, externally. This routine is useful for users who wish to generate -these parameters without using the +these arguments without using the .Fn pmap_* interface. .Pp diff --git a/lib/libc/rpc/rpc_svc_calls.3 b/lib/libc/rpc/rpc_svc_calls.3 index 82b82aa..1569d76 100644 --- a/lib/libc/rpc/rpc_svc_calls.3 +++ b/lib/libc/rpc/rpc_svc_calls.3 @@ -111,7 +111,7 @@ has global scope and ends all RPC server activity. .Vt fd_set Va svc_fdset .Xc A global variable reflecting the -RPC server's read file descriptor bit mask; it is suitable as a parameter +RPC server's read file descriptor bit mask; it is suitable as a argument to the .Xr select 2 system call. @@ -140,8 +140,9 @@ A function macro that decodes the arguments of an RPC request associated with the RPC service transport handle .Fa xprt . -The parameter +The .Fa in +argument is the address where the arguments will be placed; .Fa inproc is the XDR @@ -217,7 +218,7 @@ is an array of .Vt pollfd structures derived from .Va svc_fdset[] . -It is suitable as a parameter to the +It is suitable as an argument to the .Xr poll 2 system call. The derivation of @@ -242,8 +243,9 @@ system call to return. .It Fn svc_sendreply Called by an RPC service's dispatch routine to send the results of a remote procedure call. -The parameter +The .Fa xprt +argument is the request's associated transport handle; .Fa outproc is the XDR diff --git a/lib/libc/rpc/rpc_svc_create.3 b/lib/libc/rpc/rpc_svc_create.3 index 23c0053..b1efa3a 100644 --- a/lib/libc/rpc/rpc_svc_create.3 +++ b/lib/libc/rpc/rpc_svc_create.3 @@ -57,7 +57,9 @@ data structure. .It Fn svc_control A function to change or retrieve various information about a service object. +The .Fa req +argument indicates the type of operation and .Fa info is a pointer to the information. @@ -73,7 +75,9 @@ an .Dv RPC_PROGVERSMISMATCH error will normally be returned. +The .Fa info +argument should be a pointer to an integer. Upon successful completion of the @@ -98,7 +102,9 @@ error will normally be returned. It is sometimes desirable to change this behavior. +The .Fa info +argument should be a pointer to an integer which is either 0 (indicating normal server behavior - an @@ -114,7 +120,9 @@ function creates server handles for all the transports belonging to the class .Fa nettype . +The .Fa nettype +argument defines a class of transports which can be used for a particular application. The transports are tried in left to right order in @@ -133,7 +141,9 @@ function registers itself with the rpcbind service (see .Xr rpcbind 8 ) . +The .Fa dispatch +function is called when there is a remote procedure call for the given .Fa prognum and @@ -167,10 +177,12 @@ service handle, and returns a pointer to it. This routine returns .Dv NULL if it fails, and an error message is logged. +The .Fa sendsz and .Fa recvsz -are parameters used to specify the size of the buffers. +arguments +are arguments used to specify the size of the buffers. If they are 0, suitable defaults are chosen. The file descriptor .Fa fildes @@ -188,9 +200,11 @@ This routine creates a service on top of an open and bound file descriptor, and returns the handle to it. Typically, this descriptor is a connected file descriptor for a connection-oriented transport. +The .Fa sendsz and .Fa recvsz +arguments indicate sizes for the send and receive buffers. If they are 0, reasonable defaults are chosen. This routine returns @@ -219,7 +233,9 @@ should not be called when the raw interface is being used. .It Fn svc_tli_create This routine creates an RPC server handle, and returns a pointer to it. +The .Fa fildes +argument is the file descriptor on which the service is listening. If .Fa fildes @@ -257,7 +273,7 @@ In the case where the default address is chosen, the number of outstanding connect requests is set to 8 for connection-oriented transports. The user may specify the size of the send and receive buffers -with the parameters +with the arguments .Fa sendsz and .Fa recvsz ; @@ -277,7 +293,9 @@ creates a server handle for the network specified by .Fa netconf , and registers itself with the rpcbind service. +The .Fa dispatch +function is called when there is a remote procedure call for the given .Fa prognum @@ -299,7 +317,7 @@ This routine returns .Dv NULL if it fails, and an error message is logged. The users may specify the size of the send and receive buffers -with the parameters +with the arguments .Fa sendsz and .Fa recvsz ; diff --git a/lib/libc/rpc/rpc_svc_err.3 b/lib/libc/rpc/rpc_svc_err.3 index 039501f..6e26b1a 100644 --- a/lib/libc/rpc/rpc_svc_err.3 +++ b/lib/libc/rpc/rpc_svc_err.3 @@ -55,7 +55,7 @@ Called by a service dispatch routine that refuses to perform a remote procedure call due to an authentication error. .It Fn svcerr_decode Called by a service dispatch routine that cannot successfully -decode the remote parameters +decode the remote arguments (see .Fn svc_getargs in @@ -70,7 +70,9 @@ Service implementors usually do not need this routine. .It Fn svcerr_progvers Called when the desired version of a program is not registered with the RPC package. +The .Fa low_vers +argument is the lowest version number, and .Fa high_vers @@ -84,7 +86,7 @@ it may call this routine. .It Fn svcerr_weakauth Called by a service dispatch routine that refuses to perform a remote procedure call due to insufficient (but correct) -authentication parameters. +authentication arguments. The routine calls .Fn svcerr_auth "xprt" "AUTH_TOOWEAK" . .El diff --git a/lib/libc/rpc/rpc_svc_reg.3 b/lib/libc/rpc/rpc_svc_reg.3 index 2804bf0..95756db 100644 --- a/lib/libc/rpc/rpc_svc_reg.3 +++ b/lib/libc/rpc/rpc_svc_reg.3 @@ -65,11 +65,11 @@ version and procedure .Fa procnum , .Fa procname -is called with a pointer to its parameter(s); +is called with a pointer to its argument(s); .Fa procname should return a pointer to its static result(s); .Fa inproc -is the XDR function used to decode the parameters while +is the XDR function used to decode the arguments while .Fa outproc is the XDR function used to encode the results. Procedures are registered on all available transports of the class @@ -135,7 +135,7 @@ When needed to process an RPC credential of type .Fa cred_flavor , the .Fa handler -procedure will be called with two parameters, +procedure will be called with two arguments, .Fa "struct svc_req *rqst" and .Fa "struct rpc_msg *msg" , diff --git a/lib/libc/rpc/rpcbind.3 b/lib/libc/rpc/rpcbind.3 index d9ccaaf..b90d461 100644 --- a/lib/libc/rpc/rpcbind.3 +++ b/lib/libc/rpc/rpcbind.3 @@ -64,7 +64,9 @@ and speaks the transport protocol associated with .Fa netconf . The address found is returned in .Fa svcaddr . +The .Fa svcaddr +argument should be preallocated. This routine returns .Dv TRUE @@ -111,8 +113,9 @@ call on your behalf to a procedure on that host. The .Fn netconfig structure should correspond to a connectionless transport. -The parameter +The .Fa svcaddr +argument will be modified to the server's address if the procedure succeeds (see .Fn rpc_call @@ -120,7 +123,7 @@ and .Fn clnt_call in .Xr rpc_clnt_calls 3 -for the definitions of other parameters). +for the definitions of other arguments). .Pp This procedure should normally be used for a .Dq ping diff --git a/lib/libc/rpc/rtime.3 b/lib/libc/rpc/rtime.3 index 5e85e9c..028d2be 100644 --- a/lib/libc/rpc/rtime.3 +++ b/lib/libc/rpc/rtime.3 @@ -34,7 +34,7 @@ Normally, the protocol is used when consulting the Time Server. The .Fa timeout -parameter specifies how long the +argument specifies how long the routine should wait before giving up when waiting for a reply. If diff --git a/lib/libc/stdio/fflush.3 b/lib/libc/stdio/fflush.3 index 35ccd45..e57fc37 100644 --- a/lib/libc/stdio/fflush.3 +++ b/lib/libc/stdio/fflush.3 @@ -88,7 +88,9 @@ is set to indicate the error. .Sh ERRORS .Bl -tag -width Er .It Bq Er EBADF -.Fa Stream +The +.Fa stream +argument is not an open stream, or, in the case of .Fn fflush , not a stream open for writing. diff --git a/lib/libc/stdio/fopen.3 b/lib/libc/stdio/fopen.3 index 502a049..eb39376 100644 --- a/lib/libc/stdio/fopen.3 +++ b/lib/libc/stdio/fopen.3 @@ -137,8 +137,7 @@ The .Fn fdopen function associates a stream with the existing file descriptor, .Fa fildes . -The -.Fa mode +The mode of the stream must be compatible with the mode of the file descriptor. When the stream is closed via .Xr fclose 3 , @@ -186,7 +185,8 @@ is set to indicate the error. .It Bq Er EINVAL The .Fa mode -provided to +argument +to .Fn fopen , .Fn fdopen , or diff --git a/lib/libc/stdio/fputs.3 b/lib/libc/stdio/fputs.3 index c51213d..3ce20b2 100644 --- a/lib/libc/stdio/fputs.3 +++ b/lib/libc/stdio/fputs.3 @@ -85,7 +85,7 @@ on error. .It Bq Er EBADF The .Fa stream -supplied +argument is not a writable stream. .El .Pp diff --git a/lib/libc/stdio/fseek.3 b/lib/libc/stdio/fseek.3 index 6481fe6..41493be 100644 --- a/lib/libc/stdio/fseek.3 +++ b/lib/libc/stdio/fseek.3 @@ -193,7 +193,7 @@ is set to indicate the error. .It Bq Er EBADF The .Fa stream -specified +argument is not a seekable stream. .It Bq Er EINVAL The diff --git a/lib/libc/stdio/setbuf.3 b/lib/libc/stdio/setbuf.3 index d10b5bc..0342149 100644 --- a/lib/libc/stdio/setbuf.3 +++ b/lib/libc/stdio/setbuf.3 @@ -94,7 +94,7 @@ function may be used to alter the buffering behavior of a stream. The .Fa mode -parameter must be one of the following three macros: +argument must be one of the following three macros: .Bl -tag -width _IOFBF -offset indent .It Dv _IONBF unbuffered @@ -106,7 +106,7 @@ fully buffered .Pp The .Fa size -parameter may be given as zero +argument may be given as zero to obtain deferred optimal-size buffer allocation as usual. If it is not zero, then except for unbuffered files, the diff --git a/lib/libc/stdlib/lsearch.3 b/lib/libc/stdlib/lsearch.3 index 4eecb1e..e3a324c 100644 --- a/lib/libc/stdlib/lsearch.3 +++ b/lib/libc/stdlib/lsearch.3 @@ -37,7 +37,9 @@ and functions walk linearly through an array and compare each element with the one to be sought using a supplied comparison function. .Pp +The .Fa key +argument points to an element that matches the one that is searched. The array's address in memory is denoted by the .Fa base diff --git a/lib/libc/stdlib/tsearch.3 b/lib/libc/stdlib/tsearch.3 index ac6d841..0c7f1bd 100644 --- a/lib/libc/stdlib/tsearch.3 +++ b/lib/libc/stdlib/tsearch.3 @@ -97,7 +97,9 @@ walks the binary search tree rooted in and calls the function .Fa action on each node. -.Fa Action +The +.Fa action +function is called with three arguments: a pointer to the current node, a value from the enum .Sy "typedef enum { preorder, postorder, endorder, leaf } VISIT;" diff --git a/lib/libc/string/strcpy.3 b/lib/libc/string/strcpy.3 index 1ee2beb..f40e792 100644 --- a/lib/libc/string/strcpy.3 +++ b/lib/libc/string/strcpy.3 @@ -130,7 +130,7 @@ Note that it does terminate .Va chararray because the length of the source string is greater than or equal -to the length parameter. +to the length argument. .Pp The following copies as many characters from .Va input diff --git a/lib/libc/sys/accept.2 b/lib/libc/sys/accept.2 index b0adcbd..2f86735 100644 --- a/lib/libc/sys/accept.2 +++ b/lib/libc/sys/accept.2 @@ -79,16 +79,17 @@ remains open. .Pp The argument .Fa addr -is a result parameter that is filled-in with +is a result argument that is filled-in with the address of the connecting entity, as known to the communications layer. The exact format of the .Fa addr -parameter is determined by the domain in which the communication +argument is determined by the domain in which the communication is occurring. The .Fa addrlen -is a value-result parameter; it should initially contain the +argument +is a value-result argument; it should initially contain the amount of space pointed to by .Fa addr ; on return it will contain the actual length (in bytes) of the @@ -145,7 +146,7 @@ has not been called on the socket descriptor. .It Bq Er EFAULT The .Fa addr -parameter is not in a writable part of the +argument is not in a writable part of the user address space. .It Bq Er EWOULDBLOCK The socket is marked non-blocking and no connections diff --git a/lib/libc/sys/access.2 b/lib/libc/sys/access.2 index 0d3611a..94e7831 100644 --- a/lib/libc/sys/access.2 +++ b/lib/libc/sys/access.2 @@ -122,7 +122,9 @@ Permission bits of the file mode do not permit the requested access, or search permission is denied on a component of the path prefix. .It Bq Er EFAULT +The .Fa path +argument points outside the process's allocated address space. .It Bq Er EIO An I/O error occurred while reading from or writing to the file system. diff --git a/lib/libc/sys/acct.2 b/lib/libc/sys/acct.2 index 7db84c8..2786fe4 100644 --- a/lib/libc/sys/acct.2 +++ b/lib/libc/sys/acct.2 @@ -103,7 +103,9 @@ Too many symbolic links were encountered in translating the pathname. .It Bq Er EROFS The named file resides on a read-only file system. .It Bq Er EFAULT -.Fa File +The +.Fa file +argument points outside the process's allocated address space. .It Bq Er EIO An I/O error occurred while reading from or writing to the file system. diff --git a/lib/libc/sys/aio_cancel.2 b/lib/libc/sys/aio_cancel.2 index 7f2399b..c9c5b04 100644 --- a/lib/libc/sys/aio_cancel.2 +++ b/lib/libc/sys/aio_cancel.2 @@ -78,7 +78,9 @@ An error return from indicates: .Bl -tag -width Er .It Bq Er EBADF +The .Fa fildes +argument is an invalid file descriptor. .El .Sh SEE ALSO diff --git a/lib/libc/sys/aio_error.2 b/lib/libc/sys/aio_error.2 index 444e281..0d1e1de 100644 --- a/lib/libc/sys/aio_error.2 +++ b/lib/libc/sys/aio_error.2 @@ -67,7 +67,9 @@ The system call will fail if: .Bl -tag -width Er .It Bq Er EINVAL +The .Fa iocb +argument does not reference an outstanding asynchronous I/O request. .El .Sh SEE ALSO diff --git a/lib/libc/sys/aio_read.2 b/lib/libc/sys/aio_read.2 index 8090963..c52629e 100644 --- a/lib/libc/sys/aio_read.2 +++ b/lib/libc/sys/aio_read.2 @@ -59,6 +59,7 @@ of the calling process minus .Pp The .Fa iocb->aio_lio_opcode +argument is ignored by the .Fn aio_read system call. @@ -137,7 +138,9 @@ returned in .Pp .Bl -tag -width Er .It Bq Er EBADF +The .Fa iocb->aio_fildes +argument is invalid. .It Bq Er EINVAL The offset @@ -169,7 +172,9 @@ system call is either one of the error returns from the system call, or one of: .Bl -tag -width Er .It Bq Er EBADF +The .Fa iocb->aio_fildes +argument is invalid for reading. .It Bq Er ECANCELED The request was explicitly cancelled via a call to diff --git a/lib/libc/sys/aio_return.2 b/lib/libc/sys/aio_return.2 index b12b787..07bc0ae 100644 --- a/lib/libc/sys/aio_return.2 +++ b/lib/libc/sys/aio_return.2 @@ -71,7 +71,9 @@ The system call will fail if: .Bl -tag -width Er .It Bq Er EINVAL +The .Fa iocb +argument does not reference an outstanding asynchronous I/O request. .El .Sh SEE ALSO diff --git a/lib/libc/sys/aio_suspend.2 b/lib/libc/sys/aio_suspend.2 index 7c88bf8..d8e74a9 100644 --- a/lib/libc/sys/aio_suspend.2 +++ b/lib/libc/sys/aio_suspend.2 @@ -45,7 +45,9 @@ delivered, or the .Fa timeout has passed. .Pp +The .Fa iocbs +argument is an array of .Fa niocb pointers to asynchronous I/O requests. Array members containing @@ -77,7 +79,9 @@ the .Fa timeout expired before any I/O requests completed. .It Bq Er EINVAL +The .Fa iocbs +argument contains more than .Dv AIO_LISTIO_MAX asynchronous I/O requests, or at least one of the requests is not diff --git a/lib/libc/sys/aio_write.2 b/lib/libc/sys/aio_write.2 index 9858ea9..7148c7f 100644 --- a/lib/libc/sys/aio_write.2 +++ b/lib/libc/sys/aio_write.2 @@ -139,7 +139,9 @@ returned in .Pp .Bl -tag -width Er .It Bq Er EBADF +The .Fa iocb->aio_fildes +argument is invalid, or is not opened for writing. .It Bq Er EINVAL The offset @@ -163,7 +165,9 @@ system call is either one of the error returns from the system call, or one of: .Bl -tag -width Er .It Bq Er EBADF +The .Fa iocb->aio_fildes +argument is invalid for writing. .It Bq Er ECANCELED The request was explicitly canceled via a call to diff --git a/lib/libc/sys/bind.2 b/lib/libc/sys/bind.2 index 33e228c..9cad897 100644 --- a/lib/libc/sys/bind.2 +++ b/lib/libc/sys/bind.2 @@ -82,10 +82,14 @@ system call will fail if: Kernel resources to complete the request are temporarily unavailable. .It Bq Er EBADF -.Fa S +The +.Fa s +argument is not a valid descriptor. .It Bq Er ENOTSOCK -.Fa S +The +.Fa s +argument is not a socket. .It Bq Er EADDRNOTAVAIL The specified address is not available from the local machine. @@ -97,7 +101,7 @@ has inadequate permission to access it. .It Bq Er EFAULT The .Fa addr -parameter is not in a valid part of the user +argument is not in a valid part of the user address space. .El .Pp diff --git a/lib/libc/sys/chdir.2 b/lib/libc/sys/chdir.2 index 373892b..8e8214e 100644 --- a/lib/libc/sys/chdir.2 +++ b/lib/libc/sys/chdir.2 @@ -94,7 +94,9 @@ Too many symbolic links were encountered in translating the pathname. Search permission is denied for any component of the path name. .It Bq Er EFAULT -.Fa Path +The +.Fa path +argument points outside the process's allocated address space. .It Bq Er EIO An I/O error occurred while reading from or writing to the file system. diff --git a/lib/libc/sys/chflags.2 b/lib/libc/sys/chflags.2 index 70e3d89..f80e671 100644 --- a/lib/libc/sys/chflags.2 +++ b/lib/libc/sys/chflags.2 @@ -142,7 +142,9 @@ the effective user ID is not the super-user. .It Bq Er EROFS The named file resides on a read-only file system. .It Bq Er EFAULT -.Fa Path +The +.Fa path +argument points outside the process's allocated address space. .It Bq Er EIO An @@ -159,7 +161,9 @@ system call will fail if: .It Bq Er EBADF The descriptor is not valid. .It Bq Er EINVAL +The .Fa fd +argument refers to a socket, not to a file. .It Bq Er EPERM The effective user ID does not match the owner of the file and diff --git a/lib/libc/sys/chmod.2 b/lib/libc/sys/chmod.2 index 8c92be2..e703df1 100644 --- a/lib/libc/sys/chmod.2 +++ b/lib/libc/sys/chmod.2 @@ -181,7 +181,9 @@ the effective user ID is not the super-user. .It Bq Er EROFS The named file resides on a read-only file system. .It Bq Er EFAULT -.Fa Path +The +.Fa path +argument points outside the process's allocated address space. .It Bq Er EIO An I/O error occurred while reading from or writing to the file system. @@ -196,7 +198,9 @@ system call will fail if: .It Bq Er EBADF The descriptor is not valid. .It Bq Er EINVAL +The .Fa fd +argument refers to a socket, not to a file. .It Bq Er EROFS The file resides on a read-only file system. diff --git a/lib/libc/sys/chown.2 b/lib/libc/sys/chown.2 index d663776..555ee38 100644 --- a/lib/libc/sys/chown.2 +++ b/lib/libc/sys/chown.2 @@ -122,7 +122,9 @@ The effective user ID is not the super-user. .It Bq Er EROFS The named file resides on a read-only file system. .It Bq Er EFAULT -.Fa Path +The +.Fa path +argument points outside the process's allocated address space. .It Bq Er EIO An I/O error occurred while reading from or writing to the file system. @@ -133,10 +135,14 @@ The system call will fail if: .Bl -tag -width Er .It Bq Er EBADF +The .Fa fd +argument does not refer to a valid descriptor. .It Bq Er EINVAL +The .Fa fd +argument refers to a socket, not a file. .It Bq Er EPERM The effective user ID is not the super-user. diff --git a/lib/libc/sys/chroot.2 b/lib/libc/sys/chroot.2 index 78bdfb6..148bcd5 100644 --- a/lib/libc/sys/chroot.2 +++ b/lib/libc/sys/chroot.2 @@ -45,7 +45,9 @@ .Ft int .Fn chroot "const char *dirname" .Sh DESCRIPTION -.Fa Dirname +The +.Fa dirname +argument is the address of the pathname of a directory, terminated by an ASCII NUL. The .Fn chroot @@ -120,7 +122,9 @@ Search permission is denied for any component of the path name. .It Bq Er ELOOP Too many symbolic links were encountered in translating the pathname. .It Bq Er EFAULT +The .Fa dirname +argument points outside the process's allocated address space. .It Bq Er EIO An I/O error occurred while reading from or writing to the file system. diff --git a/lib/libc/sys/clock_gettime.2 b/lib/libc/sys/clock_gettime.2 index 0e41168..f6ee311 100644 --- a/lib/libc/sys/clock_gettime.2 +++ b/lib/libc/sys/clock_gettime.2 @@ -60,7 +60,9 @@ allow the calling process to retrieve or set the value used by a clock which is specifed by .Fa clock_id . .Pp +The .Fa clock_id +argument can be one of three values: CLOCK_REALTIME for time that increments as a wall clock should, CLOCK_VIRTUAL for time that increments only when the CPU is running in user mode on behalf of the calling process, or @@ -103,6 +105,7 @@ The following error codes may be set in .It Bq Er EINVAL The .Fa clock_id +argument was not a valid value. .It Bq Er EFAULT The diff --git a/lib/libc/sys/close.2 b/lib/libc/sys/close.2 index 16abee5..16b3ff9 100644 --- a/lib/libc/sys/close.2 +++ b/lib/libc/sys/close.2 @@ -109,7 +109,9 @@ The system call will fail if: .Bl -tag -width Er .It Bq Er EBADF -.Fa D +The +.Fa d +argument is not an active descriptor. .It Bq Er EINTR An interrupt was received. diff --git a/lib/libc/sys/connect.2 b/lib/libc/sys/connect.2 index 79ab4f9..dc91aef 100644 --- a/lib/libc/sys/connect.2 +++ b/lib/libc/sys/connect.2 @@ -46,8 +46,9 @@ .Ft int .Fn connect "int s" "const struct sockaddr *name" "socklen_t namelen" .Sh DESCRIPTION -The parameter +The .Fa s +argument is a socket. If it is of type .Dv SOCK_DGRAM , @@ -63,7 +64,7 @@ The other socket is specified by which is an address in the communications space of the socket. Each communications space interprets the .Fa name -parameter in its own way. +argument in its own way. Generally, stream sockets may successfully .Fn connect only once; datagram sockets may use @@ -79,10 +80,14 @@ The system call fails if: .Bl -tag -width Er .It Bq Er EBADF +The .Fa s +argument is not a valid descriptor. .It Bq Er ENOTSOCK +The .Fa s +argument is a descriptor for a file, not a socket. .It Bq Er EADDRNOTAVAIL The specified address is not available on this machine. @@ -101,7 +106,7 @@ The address is already in use. .It Bq Er EFAULT The .Fa name -parameter specifies an area outside +argument specifies an area outside the process address space. .It Bq Er EINPROGRESS The socket is non-blocking diff --git a/lib/libc/sys/dup.2 b/lib/libc/sys/dup.2 index 10cbc79..f4da9f5 100644 --- a/lib/libc/sys/dup.2 +++ b/lib/libc/sys/dup.2 @@ -130,9 +130,11 @@ and system calls fail if: .Bl -tag -width Er .It Bq Er EBADF -.Fa Oldd +The +.Fa oldd or .Fa newd +argument is not a valid active descriptor .It Bq Er EMFILE Too many descriptors are active. diff --git a/lib/libc/sys/execve.2 b/lib/libc/sys/execve.2 index 19b9f8d..9b0f22c 100644 --- a/lib/libc/sys/execve.2 +++ b/lib/libc/sys/execve.2 @@ -258,10 +258,12 @@ MIB variable The new process file is not as long as indicated by the size values in its header. .It Bq Er EFAULT -.Fa Path , +The +.Fa path , .Fa argv , or .Fa envp +arguments point to an illegal address. .It Bq Er EIO diff --git a/lib/libc/sys/extattr_get_file.2 b/lib/libc/sys/extattr_get_file.2 index 5716cc2..5c2f058 100644 --- a/lib/libc/sys/extattr_get_file.2 +++ b/lib/libc/sys/extattr_get_file.2 @@ -178,13 +178,16 @@ Additionally, the file system implementing the call may return any other errors it desires. .Bl -tag -width Er .It Bq Er EFAULT -.Fa attrnamespace , -.Fa attrname , +The +.Fa attrnamespace +and +.Fa attrname +arguments, or the memory range defined by .Fa data and .Fa nbytes -points outside the process's allocated address space. +point outside the process's allocated address space. .It Bq Er ENAMETOOLONG The attribute name was longer than .Dv EXTATTR_MAXNAMELEN . diff --git a/lib/libc/sys/fcntl.2 b/lib/libc/sys/fcntl.2 index 5d5a252..c9dc8e7 100644 --- a/lib/libc/sys/fcntl.2 +++ b/lib/libc/sys/fcntl.2 @@ -409,7 +409,9 @@ or the type is an exclusive lock and some portion of the segment of a file to be locked is already shared-locked or exclusive-locked by another process. .It Bq Er EBADF -.Fa \&Fd +The +.Fa fd +argument is not a valid open file descriptor. .Pp The argument @@ -452,7 +454,9 @@ is .Dv F_SETLKW , and the system call was interrupted by a signal. .It Bq Er EINVAL -.Fa Cmd +The +.Fa cmd +argument is .Dv F_DUPFD and @@ -513,14 +517,18 @@ and an .Fa off_t calculation overflowed. .It Bq Er EPERM -.Fa Cmd +The +.Fa cmd +argument is .Dv F_SETOWN and the process ID or process group given as an argument is in a different session than the caller. .It Bq Er ESRCH -.Fa Cmd +The +.Fa cmd +argument is .Dv F_SETOWN and diff --git a/lib/libc/sys/fhopen.2 b/lib/libc/sys/fhopen.2 index a48f9d0..2bbb42b 100644 --- a/lib/libc/sys/fhopen.2 +++ b/lib/libc/sys/fhopen.2 @@ -69,7 +69,8 @@ for reading and/or writing as specified by the argument and returns the file descriptor to the calling process. The .Fa flags -are specified by +argument +is specified by .Em or Ns 'ing together the flags used for the .Xr open 2 diff --git a/lib/libc/sys/flock.2 b/lib/libc/sys/flock.2 index 40f071d..3cfc7cc 100644 --- a/lib/libc/sys/flock.2 +++ b/lib/libc/sys/flock.2 @@ -57,7 +57,7 @@ lock on the file associated with the file descriptor .Fa fd . A lock is applied by specifying an .Fa operation -parameter that is one of +argument that is one of .Dv LOCK_SH or .Dv LOCK_EX diff --git a/lib/libc/sys/fork.2 b/lib/libc/sys/fork.2 index 1c699bb..a1adafd 100644 --- a/lib/libc/sys/fork.2 +++ b/lib/libc/sys/fork.2 @@ -114,7 +114,9 @@ MIB variable .Dv KERN_MAXPROCPERUID . .It Bq Er EAGAIN The user is not the super user, and -the soft resource limit corresponding to the resource parameter +the soft resource limit corresponding to the +.Fa resource +argument .Dv RLIMIT_NPROC would be exceeded (see .Xr getrlimit 2 ) . diff --git a/lib/libc/sys/fsync.2 b/lib/libc/sys/fsync.2 index 883177e..644f337 100644 --- a/lib/libc/sys/fsync.2 +++ b/lib/libc/sys/fsync.2 @@ -68,10 +68,14 @@ The fails if: .Bl -tag -width Er .It Bq Er EBADF +The .Fa fd +argument is not a valid descriptor. .It Bq Er EINVAL +The .Fa fd +argument refers to a socket, not to a file. .It Bq Er EIO An I/O error occurred while reading from or writing to the file system. diff --git a/lib/libc/sys/getdirentries.2 b/lib/libc/sys/getdirentries.2 index 70dfc0b..d739549 100644 --- a/lib/libc/sys/getdirentries.2 +++ b/lib/libc/sys/getdirentries.2 @@ -153,7 +153,9 @@ system call will fail if: .Bl -tag -width Er .It Bq Er EBADF +The .Fa fd +argument is not a valid file descriptor open for reading. .It Bq Er EFAULT Either diff --git a/lib/libc/sys/getfh.2 b/lib/libc/sys/getfh.2 index c61a8c5..44caa76 100644 --- a/lib/libc/sys/getfh.2 +++ b/lib/libc/sys/getfh.2 @@ -83,7 +83,9 @@ Search permission is denied for a component of the path prefix of Too many symbolic links were encountered in translating .Fa path . .It Bq Er EFAULT -.Fa Fhp +The +.Fa fhp +argument points to an invalid address. .It Bq Er EIO An diff --git a/lib/libc/sys/getfsstat.2 b/lib/libc/sys/getfsstat.2 index c9bd8dc..a42b311 100644 --- a/lib/libc/sys/getfsstat.2 +++ b/lib/libc/sys/getfsstat.2 @@ -51,7 +51,9 @@ The .Fn getfsstat system call returns information about all mounted file systems. -.Fa Buf +The +.Fa buf +argument is a pointer to .Xr statfs structures defined as follows: @@ -160,7 +162,9 @@ system call fails if one or more of the following are true: .Bl -tag -width Er .It Bq Er EFAULT -.Fa Buf +The +.Fa buf +argument points to an invalid address. .It Bq Er EIO An diff --git a/lib/libc/sys/getgroups.2 b/lib/libc/sys/getgroups.2 index bdff4fb..54b6959 100644 --- a/lib/libc/sys/getgroups.2 +++ b/lib/libc/sys/getgroups.2 @@ -52,8 +52,9 @@ system call gets the current group access list of the user process and stores it in the array .Fa gidset . -The parameter +The .Fa gidsetlen +argument indicates the number of entries that may be placed in .Fa gidset . The diff --git a/lib/libc/sys/getitimer.2 b/lib/libc/sys/getitimer.2 index ef175d2..38e384d 100644 --- a/lib/libc/sys/getitimer.2 +++ b/lib/libc/sys/getitimer.2 @@ -140,11 +140,13 @@ is 100000000. .Sh NOTES Three macros for manipulating time values are defined in .Ao Pa sys/time.h Ac . -.Fa Timerclear +The +.Fn timerclear +macro sets a time value to zero, -.Fa timerisset +.Fn timerisset tests if a time value is non-zero, and -.Fa timercmp +.Fn timercmp compares two time values. .Sh RETURN VALUES .Rv -std @@ -159,11 +161,11 @@ will fail if: .It Bq Er EFAULT The .Fa value -parameter specified a bad address. +argument specified a bad address. .It Bq Er EINVAL -A +The .Fa value -parameter specified a time that was too large +argument specified a time that was too large to be handled. .El .Sh SEE ALSO diff --git a/lib/libc/sys/getlogin.2 b/lib/libc/sys/getlogin.2 index 7f7ba9b..a3ce359 100644 --- a/lib/libc/sys/getlogin.2 +++ b/lib/libc/sys/getlogin.2 @@ -152,17 +152,17 @@ The following errors may be returned by these calls: .It Bq Er EFAULT The .Fa name -parameter gave an +argument gave an invalid address. .It Bq Er EINVAL The .Fa name -parameter +argument pointed to a string that was too long. Login names are limited to .Dv MAXLOGNAME (from -.Ao Pa sys/param.h Ac ) +.Aq Pa sys/param.h ) characters, currently 17 including null. .It Bq Er EPERM The caller tried to set the login name and was not the super-user. diff --git a/lib/libc/sys/getpeername.2 b/lib/libc/sys/getpeername.2 index 627770a..97e6fdd 100644 --- a/lib/libc/sys/getpeername.2 +++ b/lib/libc/sys/getpeername.2 @@ -54,7 +54,7 @@ socket .Fa s . The .Fa namelen -parameter should be initialized to indicate +argument should be initialized to indicate the amount of space pointed to by .Fa name . On return it contains the actual size of the name @@ -83,7 +83,7 @@ to perform the operation. .It Bq Er EFAULT The .Fa name -parameter points to memory not in a valid part of the +argument points to memory not in a valid part of the process address space. .El .Sh SEE ALSO diff --git a/lib/libc/sys/getpriority.2 b/lib/libc/sys/getpriority.2 index 9466435..0b580dc 100644 --- a/lib/libc/sys/getpriority.2 +++ b/lib/libc/sys/getpriority.2 @@ -59,7 +59,9 @@ is obtained with the system call and set with the .Fn setpriority system call. -.Fa Which +The +.Fa which +argument is one of .Dv PRIO_PROCESS , .Dv PRIO_PGRP , @@ -79,7 +81,9 @@ and a user ID for A zero value of .Fa who denotes the current process, process group, or user. -.Fa Prio +The +.Fa prio +argument is a value in the range -20 to 20. The default priority is 0; lower priorities cause more favorable scheduling. .Pp @@ -116,7 +120,9 @@ and .Fa who values specified. .It Bq Er EINVAL -.Fa Which +The +.Fa which +argument was not one of .Dv PRIO_PROCESS , .Dv PRIO_PGRP , diff --git a/lib/libc/sys/getrlimit.2 b/lib/libc/sys/getrlimit.2 index 3d55643..ce0fcd0 100644 --- a/lib/libc/sys/getrlimit.2 +++ b/lib/libc/sys/getrlimit.2 @@ -59,7 +59,7 @@ system call. .Pp The .Fa resource -parameter is one of the following: +argument is one of the following: .Bl -tag -width RLIMIT_FSIZEAA .It Li RLIMIT_CORE The largest size (in bytes) diff --git a/lib/libc/sys/getrusage.2 b/lib/libc/sys/getrusage.2 index 2efa819..6a529c1 100644 --- a/lib/libc/sys/getrusage.2 +++ b/lib/libc/sys/getrusage.2 @@ -56,7 +56,7 @@ returns information describing the resources utilized by the current process, or all its terminated child processes. The .Fa who -parameter is either +argument is either .Dv RUSAGE_SELF or .Dv RUSAGE_CHILDREN . @@ -163,11 +163,11 @@ system call will fail if: .It Bq Er EINVAL The .Fa who -parameter is not a valid value. +argument is not a valid value. .It Bq Er EFAULT The address specified by the .Fa rusage -parameter is not in a valid part of the process address space. +argument is not in a valid part of the process address space. .El .Sh SEE ALSO .Xr gettimeofday 2 , diff --git a/lib/libc/sys/getsockname.2 b/lib/libc/sys/getsockname.2 index 9f9005f..408566e 100644 --- a/lib/libc/sys/getsockname.2 +++ b/lib/libc/sys/getsockname.2 @@ -53,7 +53,7 @@ returns the current .Fa name for the specified socket. The .Fa namelen -parameter should be initialized to indicate +argument should be initialized to indicate the amount of space pointed to by .Fa name . On return it contains the actual size of the name @@ -79,7 +79,7 @@ to perform the operation. .It Bq Er EFAULT The .Fa name -parameter points to memory not in a valid part of the +argument points to memory not in a valid part of the process address space. .El .Sh SEE ALSO diff --git a/lib/libc/sys/getsockopt.2 b/lib/libc/sys/getsockopt.2 index a6ef175..3889b26 100644 --- a/lib/libc/sys/getsockopt.2 +++ b/lib/libc/sys/getsockopt.2 @@ -79,10 +79,11 @@ should be set to the protocol number of see .Xr getprotoent 3 . .Pp -The parameters +The .Fa optval and .Fa optlen +arguments are used to access option values for .Fn setsockopt . For @@ -91,7 +92,7 @@ they identify a buffer in which the value for the requested option(s) are to be returned. For .Fn getsockopt , .Fa optlen -is a value-result parameter, initially containing the +is a value-result argument, initially containing the size of the buffer pointed to by .Fa optval , and modified on return to indicate the actual size of @@ -100,7 +101,9 @@ to be supplied or returned, .Fa optval may be NULL. .Pp -.Fa Optname +The +.Fa optname +argument and any specified options are passed uninterpreted to the appropriate protocol module for interpretation. The include file @@ -113,17 +116,17 @@ section 4 of the manual. .Pp Most socket-level options utilize an -.Fa int -parameter for +.Vt int +argument for .Fa optval . For .Fn setsockopt , -the parameter should be non-zero to enable a boolean option, +the argument should be non-zero to enable a boolean option, or zero if the option is to be disabled. .Dv SO_LINGER uses a -.Fa struct linger -parameter, defined in +.Vt "struct linger" +argument, defined in .Ao Pa sys/socket.h Ac , which specifies the desired state of the option and the linger interval (see below). @@ -131,8 +134,8 @@ linger interval (see below). and .Dv SO_RCVTIMEO use a -.Fa struct timeval -parameter, defined in +.Vt "struct timeval" +argument, defined in .Ao Pa sys/time.h Ac . .Pp The following options are recognized at the socket level. @@ -277,8 +280,8 @@ is different from that which was returned. .Dv SO_SNDTIMEO is an option to set a timeout value for output operations. It accepts a -.Fa struct timeval -parameter with the number of seconds and microseconds +.Vt "struct timeval" +argument with the number of seconds and microseconds used to limit waits for output operations to complete. If a send operation has blocked for this much time, it returns with a partial count @@ -292,8 +295,8 @@ from the low water mark to the high water mark for output. .Dv SO_RCVTIMEO is an option to set a timeout value for input operations. It accepts a -.Fa struct timeval -parameter with the number of seconds and microseconds +.Vt "struct timeval" +argument with the number of seconds and microseconds used to limit waits for input operations to complete. In the current implementation, this timer is restarted each time additional data are received by the protocol, @@ -325,16 +328,21 @@ struct accept_filter_arg { }; .Ed .Pp +The .Fa optval +argument should point to a .Fa struct accept_filter_arg that will select and configure the .Xr accept_filter 9 . +The .Fa af_name +argument should be filled with the name of the accept filter that the application wishes to place on the listening socket. +The optional argument .Fa af_arg -is an optional parameter that can be passed to the accept +can be passed to the accept filter specified by .Fa af_name to provide additional configuration options at attach time. diff --git a/lib/libc/sys/gettimeofday.2 b/lib/libc/sys/gettimeofday.2 index 397388d..4aa62f0 100644 --- a/lib/libc/sys/gettimeofday.2 +++ b/lib/libc/sys/gettimeofday.2 @@ -91,7 +91,7 @@ struct timezone { .Ed .Pp The -.Fa timezone +.Vt timezone structure indicates the local time zone (measured in minutes of time westward from Greenwich), and a flag that, if nonzero, indicates that diff --git a/lib/libc/sys/ioctl.2 b/lib/libc/sys/ioctl.2 index 9208ed7..3278e49 100644 --- a/lib/libc/sys/ioctl.2 +++ b/lib/libc/sys/ioctl.2 @@ -76,10 +76,10 @@ An .Fa request has encoded in it whether the argument is an .Dq in -parameter +argument or .Dq out -parameter, and the size of the argument +argument, and the size of the argument .Fa argp in bytes. Macros and defines used in specifying an ioctl @@ -97,10 +97,14 @@ system call will fail if: .Bl -tag -width Er .It Bq Er EBADF +The .Fa d +argument is not a valid descriptor. .It Bq Er ENOTTY +The .Fa d +argument is not associated with a character special device. .It Bq Er ENOTTY @@ -109,12 +113,16 @@ of object that the descriptor .Fa d references. .It Bq Er EINVAL +The .Fa request or .Fa argp +argument is not valid. .It Bq Er EFAULT +The .Fa argp +argument points outside the process's allocated address space. .El .Sh SEE ALSO diff --git a/lib/libc/sys/kenv.2 b/lib/libc/sys/kenv.2 index 2ca1c99..1a24a27 100644 --- a/lib/libc/sys/kenv.2 +++ b/lib/libc/sys/kenv.2 @@ -48,7 +48,7 @@ the kernel environment. .Pp The .Fa action -parameter can be one of the following: +argument can be one of the following: .Bl -tag -width ".Dv KENV_UNSET" .It Dv KENV_GET Returns the value associated with the named kernel environment variable. @@ -85,14 +85,14 @@ will return the number of bytes required to copy out the entire environment. .Pp The .Fa name -parameter is the name of the environment variable to be affected. +argument is the name of the environment variable to be affected. In the case of .Dv KENV_DUMP it is ignored. .Pp The .Fa value -parameter contains either the value to set the environment variable +argument contains either the value to set the environment variable .Fa name to in the case of .Dv KENV_SET , @@ -113,7 +113,7 @@ will return the number of bytes required to copy out the entire environment. .Pp The .Fa len -parameter indicates how many bytes of storage +argument indicates how many bytes of storage .Fa value points to. .Sh RETURN VALUES @@ -140,7 +140,9 @@ system call will fail if: .Bl -tag -width Er .It Bq Er EINVAL +The .Fa action +argument is not a valid option, or the length of the .Fa value is less than 1 for a diff --git a/lib/libc/sys/kill.2 b/lib/libc/sys/kill.2 index 7cbe63d..b0a4fde 100644 --- a/lib/libc/sys/kill.2 +++ b/lib/libc/sys/kill.2 @@ -54,7 +54,9 @@ to .Fa pid , a process or a group of processes. -.Fa Sig +The +.Fa sig +argument may be one of the signals specified in .Xr sigaction 2 or it may be 0, in which case @@ -73,11 +75,15 @@ A single exception is the signal SIGCONT, which may always be sent to any descendant of the current process. .Bl -tag -width Ds .It \&If Fa pid No \&is greater than zero : -.Fa Sig +The +.Fa sig +signal is sent to the process whose ID is equal to .Fa pid . .It \&If Fa pid No \&is zero : -.Fa Sig +The +.Fa sig +signal is sent to all processes whose group ID is equal to the process group ID of the sender, and for which the process has permission; @@ -114,7 +120,9 @@ system call will fail and no signal will be sent if: .Bl -tag -width Er .It Bq Er EINVAL -.Fa Sig +The +.Fa sig +argument is not a valid signal number. .It Bq Er ESRCH No process can be found corresponding to that specified by diff --git a/lib/libc/sys/kldsym.2 b/lib/libc/sys/kldsym.2 index 3a2f32d..acd6fcd 100644 --- a/lib/libc/sys/kldsym.2 +++ b/lib/libc/sys/kldsym.2 @@ -99,7 +99,9 @@ Invalid value in or .Fa command . .It Bq Er ENOENT +The .Fa fileid +argument is invalid, or the specified symbol could not be found. .El diff --git a/lib/libc/sys/kqueue.2 b/lib/libc/sys/kqueue.2 index 2d65591..93d5c78 100644 --- a/lib/libc/sys/kqueue.2 +++ b/lib/libc/sys/kqueue.2 @@ -89,7 +89,9 @@ The system call is used to register events with the queue, and return any pending events to the user. +The .Fa changelist +argument is a pointer to an array of .Va kevent structures, as defined in @@ -97,12 +99,18 @@ structures, as defined in All changes contained in the .Fa changelist are applied before any pending events are read from the queue. +The .Fa nchanges +argument gives the size of .Fa changelist . +The .Fa eventlist +argument is a pointer to an array of kevent structures. +The .Fa nevents +argument determines the size of .Fa eventlist . If diff --git a/lib/libc/sys/kse.2 b/lib/libc/sys/kse.2 index 4222c05..606501c 100644 --- a/lib/libc/sys/kse.2 +++ b/lib/libc/sys/kse.2 @@ -290,6 +290,7 @@ If the KSE has already woken up for another reason, this system call has no effect. The .Fa mbx +argument may be .Dv NULL to specify @@ -542,12 +543,16 @@ MIB variable .Dv KERN_MAXPROCPERUID . .It Bq Er EAGAIN The user is not the super user, and the soft resource limit corresponding -to the resource parameter +to the +.Fa resource +argument .Dv RLIMIT_NPROC would be exceeded (see .Xr getrlimit 2 ) . .It Bq Er EFAULT +The .Fa mbx +argument points to an address which is not a valid part of the process address space. .El .Pp @@ -582,14 +587,18 @@ system call will fail if: .Bl -tag -width Er .It Bq Er ESRCH +The .Fa mbx +argument is not .Dv NULL and the mailbox pointed to by .Fa mbx is not associated with any KSE in the process. .It Bq Er ESRCH +The .Fa mbx +argument is .Dv NULL and the current KSE has no associated mailbox, i.e., the process is operating diff --git a/lib/libc/sys/ktrace.2 b/lib/libc/sys/ktrace.2 index 41761a0..b51558c 100644 --- a/lib/libc/sys/ktrace.2 +++ b/lib/libc/sys/ktrace.2 @@ -56,6 +56,7 @@ Only the super-user can trace setuid or setgid programs. .Pp The .Fa tracefile +argument gives the pathname of the file to be used for tracing. The file must exist and be a regular file writable by the calling process. All trace records are always appended to the file, @@ -67,7 +68,7 @@ may be NULL. .Pp The .Fa ops -parameter specifies the requested ktrace operation. +argument specifies the requested ktrace operation. The defined operations are: .Bl -column KTRFLAG_DESCENDXXX -offset indent .It "KTROP_SET Enable trace points specified in" @@ -81,7 +82,7 @@ specified process and all its current children. .Pp The .Fa trpoints -parameter specifies the trace points of interest. +argument specifies the trace points of interest. The defined trace points are: .Bl -column KTRFAC_SYSCALLXXX -offset indent .It "KTRFAC_SYSCALL Trace system calls." diff --git a/lib/libc/sys/link.2 b/lib/libc/sys/link.2 index dbf2682..9c064b4 100644 --- a/lib/libc/sys/link.2 +++ b/lib/libc/sys/link.2 @@ -69,7 +69,9 @@ is not deleted and the link count of the underlying object is decremented. .Pp -.Fa Name1 +The object pointed at by the +.Fa name1 +argument must exist for the hard link to succeed and both @@ -77,7 +79,9 @@ both and .Fa name2 must be in the same file system. +The .Fa name1 +argument may not be a directory. .Sh RETURN VALUES .Rv -std link diff --git a/lib/libc/sys/listen.2 b/lib/libc/sys/listen.2 index c7a9bdb..fb0dafc 100644 --- a/lib/libc/sys/listen.2 +++ b/lib/libc/sys/listen.2 @@ -64,7 +64,7 @@ or .Pp The .Fa backlog -parameter defines the maximum length the queue of +argument defines the maximum length the queue of pending connections may grow to. If a connection request arrives with the queue full the client may @@ -78,7 +78,7 @@ Note that before and the introduction of the syncache, the .Fa backlog -parameter also determined the length of the incomplete +argument also determined the length of the incomplete connection queue, which held TCP sockets in the process of completing TCP's 3-way handshake. These incomplete connections @@ -116,7 +116,7 @@ its accept filter criteria will be terminated. This secondary queue, like the primary listen queue, is sized according to the .Fa backlog -parameter. +argument. .Sh RETURN VALUES .Rv -std listen .Sh ERRORS diff --git a/lib/libc/sys/lseek.2 b/lib/libc/sys/lseek.2 index d394ef9..30cf1e0 100644 --- a/lib/libc/sys/lseek.2 +++ b/lib/libc/sys/lseek.2 @@ -120,10 +120,14 @@ system call will fail and the file position pointer will remain unchanged if: .Bl -tag -width Er .It Bq Er EBADF +The .Fa fildes +argument is not an open file descriptor. .It Bq Er EINVAL -.Fa Whence +The +.Fa whence +argument is not a proper value or the resulting file offset would be negative for a non-character special file. @@ -132,7 +136,9 @@ The resulting file offset would be a value which cannot be represented correctly in an object of type .Fa off_t . .It Bq Er ESPIPE +The .Fa fildes +argument is associated with a pipe, socket, or FIFO. .El .Sh SEE ALSO diff --git a/lib/libc/sys/mkdir.2 b/lib/libc/sys/mkdir.2 index 8ef3f18..e91c9ba 100644 --- a/lib/libc/sys/mkdir.2 +++ b/lib/libc/sys/mkdir.2 @@ -100,7 +100,9 @@ An I/O error occurred while making the directory entry or allocating the inode. .It Bq Er EIO An I/O error occurred while reading from or writing to the file system. .It Bq Er EFAULT -.Fa Path +The +.Fa path +argument points outside the process's allocated address space. .El .Sh SEE ALSO diff --git a/lib/libc/sys/mkfifo.2 b/lib/libc/sys/mkfifo.2 index 19461be..329c26b 100644 --- a/lib/libc/sys/mkfifo.2 +++ b/lib/libc/sys/mkfifo.2 @@ -110,7 +110,9 @@ An .Tn I/O error occurred while reading from or writing to the file system. .It Bq Er EFAULT -.Fa Path +The +.Fa path +argument points outside the process's allocated address space. .El .Sh SEE ALSO diff --git a/lib/libc/sys/mknod.2 b/lib/libc/sys/mknod.2 index 849e17a..1c9fca3 100644 --- a/lib/libc/sys/mknod.2 +++ b/lib/libc/sys/mknod.2 @@ -108,7 +108,9 @@ The named file resides on a read-only file system. .It Bq Er EEXIST The named file exists. .It Bq Er EFAULT -.Fa Path +The +.Fa path +argument points outside the process's allocated address space. .It Bq Er EINVAL Creating anything else than a block or character special diff --git a/lib/libc/sys/mlock.2 b/lib/libc/sys/mlock.2 index c4839c0..f44d4c3 100644 --- a/lib/libc/sys/mlock.2 +++ b/lib/libc/sys/mlock.2 @@ -64,10 +64,10 @@ system call unlocks pages previously locked by one or more calls. For both, the .Fa addr -parameter should be aligned to a multiple of the page size. +argument should be aligned to a multiple of the page size. If the .Fa len -parameter is not a multiple of the page size, it will be rounded up +argument is not a multiple of the page size, it will be rounded up to be so. The entire range must be allocated. .Pp diff --git a/lib/libc/sys/mmap.2 b/lib/libc/sys/mmap.2 index 05f5b4f..5407968 100644 --- a/lib/libc/sys/mmap.2 +++ b/lib/libc/sys/mmap.2 @@ -93,7 +93,7 @@ Pages may be executed. .Pp The .Fa flags -parameter specifies the type of the mapped object, mapping options and +argument specifies the type of the mapped object, mapping options and whether modifications made to the mapped copy of the page are private to the process or are to be shared with other references. Sharing, mapping type and options are specified in the @@ -109,7 +109,7 @@ The file descriptor used for creating must be \-1. The .Fa offset -parameter is ignored. +argument is ignored. .\".It Dv MAP_FILE .\"Mapped from a regular file or character-special device memory. .It Dv MAP_FIXED @@ -212,7 +212,9 @@ implies and .Fa offset of 0. +The .Fa fd +argument must be -1 and .Fa prot must include at least @@ -264,7 +266,7 @@ The flag .Dv PROT_READ was specified as part of the .Fa prot -parameter and +argument and .Fa fd was not open for reading. The flags @@ -275,33 +277,39 @@ were specified as part of the .Fa flags and .Fa prot -parameters and +argument and .Fa fd was not open for writing. .It Bq Er EBADF +The .Fa fd +argument is not a valid open file descriptor. .It Bq Er EINVAL .Dv MAP_FIXED was specified and the .Fa addr -parameter was not page aligned, or part of the desired address space +argument was not page aligned, or part of the desired address space resides out of the valid address space for a user process. .It Bq Er EINVAL -.Fa Len +The +.Fa len +argument was negative. .It Bq Er EINVAL .Dv MAP_ANON was specified and the .Fa fd -parameter was not -1. +argument was not -1. .It Bq Er EINVAL .Dv MAP_ANON has not been specified and .Fa fd did not reference a regular or character special file. .It Bq Er EINVAL -.Fa Offset +The +.Fa offset +argument was not page-aligned. (See .Sx BUGS @@ -310,7 +318,7 @@ below.) .Dv MAP_FIXED was specified and the .Fa addr -parameter was not available. +argument was not available. .Dv MAP_ANON was specified and insufficient memory was available. The system has reached the per-process mmap limit specified in the @@ -329,7 +337,9 @@ sysctl. .Xr getpagesize 3 , .Xr make.conf 5 .Sh BUGS +The .Fa len +argument is limited to 2GB. Mmapping slightly more than 2GB does not work, but it is possible to map a window of size (filesize % 2GB) for file sizes diff --git a/lib/libc/sys/mount.2 b/lib/libc/sys/mount.2 index 96032d7..d22f68d 100644 --- a/lib/libc/sys/mount.2 +++ b/lib/libc/sys/mount.2 @@ -128,7 +128,9 @@ argument names the file system. The types of file systems known to the system can be obtained with .Xr lsvfs 1 . .Pp -.Fa Data +The +.Fa data +argument is a pointer to a structure that contains the type specific arguments to mount. The format for these argument structures is described in the @@ -197,7 +199,9 @@ is not a directory. Another process currently holds a reference to .Fa dir . .It Bq Er EFAULT -.Fa Dir +The +.Fa dir +argument points outside the process's allocated address space. .El .Pp @@ -210,7 +214,9 @@ A component of ufs_args .Fa fspec does not exist. .It Bq Er ENOTBLK +The .Fa fspec +argument is not a block device. .It Bq Er ENXIO The major device number of @@ -232,7 +238,9 @@ group information for the file system. An I/O error occurred while reading the super block or cylinder group information. .It Bq Er EFAULT +The .Fa fspec +argument points outside the process's allocated address space. .El .Pp @@ -269,7 +277,9 @@ on the file system. .It Bq Er EIO An I/O error occurred while writing cached file system information. .It Bq Er EFAULT -.Fa Dir +The +.Fa dir +argument points outside the process's allocated address space. .El .Pp diff --git a/lib/libc/sys/msync.2 b/lib/libc/sys/msync.2 index 254ed12..bb55bbc 100644 --- a/lib/libc/sys/msync.2 +++ b/lib/libc/sys/msync.2 @@ -79,13 +79,19 @@ system call will fail if: .Bl -tag -width Er .It Bq Er EINVAL +The .Fa addr +argument is not a multiple of the hardware page size. .It Bq Er EINVAL +The .Fa len +argument is too large or negative. .It Bq Er EINVAL +The .Fa flags +argument was both MS_ASYNC and MS_INVALIDATE. Only one of these flags is allowed. .It Bq Er EIO diff --git a/lib/libc/sys/munmap.2 b/lib/libc/sys/munmap.2 index f6acf79..d05b489 100644 --- a/lib/libc/sys/munmap.2 +++ b/lib/libc/sys/munmap.2 @@ -62,9 +62,9 @@ will fail if: .It Bq Er EINVAL The .Fa addr -parameter was not page aligned, the +argument was not page aligned, the .Fa len -parameter was negative, or +argument was negative, or some part of the region being unmapped is outside the valid address range for a process. .El diff --git a/lib/libc/sys/nanosleep.2 b/lib/libc/sys/nanosleep.2 index b628131..c0d5b5b 100644 --- a/lib/libc/sys/nanosleep.2 +++ b/lib/libc/sys/nanosleep.2 @@ -91,7 +91,9 @@ The system call was interrupted by the delivery of a signal. .It Bq Er EINVAL +The .Fa rqtp +argument specified a nanosecond value less than zero or greater than or equal to 1000 million. .It Bq Er ENOSYS diff --git a/lib/libc/sys/open.2 b/lib/libc/sys/open.2 index 8775f0e..f125877 100644 --- a/lib/libc/sys/open.2 +++ b/lib/libc/sys/open.2 @@ -288,7 +288,9 @@ executed and the .Fn open system call requests write access. .It Bq Er EFAULT -.Fa Path +The +.Fa path +argument points outside the process's allocated address space. .It Bq Er EEXIST .Dv O_CREAT diff --git a/lib/libc/sys/pathconf.2 b/lib/libc/sys/pathconf.2 index de521bb..873f9b7 100644 --- a/lib/libc/sys/pathconf.2 +++ b/lib/libc/sys/pathconf.2 @@ -106,7 +106,6 @@ otherwise 0. Returns 1 if synchronised I/O is supported for this file, otherwise 0. .It Li _PC_ALLOC_SIZE_MIN Minimum number of bytes of storage allocated for any portion of a file. -.Fa path . .It Li _PC_FILESIZEBITS Number of bits needed to represented the maximum file size. .It Li _PC_REC_INCR_XFER_SIZE @@ -194,7 +193,9 @@ The system call will fail if: .It Bq Er EBADF +The .Fa fd +argument is not a valid open file descriptor. .It Bq Er EIO An I/O error occurred while reading from or writing to the file system. diff --git a/lib/libc/sys/poll.2 b/lib/libc/sys/poll.2 index 1026811..dbbbcef 100644 --- a/lib/libc/sys/poll.2 +++ b/lib/libc/sys/poll.2 @@ -163,7 +163,9 @@ An error return from indicates: .Bl -tag -width Er .It Bq Er EFAULT -.Fa Fds +The +.Fa fds +argument points outside the process's allocated address space. .It Bq Er EINTR A signal was delivered before the time limit expired and diff --git a/lib/libc/sys/profil.2 b/lib/libc/sys/profil.2 index 640cfda..5dea7ab 100644 --- a/lib/libc/sys/profil.2 +++ b/lib/libc/sys/profil.2 @@ -78,11 +78,11 @@ by the relation: .Pp The .Fa offset -parameter is the lowest address at which +argument is the lowest address at which the kernel takes program counter samples. The .Fa scale -parameter ranges from 1 to 65536 and +argument ranges from 1 to 65536 and can be used to change the span of the bins. A scale of 65536 maps each bin to 2 bytes of address range; a scale of 32768 gives 4 bytes, 16384 gives 8 bytes and so on. diff --git a/lib/libc/sys/ptrace.2 b/lib/libc/sys/ptrace.2 index 298de96..7ce4077 100644 --- a/lib/libc/sys/ptrace.2 +++ b/lib/libc/sys/ptrace.2 @@ -53,7 +53,9 @@ special case noted below, all calls are made by the tracing process, and the .Fa pid argument specifies the process ID of the traced process. +The .Fa request +argument can be: .Bl -tag -width 12n .It Dv PT_TRACE_ME @@ -137,21 +139,29 @@ The actual number of bytes read or written is stored in upon return. .It Dv PT_CONTINUE The traced process continues execution. +The .Fa addr +argument is an address specifying the place where execution is to be resumed (a new value for the program counter), or .Po Vt caddr_t Pc Ns 1 to indicate that execution is to pick up where it left off. +The .Fa data +argument provides a signal number to be delivered to the traced process as it resumes execution, or 0 if no signal is to be sent. .It Dv PT_STEP The traced process is single stepped one instruction. +The .Fa addr +argument should be passed .Po Vt caddr_t Pc Ns 1 . +The .Fa data +argument is not used. .It Dv PT_KILL The traced process terminates, as if @@ -272,6 +282,7 @@ on itself. .It The .Fa request +argument was not one of the legal requests. .It The signal number diff --git a/lib/libc/sys/quotactl.2 b/lib/libc/sys/quotactl.2 index 5276133..6a4c09b 100644 --- a/lib/libc/sys/quotactl.2 +++ b/lib/libc/sys/quotactl.2 @@ -112,7 +112,9 @@ Only the super-user may turn quotas off. Get disk quota limits and current usage for the user or group (as determined by the command type) with identifier .Fa id . -.Fa Addr +The +.Fa addr +argument is a pointer to a .Fa struct dqblk structure (defined in @@ -121,7 +123,9 @@ structure (defined in Set disk quota limits for the user or group (as determined by the command type) with identifier .Fa id . -.Fa Addr +The +.Fa addr +argument is a pointer to a .Fa struct dqblk structure (defined in @@ -134,7 +138,9 @@ This system call is restricted to the super-user. Set disk usage limits for the user or group (as determined by the command type) with identifier .Fa id . -.Fa Addr +The +.Fa addr +argument is a pointer to a .Fa struct dqblk structure (defined in @@ -148,7 +154,7 @@ The .Fa id and .Fa addr -parameters are ignored. +arguments are ignored. .El .Sh RETURN VALUES .Rv -std quotactl @@ -164,7 +170,9 @@ option. .It Bq Er EUSERS The quota table cannot be expanded. .It Bq Er EINVAL -.Fa Cmd +The +.Fa cmd +argument or the command type is invalid. In .Dv Q_GETQUOTA @@ -201,7 +209,9 @@ An invalid was supplied; the associated structure could not be copied in or out of the kernel. .It Bq Er EFAULT -.Fa Path +The +.Fa path +argument points outside the process's allocated address space. .It Bq Er EPERM The call was privileged and the caller was not the super-user. diff --git a/lib/libc/sys/read.2 b/lib/libc/sys/read.2 index fc7d002..da93d6f 100644 --- a/lib/libc/sys/read.2 +++ b/lib/libc/sys/read.2 @@ -142,10 +142,14 @@ system calls will succeed unless: .Bl -tag -width Er .It Bq Er EBADF -.Fa D +The +.Fa d +argument is not a valid file or socket descriptor open for reading. .It Bq Er EFAULT -.Fa Buf +The +.Fa buf +argument points outside the allocated address space. .It Bq Er EIO An I/O error occurred while reading from the file system. @@ -166,7 +170,9 @@ In addition, may return one of the following errors: .Bl -tag -width Er .It Bq Er EINVAL -.Fa Iovcnt +The +.Fa iovcnt +argument was less than or equal to 0, or greater than 16. .It Bq Er EINVAL One of the diff --git a/lib/libc/sys/readlink.2 b/lib/libc/sys/readlink.2 index 57ed4e6..28ecc4b 100644 --- a/lib/libc/sys/readlink.2 +++ b/lib/libc/sys/readlink.2 @@ -87,7 +87,9 @@ The named file is not a symbolic link. .It Bq Er EIO An I/O error occurred while reading from the file system. .It Bq Er EFAULT -.Fa Buf +The +.Fa buf +argument extends outside the process's allocated address space. .El .Sh SEE ALSO diff --git a/lib/libc/sys/reboot.2 b/lib/libc/sys/reboot.2 index 6ab7952..619c2fd 100644 --- a/lib/libc/sys/reboot.2 +++ b/lib/libc/sys/reboot.2 @@ -54,7 +54,9 @@ Only the super-user may reboot a machine on demand. However, a reboot is invoked automatically in the event of unrecoverable system failures. .Pp -.Fa Howto +The +.Fa howto +argument is a mask of options; the system call interface allows the following options, defined in the include file .Aq Pa sys/reboot.h , diff --git a/lib/libc/sys/recv.2 b/lib/libc/sys/recv.2 index 9d85d2b..a2ea33a 100644 --- a/lib/libc/sys/recv.2 +++ b/lib/libc/sys/recv.2 @@ -65,8 +65,10 @@ If .Fa from is non-nil, and the socket is not connection-oriented, the source address of the message is filled in. -.Fa Fromlen -is a value-result parameter, initialized to the size of +The +.Fa fromlen +argument +is a value-result argument, initialized to the size of the buffer associated with .Fa from , and modified on return to indicate the actual size of the @@ -82,7 +84,7 @@ and is identical to .Fn recvfrom with a nil .Fa from -parameter. +argument. As it is redundant, it may not be supported in future releases. .Pp All three routines return the length of the message on successful @@ -148,7 +150,7 @@ The .Fn recvmsg system call uses a .Fa msghdr -structure to minimize the number of directly supplied parameters. +structure to minimize the number of directly supplied arguments. This structure has the following form, as defined in .Ao Pa sys/socket.h Ac : .Pp @@ -171,12 +173,16 @@ and specify the destination address if the socket is unconnected; .Fa msg_name may be given as a null pointer if no names are desired or required. -.Fa Msg_iov +The +.Fa msg_iov and .Fa msg_iovlen +arguments describe scatter gather locations, as discussed in .Xr read 2 . -.Fa Msg_control , +The +.Fa msg_control +argument, which has length .Fa msg_controllen , points to a buffer for other protocol control related messages diff --git a/lib/libc/sys/rename.2 b/lib/libc/sys/rename.2 index 56572ca..67866f6 100644 --- a/lib/libc/sys/rename.2 +++ b/lib/libc/sys/rename.2 @@ -135,9 +135,10 @@ and neither the containing directory nor .Fa from are owned by the effective user ID. .It Bq Er EPERM -The +The file pointed at by the .Fa to -file exists, +argument +exists, the directory containing .Fa to is marked sticky, @@ -149,12 +150,16 @@ Too many symbolic links were encountered in translating either pathname. .It Bq Er ENOTDIR A component of either path prefix is not a directory. .It Bq Er ENOTDIR +The .Fa from +argument is a directory, but .Fa to is not a directory. .It Bq Er EISDIR +The .Fa to +argument is a directory, but .Fa from is not a directory. @@ -184,7 +189,9 @@ system. Path points outside the process's allocated address space. .It Bq Er EINVAL -.Fa From +The +.Fa from +argument is a parent directory of .Fa to , or an attempt is made to rename @@ -192,7 +199,9 @@ or an attempt is made to rename or .Ql \&.. . .It Bq Er ENOTEMPTY -.Fa To +The +.Fa to +argument is a directory and is not empty. .El .Sh SEE ALSO diff --git a/lib/libc/sys/revoke.2 b/lib/libc/sys/revoke.2 index f420db9..64de556 100644 --- a/lib/libc/sys/revoke.2 +++ b/lib/libc/sys/revoke.2 @@ -89,7 +89,9 @@ Search permission is denied for a component of the path prefix. .It Bq Er ELOOP Too many symbolic links were encountered in translating the pathname. .It Bq Er EFAULT -.Fa Path +The +.Fa path +argument points outside the process's allocated address space. .It Bq Er EINVAL The implementation does not support the diff --git a/lib/libc/sys/rfork.2 b/lib/libc/sys/rfork.2 index d4d4e20..4e60fb7 100644 --- a/lib/libc/sys/rfork.2 +++ b/lib/libc/sys/rfork.2 @@ -31,7 +31,9 @@ The resources include the open file descriptor table (which, when shared, permits processes to open and close files for other processes), and open files. -.Fa Flags +The +.Fa flags +argument is the logical OR of some subset of: .Bl -tag -width "RFCNAMEG" -compact -offset indent .It RFPROC @@ -140,7 +142,9 @@ MIB variable .Dv KERN_MAXPROCPERUID . .It Bq Er EAGAIN The user is not the super user, and -the soft resource limit corresponding to the resource parameter +the soft resource limit corresponding to the +.Fa resource +argument .Dv RLIMIT_NOFILE would be exceeded (see .Xr getrlimit 2 ) . diff --git a/lib/libc/sys/rmdir.2 b/lib/libc/sys/rmdir.2 index 54b9b25..c2014fc 100644 --- a/lib/libc/sys/rmdir.2 +++ b/lib/libc/sys/rmdir.2 @@ -94,7 +94,9 @@ or deallocating the inode. .It Bq Er EROFS The directory entry to be removed resides on a read-only file system. .It Bq Er EFAULT -.Fa Path +The +.Fa path +argument points outside the process's allocated address space. .El .Sh SEE ALSO diff --git a/lib/libc/sys/rtprio.2 b/lib/libc/sys/rtprio.2 index a935404..ce519fc 100644 --- a/lib/libc/sys/rtprio.2 +++ b/lib/libc/sys/rtprio.2 @@ -48,14 +48,20 @@ The system call is used to lookup or change the realtime or idle priority of a process. .Pp +The .Fa function +argument specifies the operation to be performed. RTP_LOOKUP to lookup the current priority, and RTP_SET to set the priority. +The .Fa pid +argument specifies the process to be used, 0 for the current process. .Pp +The .Fa *rtp +argument is a pointer to a struct rtprio which is used to specify the priority and priority type. This structure has the following form: .Bd -literal diff --git a/lib/libc/sys/sched_get_priority_max.2 b/lib/libc/sys/sched_get_priority_max.2 index e54228f..9f8104a 100644 --- a/lib/libc/sys/sched_get_priority_max.2 +++ b/lib/libc/sys/sched_get_priority_max.2 @@ -95,7 +95,7 @@ will be set to the corresponding value: .It Bq Er EINVAL The value of the .Fa policy -parameter does not represent a defined scheduling policy. +argument does not represent a defined scheduling policy. .It Bq Er ENOSYS The .Fn sched_get_priority_max , diff --git a/lib/libc/sys/sched_setscheduler.2 b/lib/libc/sys/sched_setscheduler.2 index 7043649..cd47aaa 100644 --- a/lib/libc/sys/sched_setscheduler.2 +++ b/lib/libc/sys/sched_setscheduler.2 @@ -47,7 +47,7 @@ of the process specified by to .Fa policy and the parameters specified in the -.Fa sched_param +.Vt sched_param structure pointed to by .Fa param , respectively. @@ -92,7 +92,7 @@ Round-robin scheduling across same priority processes. .El .Pp The -.Fa sched_param +.Vt sched_param structure is defined in .Fa <sched.h> : .Pp @@ -146,7 +146,7 @@ No process can be found corresponding to that specified by .It Bq Er EINVAL The value of the .Fa policy -parameter is invalid, or one or more of the parameters contained in +argument is invalid, or one or more of the parameters contained in .Fa param is outside the valid range for the specified scheduling policy. .El diff --git a/lib/libc/sys/select.2 b/lib/libc/sys/select.2 index 871d68d..849d6aa 100644 --- a/lib/libc/sys/select.2 +++ b/lib/libc/sys/select.2 @@ -155,7 +155,9 @@ before any of the selected events occurred. The specified time limit is invalid. One of its components is negative or too large. .It Bq Er EINVAL +The .Fa nfds +argument was invalid. .El .Sh SEE ALSO diff --git a/lib/libc/sys/semctl.2 b/lib/libc/sys/semctl.2 index b5a33ba..b69b8fb 100644 --- a/lib/libc/sys/semctl.2 +++ b/lib/libc/sys/semctl.2 @@ -53,7 +53,7 @@ is required for certain values of .Fa cmd . For the commands that use the .Fa arg -parameter, +argument, .Fa "union semun" is defined as follows: .Bd -literal @@ -136,7 +136,7 @@ in any process are cleared. .El .Pp The -.Fa "struct semid_ds" +.Vt "struct semid_ds" is defined as follows: .Bd -literal .\" @@ -177,7 +177,9 @@ will fail if: No semaphore set corresponds to .Fa semid . .It Bq Er EINVAL +The .Fa semnum +argument is not in the range of valid semaphores for given semaphore set. .It Bq Er EPERM The calling process's effective uid does not match the uid of diff --git a/lib/libc/sys/semget.2 b/lib/libc/sys/semget.2 index f45e92b..f493281 100644 --- a/lib/libc/sys/semget.2 +++ b/lib/libc/sys/semget.2 @@ -79,7 +79,7 @@ The mode of a newly created IPC object is determined by .Em OR Ns 'ing the following constants into the .Fa flag -parameter: +argument: .Bl -tag -width XSEM_WXX6XXX .It Dv SEM_R Read access for user. diff --git a/lib/libc/sys/send.2 b/lib/libc/sys/send.2 index ac64f3f..dfd110d 100644 --- a/lib/libc/sys/send.2 +++ b/lib/libc/sys/send.2 @@ -101,7 +101,7 @@ send more data. .Pp The .Fa flags -parameter may include one or more of the following: +argument may include one or more of the following: .Bd -literal #define MSG_OOB 0x1 /* process out-of-band data */ #define MSG_PEEK 0x2 /* peek at incoming message */ @@ -165,7 +165,7 @@ The argument .Fa s is not a socket. .It Bq Er EFAULT -An invalid user space address was specified for a parameter. +An invalid user space address was specified for an argument. .It Bq Er EMSGSIZE The socket requires that message be sent atomically, and the size of the message to be sent made this impossible. diff --git a/lib/libc/sys/sendfile.2 b/lib/libc/sys/sendfile.2 index 09e8dac..a0d8239 100644 --- a/lib/libc/sys/sendfile.2 +++ b/lib/libc/sys/sendfile.2 @@ -111,25 +111,39 @@ is "zero-copy", meaning that it has been optimized so that copying of the file d .Sh ERRORS .Bl -tag -width Er .It Bq Er EBADF +The .Fa fd +argument is not a valid file descriptor. .It Bq Er EBADF +The .Fa s +argument is not a valid socket descriptor. .It Bq Er ENOTSOCK +The .Fa s +argument is not a socket. .It Bq Er EINVAL +The .Fa fd +argument is not a regular file. .It Bq Er EINVAL +The .Fa s +argument is not a SOCK_STREAM type socket. .It Bq Er EINVAL +The .Fa offset +argument is negative or out of range. .It Bq Er ENOTCONN +The .Fa s +argument points to an unconnected socket. .It Bq Er EPIPE The socket peer has closed the connection. @@ -137,7 +151,7 @@ The socket peer has closed the connection. An error occurred while reading from .Fa fd . .It Bq Er EFAULT -An invalid address was specified for a parameter. +An invalid address was specified for an argument. .It Bq Er EAGAIN The socket is marked for non-blocking I/O and not all data was sent due to the socket buffer being filled. If specified, the number of bytes successfully sent will be returned in diff --git a/lib/libc/sys/setgroups.2 b/lib/libc/sys/setgroups.2 index 79f60ac..1570ac7 100644 --- a/lib/libc/sys/setgroups.2 +++ b/lib/libc/sys/setgroups.2 @@ -52,8 +52,9 @@ system call sets the group access list of the current user process according to the array .Fa gidset . -The parameter +The .Fa ngroups +argument indicates the number of entries in the array and must be no more than .Dv NGROUPS , diff --git a/lib/libc/sys/setregid.2 b/lib/libc/sys/setregid.2 index 0ea6acf..fd27e71 100644 --- a/lib/libc/sys/setregid.2 +++ b/lib/libc/sys/setregid.2 @@ -56,7 +56,7 @@ make other changes. .Pp Supplying a value of -1 for either the real or effective group ID forces the system to substitute the current -ID in place of the -1 parameter. +ID in place of the -1 argument. .Pp The .Fn setregid diff --git a/lib/libc/sys/shmat.2 b/lib/libc/sys/shmat.2 index e4c9eee..31e2a80 100644 --- a/lib/libc/sys/shmat.2 +++ b/lib/libc/sys/shmat.2 @@ -100,7 +100,9 @@ will fail if: No shared memory segment was found corresponding to .Fa shmid . .It Bq Er EINVAL +The .Fa addr +argument was not an acceptable address. .El .Pp @@ -110,7 +112,9 @@ system call will fail if: .Bl -tag -width Er .It Bq Er EINVAL +The .Fa addr +argument does not point to a shared memory segment. .El .Sh "SEE ALSO" diff --git a/lib/libc/sys/shmget.2 b/lib/libc/sys/shmget.2 index bf54fb2..e27ad0d 100644 --- a/lib/libc/sys/shmget.2 +++ b/lib/libc/sys/shmget.2 @@ -76,7 +76,7 @@ The mode of a newly created IPC object is determined by .Em OR Ns 'ing the following constants into the .Fa flag -parameter: +argument: .Bl -tag -width XSHM_WXX6XXX .It Dv SHM_R Read access for user. diff --git a/lib/libc/sys/sigaction.2 b/lib/libc/sys/sigaction.2 index a302cee..adf7bed 100644 --- a/lib/libc/sys/sigaction.2 +++ b/lib/libc/sys/sigaction.2 @@ -551,7 +551,9 @@ or points to memory that is not a valid part of the process address space. .It Bq Er EINVAL -.Fa Sig +The +.Fa sig +argument is not a valid signal number. .It Bq Er EINVAL An attempt is made to ignore or supply a handler for diff --git a/lib/libc/sys/sigprocmask.2 b/lib/libc/sys/sigprocmask.2 index c8866fc..ca9be15 100644 --- a/lib/libc/sys/sigprocmask.2 +++ b/lib/libc/sys/sigprocmask.2 @@ -59,8 +59,9 @@ If .Fa set is not null, the action of .Fn sigprocmask -depends on the value of the parameter -.Fa how . +depends on the value of the +.Fa how +argument. The signal mask is changed as a function of the specified .Fa set and the current mask. @@ -108,7 +109,9 @@ system call will fail and the signal mask will be unchanged if one of the following occurs: .Bl -tag -width Er .It Bq Er EINVAL +The .Fa how +argument has a value other than those listed here. .El .Sh SEE ALSO diff --git a/lib/libc/sys/sigreturn.2 b/lib/libc/sys/sigreturn.2 index 3aec154..aed6a91 100644 --- a/lib/libc/sys/sigreturn.2 +++ b/lib/libc/sys/sigreturn.2 @@ -77,7 +77,9 @@ will fail and the process context will remain unchanged if one of the following occurs. .Bl -tag -width Er .It Bq Er EFAULT -.Fa Scp +The +.Fa scp +argument points to memory that is not a valid part of the process address space. .It Bq Er EINVAL diff --git a/lib/libc/sys/socket.2 b/lib/libc/sys/socket.2 index c3869a7..c8d9368 100644 --- a/lib/libc/sys/socket.2 +++ b/lib/libc/sys/socket.2 @@ -53,7 +53,7 @@ creates an endpoint for communication and returns a descriptor. .Pp The .Fa domain -parameter specifies a communications domain within which +argument specifies a communications domain within which communication will take place; this selects the protocol family which should be used. These families are defined in the include file @@ -139,6 +139,7 @@ but not yet implemented, are not described here. .Pp The .Fa protocol +argument specifies a particular protocol to be used with the socket. Normally only a single protocol exists to support a particular socket type within a given protocol family. However, it is possible diff --git a/lib/libc/sys/stat.2 b/lib/libc/sys/stat.2 index fbdbb5b..68ab743 100644 --- a/lib/libc/sys/stat.2 +++ b/lib/libc/sys/stat.2 @@ -163,7 +163,7 @@ is not defined, the time-related fields are defined as: .Ed .Pp The size-related fields of the -.Fa struct stat +.Vt "struct stat" are as follows: .Bl -tag -width XXXst_blksize .It st_blksize @@ -223,9 +223,11 @@ system calls will fail if: .It Bq Er EACCES Search permission is denied for a component of the path prefix. .It Bq Er EFAULT +The .Fa sb or .Fa path +argument points to an invalid address. .It Bq Er EIO An I/O error occurred while reading from or writing to the file system. @@ -249,10 +251,14 @@ The .Fn fstat system call will fail if: .It Bq Er EBADF +The .Fa fd +argument is not a valid open file descriptor. .It Bq Er EFAULT +The .Fa sb +argument points to an invalid address. .It Bq Er EIO An I/O error occurred while reading from or writing to the file system. diff --git a/lib/libc/sys/statfs.2 b/lib/libc/sys/statfs.2 index 6cdc692..43af72a 100644 --- a/lib/libc/sys/statfs.2 +++ b/lib/libc/sys/statfs.2 @@ -52,11 +52,15 @@ The .Fn statfs system call returns information about a mounted file system. -.Fa Path +The +.Fa path +argument is the path name of any file within the mounted file system. -.Fa Buf +The +.Fa buf +argument is a pointer to a -.Fn statfs +.Vt statfs structure defined as follows: .Bd -literal typedef struct fsid { int32_t val[2]; } fsid_t; /* file system id type */ @@ -138,7 +142,7 @@ fails if one or more of the following are true: .Bl -tag -width Er .It Bq Er ENOTDIR A component of the path prefix of -.Fa Path +.Fa path is not a directory. .It Bq Er ENAMETOOLONG The length of a component of @@ -158,9 +162,11 @@ Search permission is denied for a component of the path prefix of Too many symbolic links were encountered in translating .Fa path . .It Bq Er EFAULT -.Fa Buf +The +.Fa buf or .Fa path +argument points to an invalid address. .It Bq Er EIO An @@ -174,10 +180,14 @@ system call fails if one or more of the following are true: .Bl -tag -width Er .It Bq Er EBADF +The .Fa fd +argument is not a valid open file descriptor. .It Bq Er EFAULT -.Fa Buf +The +.Fa buf +argument points to an invalid address. .It Bq Er EIO An diff --git a/lib/libc/sys/swapon.2 b/lib/libc/sys/swapon.2 index 1feb7c0..6aaf4f2 100644 --- a/lib/libc/sys/swapon.2 +++ b/lib/libc/sys/swapon.2 @@ -90,7 +90,9 @@ Too many symbolic links were encountered in translating the pathname. .It Bq Er EPERM The caller is not the super-user. .It Bq Er EFAULT -.Fa Special +The +.Fa special +argument points outside the process's allocated address space. .El .Pp @@ -103,7 +105,9 @@ The system has reached the boot-time limit on the number of swap devices, .Va vm.nswapdev . .It Bq Er ENOTBLK -.Fa Special +The +.Fa special +argument is not a block device. .It Bq Er EBUSY The device specified by diff --git a/lib/libc/sys/symlink.2 b/lib/libc/sys/symlink.2 index 8d25e33..19fa7fa 100644 --- a/lib/libc/sys/symlink.2 +++ b/lib/libc/sys/symlink.2 @@ -78,7 +78,9 @@ path prefix denies search permission. .It Bq Er ELOOP Too many symbolic links were encountered in translating the pathname. .It Bq Er EEXIST -.Fa Name2 +The path name pointed at by the +.Fa name2 +argument already exists. .It Bq Er EIO An I/O error occurred while making the directory entry for @@ -117,9 +119,11 @@ which the symbolic link is being created has been exhausted. .It Bq Er EIO An I/O error occurred while making the directory entry or allocating the inode. .It Bq Er EFAULT -.Fa Name1 +The +.Fa name1 or .Fa name2 +argument points outside the process's allocated address space. .El .Sh SEE ALSO diff --git a/lib/libc/sys/sysarch.2 b/lib/libc/sys/sysarch.2 index 2685a37..6e631bc 100644 --- a/lib/libc/sys/sysarch.2 +++ b/lib/libc/sys/sysarch.2 @@ -56,7 +56,9 @@ specified by with the arguments specified by the .Fa args pointer. -.Fa Args +The +.Fa args +argument is a pointer to a structure defining the actual arguments of the function. Symbolic constants and argument structures diff --git a/lib/libc/sys/syscall.2 b/lib/libc/sys/syscall.2 index 10109ce..df91325 100644 --- a/lib/libc/sys/syscall.2 +++ b/lib/libc/sys/syscall.2 @@ -60,7 +60,7 @@ Symbolic constants for system calls can be found in the header file .Ao Pa sys/syscall.h Ac . The .Fn __syscall -form should be used when one or more of the parameters is a +form should be used when one or more of the arguments is a 64-bit argument to ensure that argument alignment is correct. This system call is useful for testing new system calls that do not have entries in the C library. diff --git a/lib/libc/sys/truncate.2 b/lib/libc/sys/truncate.2 index 32e487e..29892ac 100644 --- a/lib/libc/sys/truncate.2 +++ b/lib/libc/sys/truncate.2 @@ -96,7 +96,9 @@ The file is a pure procedure (shared text) file that is being executed. .It Bq Er EIO An I/O error occurred updating the inode. .It Bq Er EFAULT -.Fa Path +The +.Fa path +argument points outside the process's allocated address space. .El .Pp @@ -108,14 +110,17 @@ succeeds unless: .It Bq Er EBADF The .Fa fd +argument is not a valid descriptor. .It Bq Er EINVAL The .Fa fd +argument references a socket, not a file. .It Bq Er EINVAL The .Fa fd +descriptor is not open for writing. .El .Sh SEE ALSO diff --git a/lib/libc/sys/undelete.2 b/lib/libc/sys/undelete.2 index fba16f8..5faf50a 100644 --- a/lib/libc/sys/undelete.2 +++ b/lib/libc/sys/undelete.2 @@ -91,7 +91,9 @@ An I/O error occurred while updating the directory entry. .It Bq Er EROFS The name resides on a read-only file system. .It Bq Er EFAULT -.Fa Path +The +.Fa path +argument points outside the process's allocated address space. .El .Sh SEE ALSO diff --git a/lib/libc/sys/unlink.2 b/lib/libc/sys/unlink.2 index 61a2de1..6050b39 100644 --- a/lib/libc/sys/unlink.2 +++ b/lib/libc/sys/unlink.2 @@ -59,7 +59,9 @@ all resources associated with the file are reclaimed. If one or more process have the file open when the last link is removed, the link is removed, but the removal of the file is delayed until all references to it have been closed. +The .Fa path +argument may not be a directory. .Sh RETURN VALUES .Rv -std unlink @@ -97,7 +99,9 @@ or deallocating the inode. .It Bq Er EROFS The named file resides on a read-only file system. .It Bq Er EFAULT -.Fa Path +The +.Fa path +argument points outside the process's allocated address space. .El .Sh SEE ALSO diff --git a/lib/libc/sys/utimes.2 b/lib/libc/sys/utimes.2 index dd03e90..79dd2d0 100644 --- a/lib/libc/sys/utimes.2 +++ b/lib/libc/sys/utimes.2 @@ -121,9 +121,11 @@ and the effective user ID of the process does not match the owner of the file, and is not the super-user, and write access is denied. .It Bq Er EFAULT +The .Fa path or .Fa times +argument points outside the process's allocated address space. .It Bq Er EIO An I/O error occurred while reading or writing the affected inode. @@ -156,7 +158,9 @@ system call will fail if: .Bl -tag -width Er .It Bq Er EBADF +The .Fa fd +argument does not refer to a valid descriptor. .El .Pp @@ -171,7 +175,9 @@ and the effective user ID of the process does not match the owner of the file, and is not the super-user, and write access is denied. .It Bq Er EFAULT +The .Fa times +argument points outside the process's allocated address space. .It Bq Er EIO An I/O error occurred while reading or writing the affected inode. diff --git a/lib/libc/sys/uuidgen.2 b/lib/libc/sys/uuidgen.2 index 6aa09a8..5cb87ee 100644 --- a/lib/libc/sys/uuidgen.2 +++ b/lib/libc/sys/uuidgen.2 @@ -124,7 +124,7 @@ could not be written to for any or all identifiers. .It Bq Er EINVAL The .Fa count -parameter is less than 1 or larger than the hard upper limit of 2048. +argument is less than 1 or larger than the hard upper limit of 2048. .El .Sh SEE ALSO .Xr uuidgen 1 , diff --git a/lib/libc/sys/wait.2 b/lib/libc/sys/wait.2 index 7f8925a..a3ba362 100644 --- a/lib/libc/sys/wait.2 +++ b/lib/libc/sys/wait.2 @@ -82,7 +82,7 @@ The other wait functions are implemented using .Pp The .Fa wpid -parameter specifies the set of child processes for which to wait. +argument specifies the set of child processes for which to wait. If .Fa wpid is -1, the call waits for any child process. @@ -102,9 +102,9 @@ equals the absolute value of .Pp The .Fa status -parameter is defined below. The +argument is defined below. The .Fa options -parameter contains the bitwise OR of any of the following options. +argument contains the bitwise OR of any of the following options. The .Dv WCONTINUED option indicates that children of the current process that @@ -279,7 +279,7 @@ The .Fa status or .Fa rusage -arguments point to an illegal address. +argument points to an illegal address. (May not be detected before exit of a child process.) .It Bq Er EINTR The call was interrupted by a caught signal, diff --git a/lib/libc/sys/write.2 b/lib/libc/sys/write.2 index 0ea137a..5f8776f 100644 --- a/lib/libc/sys/write.2 +++ b/lib/libc/sys/write.2 @@ -147,7 +147,9 @@ system calls will fail and the file pointer will remain unchanged if: .Bl -tag -width Er .It Bq Er EBADF -.Fa D +The +.Fa d +argument is not a valid descriptor open for writing. .It Bq Er EPIPE An attempt is made to write to a pipe that is not open @@ -201,7 +203,9 @@ domain datagram socket on which .Xr connect 2 had been used to set a destination address. .It Bq Er EINVAL -.Fa Iovcnt +The +.Fa iovcnt +argument was less than or equal to 0, or greater than .Dv UIO_MAXIOV . .It Bq Er EINVAL diff --git a/lib/libc/uuid/uuid.3 b/lib/libc/uuid/uuid.3 index 946888d..a8c407b 100644 --- a/lib/libc/uuid/uuid.3 +++ b/lib/libc/uuid/uuid.3 @@ -77,7 +77,7 @@ A 16-bit hash value can be obtained by calling The successful or unsuccessful completion of the function is returned in the .Fa status -parameter. +argument. Possible values are: .Pp .Bl -tag -width ".Dv uuid_s_invalid_string_uuid" diff --git a/lib/libc/xdr/xdr.3 b/lib/libc/xdr/xdr.3 index fbaf61e..25944cc 100644 --- a/lib/libc/xdr/xdr.3 +++ b/lib/libc/xdr/xdr.3 @@ -78,15 +78,16 @@ A filter primitive that translates between variable-length arrays and their corresponding external representations. The -parameter .Fa arrp +argument is the address of the pointer to the array, while .Fa sizep is the address of the element count of the array; this element count cannot exceed .Fa maxsize . -The parameter +The .Fa elsize +argument is the .Ic sizeof each of the array's elements, and @@ -121,8 +122,9 @@ This routine returns one if it succeeds, zero otherwise. .Pp A filter primitive that translates between counted byte strings and their external representations. -The parameter +The .Fa sp +argument is the address of the string pointer. The length of the string is located at address @@ -339,6 +341,7 @@ whose length is no more than bytes long. The .Fa op +argument determines the direction of the .Tn XDR stream @@ -358,8 +361,9 @@ or A filter primitive that translates between fixed size opaque data and its external representation. -The parameter +The .Fa cp +argument is the address of the opaque object, and .Fa cnt is its size in bytes. @@ -425,7 +429,7 @@ and .Xr write 2 , except that .Fa handle -is passed to the former routines as the first parameter. +is passed to the former routines as the first argument. Note: the .Tn XDR stream's @@ -494,8 +498,9 @@ This routine returns one if it succeeds, zero otherwise. .Xc .Pp A primitive that provides pointer chasing within structures. -The parameter +The .Fa pp +argument is the address of the pointer; .Fa size is the @@ -529,8 +534,9 @@ the .Tn XDR stream .Fa xdrs . -The parameter +The .Fa pos +argument is a position value obtained from .Fn xdr_getpos . This routine returns one if the @@ -575,8 +581,9 @@ stream data is written to, or read from, the Standard .Tn I/O stream .Fa file . -The parameter +The .Fa op +argument determines the direction of the .Tn XDR stream (either @@ -709,8 +716,9 @@ This discriminant is always an Next the union located at .Fa unp is translated. -The parameter +The .Fa choices +argument is a pointer to an array of .Vt xdr_discrim structures. @@ -750,13 +758,14 @@ A filter primitive that translates between fixed-length arrays and their corresponding external representations. The -parameter .Fa arrp +argument is the address of the pointer to the array, while .Fa size is the element count of the array. -The parameter +The .Fa elsize +argument is the .Ic sizeof each of the array's elements, and @@ -778,7 +787,7 @@ This routine returns one if it succeeds, zero otherwise. This routine always returns one. It may be passed to .Tn RPC -routines that require a function parameter, +routines that require a function argument, where nothing is to be done. .Pp .It Xo @@ -800,7 +809,7 @@ is handy because the .Tn RPC package passes a maximum of two .Tn XDR -routines as parameters, and +routines as arguments, and .Fn xdr_string , one of the most frequently used primitives, requires three. Returns one if it succeeds, zero otherwise. |