2 .\" Copyright (c) 1996, Sun Microsystems, Inc. All Rights Reserved
3 .\" 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.
4 .\" 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.
5 .\" 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]
6 .TH CSX_MAKEDEVICENODE 9F "Jul 19, 1996"
8 csx_MakeDeviceNode, csx_RemoveDeviceNode \- create and remove minor nodes on
13 #include <sys/pccard.h>
17 \fBint32_t\fR \fBcsx_MakeDeviceNode\fR(\fBclient_handle_t\fR \fIch\fR, \fBmake_device_node_t *\fR\fIdn\fR);
22 \fBint32_t\fR \fBcsx_RemoveDeviceNode\fR(\fBclient_handle_t\fR \fIch\fR, \fBremove_device_node_t *\fR\fIdn\fR);
28 Solaris \fBDDI \fRSpecific (Solaris \fBDDI) \fR
36 Client handle returned from \fBcsx_RegisterClient\fR(9F).
45 Pointer to a \fBmake_device_node_t\fR or \fBremove_device_node_t\fR structure.
51 \fBcsx_MakeDeviceNode()\fR and \fBcsx_RemoveDeviceNode()\fR are
52 Solaris-specific extensions to allow the client to request that device nodes in
53 the filesystem are created or removed, respectively, on its behalf.
57 The structure members of \fBmake_device_node_t\fR are:
61 uint32_t Action; /* device operation */
62 uint32_t NumDevNodes; /* number of nodes to create */
63 devnode_desc_t *devnode_desc; /* description of device nodes */
69 The structure members of \fBremove_device_node_t\fR are:
73 uint32_t Action; /* device operation */
74 uint32_t NumDevNodes; /* number of nodes to remove */
75 devnode_desc_t *devnode_desc; /* description of device nodes */
81 The structure members of \fBdevnode_desc_t\fR are:
85 char *name; /* device node path and name */
86 int32_t spec_type; /* device special type (block or char) */
87 int32_t minor_num; /* device node minor number */
88 char *node_type; /* device node type */
94 The \fBAction\fR field is used to specify the operation that
95 \fBcsx_MakeDeviceNode()\fR and \fBcsx_RemoveDeviceNode()\fR should perform.
98 The following \fBAction\fR values are defined for \fBcsx_MakeDeviceNode()\fR:
102 \fBCREATE_DEVICE_NODE\fR
105 Create \fBNumDevNodes\fR minor nodes
110 The following \fBAction\fR values are defined for \fBcsx_RemoveDeviceNode()\fR:
114 \fBREMOVE_DEVICE_NODE\fR
117 Remove \fBNumDevNodes\fR minor nodes
123 \fBREMOVE_ALL_DEVICE_NODES\fR
126 Remove all minor nodes for this client
131 For \fBcsx_MakeDeviceNode()\fR, if the \fBAction\fR field is:
135 \fB\fBCREATE_DEVICE_NODE\fR \fR
138 The \fBNumDevNodes\fR field must be set to the number of minor devices to
139 create, and the client must allocate the quantity of \fBdevnode_desc_t\fR
140 structures specified by \fBNumDevNodes\fR and fill out the fields in the
141 \fBdevnode_desc_t\fR structure with the appropriate minor node information. The
142 meanings of the fields in the \fBdevnode_desc_t\fR structure are identical to
143 the parameters of the same name to the \fBddi_create_minor_node\fR(9F) \fBDDI
149 For \fBcsx_RemoveDeviceNode()\fR, if the \fBAction\fR field is:
153 \fB\fBREMOVE_DEVICE_NODE\fR \fR
156 The \fBNumDevNodes\fR field must be set to the number of minor devices to
157 remove, and the client must allocate the quantity of \fBdevnode_desc_t\fR
158 structures specified by \fBNumDevNodes\fR and fill out the fields in the
159 \fBdevnode_desc_t\fR structure with the appropriate minor node information. The
160 meanings of the fields in the \fBdevnode_desc_t\fR structure are identical to
161 the parameters of the same name to the \fBddi_remove_minor_node\fR(9F) \fBDDI
168 \fB\fBREMOVE_ALL_DEVICE_NODES\fR \fR
171 The \fBNumDevNodes\fR field must be set to \fB0\fR and the \fBdevnode_desc_t\fR
172 structure pointer must be set to \fINULL\fR. All device nodes for this client
173 will be removed from the filesystem.
180 \fB\fBCS_SUCCESS\fR \fR
183 Successful operation.
189 \fB\fBCS_BAD_HANDLE\fR \fR
192 Client handle is invalid.
198 \fB\fBCS_BAD_ATTRIBUTE\fR \fR
201 The value of one or more arguments is invalid.
207 \fB\fBCS_BAD_ARGS\fR \fR
216 \fB\fBCS_OUT_OF_RESOURCE\fR \fR
219 Unable to create or remove device node.
225 \fB\fBCS_UNSUPPORTED_FUNCTION\fR \fR
228 No \fBPCMCIA \fRhardware installed.
234 These functions may be called from user or kernel context.
238 \fBcsx_RegisterClient\fR(9F), \fBddi_create_minor_node\fR(9F),
239 \fBddi_remove_minor_node\fR(9F)
242 \fIPC Card 95 Standard, PCMCIA/JEIDA\fR