summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorJerry Jelinek <jerry.jelinek@joyent.com>2020-05-27 11:54:10 +0000
committerJerry Jelinek <jerry.jelinek@joyent.com>2020-05-27 11:54:10 +0000
commit4bed2831a184edd4530dcb078dc9725887e8a0c7 (patch)
tree8e1a53521273e6ccde38386b17c4631391dd9934 /usr/src
parentf2fcf602e1d6bcce6ba45bc21338598e3780cf9c (diff)
parent95adbecaacb2fe97eb8c9e49e7c1d6910c577bba (diff)
downloadillumos-joyent-4bed2831a184edd4530dcb078dc9725887e8a0c7.tar.gz
[illumos-gate merge]
commit 95adbecaacb2fe97eb8c9e49e7c1d6910c577bba 11902 Typos in proc_arg_grab(3PROC) commit 6bc3974f378feda6e0d0b8f2a7ca95eceb9587db 11668 libproc(3LIB) typo in proc_get_auxv commit 7bcaeddb7bbb778bc9a9c0e0c78b6bb8a3ea0540 12685 ddi_create_minor_node() should take const char * values
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/man/man3lib/libproc.3lib4
-rw-r--r--usr/src/man/man3proc/proc_arg_grab.3proc28
-rw-r--r--usr/src/man/man9f/ddi_create_minor_node.9f24
-rw-r--r--usr/src/man/man9f/ddi_remove_minor_node.9f13
-rw-r--r--usr/src/uts/common/os/dacf.c2
-rw-r--r--usr/src/uts/common/os/dacf_clnt.c6
-rw-r--r--usr/src/uts/common/os/sunddi.c32
-rw-r--r--usr/src/uts/common/sys/dacf_impl.h4
-rw-r--r--usr/src/uts/common/sys/ddi_impldefs.h4
-rw-r--r--usr/src/uts/common/sys/sunddi.h10
10 files changed, 52 insertions, 75 deletions
diff --git a/usr/src/man/man3lib/libproc.3lib b/usr/src/man/man3lib/libproc.3lib
index 3b38bda64f..d68897dad4 100644
--- a/usr/src/man/man3lib/libproc.3lib
+++ b/usr/src/man/man3lib/libproc.3lib
@@ -13,7 +13,7 @@
.\" Copyright (c) 2019 Carlos Neira <cneirabustos@gmail.com>
.\" Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
.\"
-.Dd February 22, 2019
+.Dd May 22, 2020
.Dt LIBPROC 3LIB
.Os
.Sh NAME
@@ -310,7 +310,7 @@ library.
.It Sy proc_arg_xpsinfo Ta Sy proc_content2str
.It Sy proc_dmodelname Ta Sy proc_finistdio
.It Sy proc_fltname Ta Sy proc_fltset2str
-.It Sy proc_flushstdio Ta Sy proc_proc_get_auxv
+.It Sy proc_flushstdio Ta Sy proc_get_auxv
.It Sy proc_fdinfo_misc Ta Sy proc_get_cred
.It Sy proc_get_fdinfo Ta Sy proc_get_priv
.It Sy proc_get_psinfo Ta Sy proc_get_status
diff --git a/usr/src/man/man3proc/proc_arg_grab.3proc b/usr/src/man/man3proc/proc_arg_grab.3proc
index 375ba4d67e..9bba2d5981 100644
--- a/usr/src/man/man3proc/proc_arg_grab.3proc
+++ b/usr/src/man/man3proc/proc_arg_grab.3proc
@@ -11,18 +11,18 @@
.\"
.\" Copyright 2015 Joyent, Inc.
.\"
-.Dd May 11, 2016
+.Dd May 22, 2020
.Dt PROC_ARG_GRAB 3PROC
.Os
.Sh NAME
.Nm proc_arg_grab ,
-.Nm proc_arg_xrgab
+.Nm proc_arg_xgrab
.Nd process grabbing utility function
.Sh SYNOPSIS
.Lb libproc
.In libproc.h
.Ft "struct ps_prochandle"
-.Fo proc_arg_grag
+.Fo proc_arg_grab
.Fa "const char *arg"
.Fa "int oflag"
.Fa "int gflag"
@@ -63,7 +63,7 @@ Allows
.Fa arg
to specify core files.
.It PR_ARG_ANY
-Encompasses all of the previous opens.
+Encompasses all of the previous flags.
.El
.Pp
The argument
@@ -96,20 +96,24 @@ If the
.Fa lwps
argument is
.Pf non- Dv NULL ,
-then if there is a thread specification present in
-.Fa arg ,
-it will be validated to see if it is a valid range and then a pointer to
-the start of the thread specification will be stored in
-.Fa lwps .
-For more information on determining process range validity, see
+then the functions will treat any portion of
+.Fa arg
+after a
+.Sq /
+character as a thread range.
+The thread range will be validated as though a call to the
.Xr proc_lwp_range_valid 3PROC
-for more information on valid and invalid tread specifications.
+function had been made, and a pointer to the start of the range will be
+stored in
+.Fa lwps .
+For a discussion of what constitutes a valid thread range, please see
+.Xr proc_lwp_range_valid 3PROC .
.Sh RETURN VALUES
Upon successful completion, the
.Fn proc_arg_grab
and
.Fn proc_arg_xgrab
-functions return a pointer to the process handle is returned.
+functions return a pointer to the process handle.
Otherwise,
.Dv NULL
is returned and
diff --git a/usr/src/man/man9f/ddi_create_minor_node.9f b/usr/src/man/man9f/ddi_create_minor_node.9f
index 583cb7c313..b33ba2704b 100644
--- a/usr/src/man/man9f/ddi_create_minor_node.9f
+++ b/usr/src/man/man9f/ddi_create_minor_node.9f
@@ -3,27 +3,24 @@
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
-.TH DDI_CREATE_MINOR_NODE 9F "Dec 14, 2004"
+.TH DDI_CREATE_MINOR_NODE 9F "May 01, 2020"
.SH NAME
ddi_create_minor_node \- Create a minor node for this device
.SH SYNOPSIS
-.LP
.nf
#include <sys/stat.h>
#include <sys/sunddi.h>
-\fBint\fR \fBddi_create_minor_node\fR(\fBdev_info_t *\fR\fIdip\fR, \fBchar *\fR\fIname\fR, \fBint\fR \fIspec_type\fR,
- \fBminor_t\fR \fIminor_num\fR, \fBchar *\fR\fInode_type\fR, \fBint\fR \fIflag\fR);
+\fBint\fR \fBddi_create_minor_node\fR(\fBdev_info_t *\fR\fIdip\fR, \fBconst char *\fR\fIname\fR,
+ \fBint\fR \fIspec_type\fR, \fBminor_t\fR \fIminor_num\fR, \fBconst char *\fR\fInode_type\fR,
+ \fBint\fR \fIflag\fR);
.fi
.SH INTERFACE LEVEL
-.sp
-.LP
Solaris DDI specific (Solaris DDI).
.SH PARAMETERS
-.sp
.ne 2
.na
\fB\fIdip\fR \fR
@@ -198,8 +195,6 @@ it is set to \fB0\fR.
.RE
.SH DESCRIPTION
-.sp
-.LP
\fBddi_create_minor_node()\fR provides the necessary information to enable the
system to create the \fB/dev\fR and \fB/devices\fR hierarchies. The \fIname\fR
is used to create the minor name of the block or character special file under
@@ -212,8 +207,6 @@ refers to the names in the \fB/devices\fR hierarchy. See \fBdisks\fR(1M),
determines if this is a clone device or not, and what device class the node
belongs to.
.SH RETURN VALUES
-.sp
-.LP
\fBddi_create_minor_node()\fR returns:
.sp
.ne 2
@@ -235,12 +228,9 @@ Minor node creation failed.
.RE
.SH CONTEXT
-.sp
-.LP
The \fBddi_create_minor_node()\fR function can be called from user context. It
is typically called from \fBattach\fR(9E) or \fBioctl\fR(9E).
.SH EXAMPLES
-.LP
\fBExample 1 \fRCreate Data Structure Describing Minor Device with Minor Number
of 0
.sp
@@ -257,8 +247,6 @@ ddi_create_minor_node(dip, "foo", S_IFBLK, 0, DDI_NT_BLOCK, 0);
.in -2
.SH SEE ALSO
-.sp
-.LP
\fBadd_drv\fR(1M), \fBdevlinks\fR(1M), \fBdisks\fR(1M), \fBdrvconfig\fR(1M),
\fBports\fR(1M), \fBtapes\fR(1M), \fBattach\fR(9E),
\fBddi_remove_minor_node\fR(9F)
@@ -266,8 +254,6 @@ ddi_create_minor_node(dip, "foo", S_IFBLK, 0, DDI_NT_BLOCK, 0);
.LP
\fIWriting Device Drivers\fR
.SH NOTES
-.sp
-.LP
If the driver is for a network device (\fInode_type\fR \fBDDI_NT_NET\fR), note
that the driver name will undergo the driver name constraints identified in the
NOTES section of \fBdlpi\fR(7P). Additionally, the minor name must match the
@@ -288,7 +274,5 @@ that only supports style-2 minor nodes can use \fBddi_no_info\fR(9F) for its
the results of a \fBmodunload\fR(1M) of the driver or a \fBcfgadm\fR(1M) remove
of hardware controlled by the driver are undefined.
.SH WARNING
-.sp
-.LP
Drivers must remove references to GLOBAL_DEV, NODEBOUND_DEV, NODESPECIFIC_DEV,
and ENUMERATED_DEV to compile under Solaris 10 and later versions.
diff --git a/usr/src/man/man9f/ddi_remove_minor_node.9f b/usr/src/man/man9f/ddi_remove_minor_node.9f
index 4761fae149..bf8cc9e709 100644
--- a/usr/src/man/man9f/ddi_remove_minor_node.9f
+++ b/usr/src/man/man9f/ddi_remove_minor_node.9f
@@ -3,21 +3,17 @@
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
-.TH DDI_REMOVE_MINOR_NODE 9F "Mar 10, 1992"
+.TH DDI_REMOVE_MINOR_NODE 9F "May 01, 2020"
.SH NAME
ddi_remove_minor_node \- remove a minor node for this dev_info
.SH SYNOPSIS
-.LP
.nf
-\fBvoid\fR \fBddi_remove_minor_node\fR(\fBdev_info_t\fR \fI*dip\fR, \fBchar\fR \fI*name\fR);
+\fBvoid\fR \fBddi_remove_minor_node\fR(\fBdev_info_t\fR \fI*dip\fR, \fBconst char\fR \fI*name\fR);
.fi
.SH INTERFACE LEVEL
-.sp
-.LP
Solaris \fBDDI\fR specific (Solaris \fBDDI\fR).
.SH PARAMETERS
-.sp
.ne 2
.na
\fB\fIdip\fR \fR
@@ -37,13 +33,10 @@ minor data structures from this \fBdev_info\fR.
.RE
.SH DESCRIPTION
-.sp
-.LP
\fBddi_remove_minor_node()\fR removes a data structure from the linked list of
minor data structures that is pointed to by the \fBdev_info\fR structure for
this driver.
.SH EXAMPLES
-.LP
\fBExample 1 \fRRemoving a minor node
.sp
.LP
@@ -58,8 +51,6 @@ which is linked into the \fBdev_info\fR structure pointed to by \fBdip\fR:
.in -2
.SH SEE ALSO
-.sp
-.LP
\fBattach\fR(9E), \fBdetach\fR(9E), \fBddi_create_minor_node\fR(9F)
.sp
.LP
diff --git a/usr/src/uts/common/os/dacf.c b/usr/src/uts/common/os/dacf.c
index 8d4cd486d8..592b1cd570 100644
--- a/usr/src/uts/common/os/dacf.c
+++ b/usr/src/uts/common/os/dacf.c
@@ -642,7 +642,7 @@ dacf_arglist_delete(dacf_arg_t **list)
* Match a device-spec to a rule.
*/
dacf_rule_t *
-dacf_match(dacf_opid_t op, dacf_devspec_t ds, void *match_info)
+dacf_match(dacf_opid_t op, dacf_devspec_t ds, const void *match_info)
{
dacf_rule_t *rule;
diff --git a/usr/src/uts/common/os/dacf_clnt.c b/usr/src/uts/common/os/dacf_clnt.c
index e40509d33b..fdb1696fb2 100644
--- a/usr/src/uts/common/os/dacf_clnt.c
+++ b/usr/src/uts/common/os/dacf_clnt.c
@@ -23,8 +23,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* DACF (Device Autoconfiguration Framework) client code.
*
@@ -67,8 +65,8 @@
* for the operation to be invoked at post-attach and/or pre-detach time.
*/
void
-dacfc_match_create_minor(char *name, char *node_type, dev_info_t *dip,
- struct ddi_minor_data *dmdp, int flag)
+dacfc_match_create_minor(const char *name, const char *node_type,
+ dev_info_t *dip, struct ddi_minor_data *dmdp, int flag)
{
dacf_rule_t *r;
char *dev_path, *dev_pathp, *drv_mname = NULL;
diff --git a/usr/src/uts/common/os/sunddi.c b/usr/src/uts/common/os/sunddi.c
index 0dde96307b..1c6d02ed4a 100644
--- a/usr/src/uts/common/os/sunddi.c
+++ b/usr/src/uts/common/os/sunddi.c
@@ -5614,7 +5614,7 @@ fail:
* devfs event subclass names as device class names.
*/
static int
-derive_devi_class(dev_info_t *dip, char *node_type, int flag)
+derive_devi_class(dev_info_t *dip, const char *node_type, int flag)
{
int rv = DDI_SUCCESS;
@@ -5659,10 +5659,10 @@ derive_devi_class(dev_info_t *dip, char *node_type, int flag)
* exceed IFNAMSIZ (16) characters in length.
*/
static boolean_t
-verify_name(char *name)
+verify_name(const char *name)
{
- size_t len = strlen(name);
- char *cp;
+ size_t len = strlen(name);
+ const char *cp;
if (len == 0 || len > IFNAMSIZ)
return (B_FALSE);
@@ -5680,9 +5680,9 @@ verify_name(char *name)
* attach it to the given devinfo node.
*/
-int
-ddi_create_minor_common(dev_info_t *dip, char *name, int spec_type,
- minor_t minor_num, char *node_type, int flag, ddi_minor_type mtype,
+static int
+ddi_create_minor_common(dev_info_t *dip, const char *name, int spec_type,
+ minor_t minor_num, const char *node_type, int flag, ddi_minor_type mtype,
const char *read_priv, const char *write_priv, mode_t priv_mode)
{
struct ddi_minor_data *dmdp;
@@ -5793,7 +5793,7 @@ ddi_create_minor_common(dev_info_t *dip, char *name, int spec_type,
*/
if (!(DEVI_IS_ATTACHING(dip) || DEVI_IS_DETACHING(dip)) &&
mtype != DDM_INTERNAL_PATH) {
- (void) i_log_devfs_minor_create(dip, name);
+ (void) i_log_devfs_minor_create(dip, dmdp->ddm_name);
}
/*
@@ -5804,16 +5804,16 @@ ddi_create_minor_common(dev_info_t *dip, char *name, int spec_type,
}
int
-ddi_create_minor_node(dev_info_t *dip, char *name, int spec_type,
- minor_t minor_num, char *node_type, int flag)
+ddi_create_minor_node(dev_info_t *dip, const char *name, int spec_type,
+ minor_t minor_num, const char *node_type, int flag)
{
return (ddi_create_minor_common(dip, name, spec_type, minor_num,
node_type, flag, DDM_MINOR, NULL, NULL, 0));
}
int
-ddi_create_priv_minor_node(dev_info_t *dip, char *name, int spec_type,
- minor_t minor_num, char *node_type, int flag,
+ddi_create_priv_minor_node(dev_info_t *dip, const char *name, int spec_type,
+ minor_t minor_num, const char *node_type, int flag,
const char *rdpriv, const char *wrpriv, mode_t priv_mode)
{
return (ddi_create_minor_common(dip, name, spec_type, minor_num,
@@ -5821,8 +5821,8 @@ ddi_create_priv_minor_node(dev_info_t *dip, char *name, int spec_type,
}
int
-ddi_create_default_minor_node(dev_info_t *dip, char *name, int spec_type,
- minor_t minor_num, char *node_type, int flag)
+ddi_create_default_minor_node(dev_info_t *dip, const char *name, int spec_type,
+ minor_t minor_num, const char *node_type, int flag)
{
return (ddi_create_minor_common(dip, name, spec_type, minor_num,
node_type, flag, DDM_DEFAULT, NULL, NULL, 0));
@@ -5842,7 +5842,7 @@ ddi_create_internal_pathname(dev_info_t *dip, char *name, int spec_type,
}
void
-ddi_remove_minor_node(dev_info_t *dip, char *name)
+ddi_remove_minor_node(dev_info_t *dip, const char *name)
{
int circ;
struct ddi_minor_data *dmdp, *dmdp1;
@@ -8950,7 +8950,7 @@ i_ddi_devi_class(dev_info_t *dip)
}
int
-i_ddi_set_devi_class(dev_info_t *dip, char *devi_class, int flag)
+i_ddi_set_devi_class(dev_info_t *dip, const char *devi_class, int flag)
{
struct dev_info *devi = DEVI(dip);
diff --git a/usr/src/uts/common/sys/dacf_impl.h b/usr/src/uts/common/sys/dacf_impl.h
index 0d30ae061c..094e764c87 100644
--- a/usr/src/uts/common/sys/dacf_impl.h
+++ b/usr/src/uts/common/sys/dacf_impl.h
@@ -121,7 +121,7 @@ void dacf_rsrv_make(dacf_rsrvlist_t *, dacf_rule_t *, void *,
void dacf_process_rsrvs(dacf_rsrvlist_t **, dacf_opid_t, int);
void dacf_clr_rsrvs(dev_info_t *, dacf_opid_t);
-dacf_rule_t *dacf_match(dacf_opid_t, dacf_devspec_t, void *);
+dacf_rule_t *dacf_match(dacf_opid_t, dacf_devspec_t, const void *);
/*
* Failure codes from dacf_op_invoke, assigned to dacf_rsrvlist_t.rsrv_result
@@ -147,7 +147,7 @@ extern int dacfdebug;
* that utilize the dacf framework
*/
-void dacfc_match_create_minor(char *, char *, dev_info_t *,
+void dacfc_match_create_minor(const char *, const char *, dev_info_t *,
struct ddi_minor_data *, int);
int dacfc_postattach(dev_info_t *);
diff --git a/usr/src/uts/common/sys/ddi_impldefs.h b/usr/src/uts/common/sys/ddi_impldefs.h
index 1012c904fd..d8ddb23579 100644
--- a/usr/src/uts/common/sys/ddi_impldefs.h
+++ b/usr/src/uts/common/sys/ddi_impldefs.h
@@ -623,7 +623,7 @@ struct dev_info {
#define DEVI_SET_PCI(dip) (DEVI(dip)->devi_flags |= (DEVI_PCI_DEVICE))
char *i_ddi_devi_class(dev_info_t *);
-int i_ddi_set_devi_class(dev_info_t *, char *, int);
+int i_ddi_set_devi_class(dev_info_t *, const char *, int);
/*
* This structure represents one piece of bus space occupied by a given
@@ -709,7 +709,7 @@ struct ddi_minor {
dev_t dev; /* device number */
int spec_type; /* block or char */
int flags; /* access flags */
- char *node_type; /* block, byte, serial, network */
+ const char *node_type; /* block, byte, serial, network */
struct devplcy *node_priv; /* privilege for this minor */
mode_t priv_mode; /* default apparent privilege mode */
};
diff --git a/usr/src/uts/common/sys/sunddi.h b/usr/src/uts/common/sys/sunddi.h
index e19e5e8b29..0dc4894839 100644
--- a/usr/src/uts/common/sys/sunddi.h
+++ b/usr/src/uts/common/sys/sunddi.h
@@ -1574,16 +1574,16 @@ void
swab(void *src, void *dst, size_t nbytes);
int
-ddi_create_minor_node(dev_info_t *dip, char *name, int spec_type,
- minor_t minor_num, char *node_type, int flag);
+ddi_create_minor_node(dev_info_t *dip, const char *name, int spec_type,
+ minor_t minor_num, const char *node_type, int flag);
int
-ddi_create_priv_minor_node(dev_info_t *dip, char *name, int spec_type,
- minor_t minor_num, char *node_type, int flag,
+ddi_create_priv_minor_node(dev_info_t *dip, const char *name, int spec_type,
+ minor_t minor_num, const char *node_type, int flag,
const char *rdpriv, const char *wrpriv, mode_t priv_mode);
void
-ddi_remove_minor_node(dev_info_t *dip, char *name);
+ddi_remove_minor_node(dev_info_t *dip, const char *name);
int
ddi_in_panic(void);