1 '\" te
   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"
   7 .SH NAME
   8 csx_MakeDeviceNode, csx_RemoveDeviceNode \- create and remove minor nodes on
   9 behalf of the client
  10 .SH SYNOPSIS
  11 .LP
  12 .nf
  13 #include <sys/pccard.h>
  14 
  15 
  16 
  17 \fBint32_t\fR \fBcsx_MakeDeviceNode\fR(\fBclient_handle_t\fR \fIch\fR, \fBmake_device_node_t *\fR\fIdn\fR);
  18 .fi
  19 
  20 .LP
  21 .nf
  22 \fBint32_t\fR \fBcsx_RemoveDeviceNode\fR(\fBclient_handle_t\fR \fIch\fR, \fBremove_device_node_t *\fR\fIdn\fR);
  23 .fi
  24 
  25 .SH INTERFACE LEVEL
  26 .sp
  27 .LP
  28 Solaris \fBDDI \fRSpecific (Solaris \fBDDI) \fR
  29 .SH PARAMETERS
  30 .sp
  31 .ne 2
  32 .na
  33 \fB\fIch\fR \fR
  34 .ad
  35 .RS 7n
  36 Client handle returned from \fBcsx_RegisterClient\fR(9F).
  37 .RE
  38 
  39 .sp
  40 .ne 2
  41 .na
  42 \fB\fIdn\fR \fR
  43 .ad
  44 .RS 7n
  45 Pointer to a \fBmake_device_node_t\fR or \fBremove_device_node_t\fR structure.
  46 .RE
  47 
  48 .SH DESCRIPTION
  49 .sp
  50 .LP
  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.
  54 .SH STRUCTURE MEMBERS
  55 .sp
  56 .LP
  57 The structure members of \fBmake_device_node_t\fR are:
  58 .sp
  59 .in +2
  60 .nf
  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 */
  64 .fi
  65 .in -2
  66 
  67 .sp
  68 .LP
  69 The structure members of \fBremove_device_node_t\fR are:
  70 .sp
  71 .in +2
  72 .nf
  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 */
  76 .fi
  77 .in -2
  78 
  79 .sp
  80 .LP
  81 The structure members of \fBdevnode_desc_t\fR are:
  82 .sp
  83 .in +2
  84 .nf
  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 */
  89 .fi
  90 .in -2
  91 
  92 .sp
  93 .LP
  94 The \fBAction\fR field is used to specify the operation that
  95 \fBcsx_MakeDeviceNode()\fR and \fBcsx_RemoveDeviceNode()\fR should perform.
  96 .sp
  97 .LP
  98 The following \fBAction\fR values are defined for \fBcsx_MakeDeviceNode()\fR:
  99 .sp
 100 .ne 2
 101 .na
 102 \fBCREATE_DEVICE_NODE\fR
 103 .ad
 104 .RS 22n
 105 Create \fBNumDevNodes\fR minor nodes
 106 .RE
 107 
 108 .sp
 109 .LP
 110 The following \fBAction\fR values are defined for \fBcsx_RemoveDeviceNode()\fR:
 111 .sp
 112 .ne 2
 113 .na
 114 \fBREMOVE_DEVICE_NODE\fR
 115 .ad
 116 .RS 27n
 117 Remove \fBNumDevNodes\fR minor nodes
 118 .RE
 119 
 120 .sp
 121 .ne 2
 122 .na
 123 \fBREMOVE_ALL_DEVICE_NODES\fR
 124 .ad
 125 .RS 27n
 126 Remove all minor nodes for this client
 127 .RE
 128 
 129 .sp
 130 .LP
 131 For \fBcsx_MakeDeviceNode()\fR, if the \fBAction\fR field is:
 132 .sp
 133 .ne 2
 134 .na
 135 \fB\fBCREATE_DEVICE_NODE\fR \fR
 136 .ad
 137 .RS 23n
 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
 144 \fRfunction.
 145 .RE
 146 
 147 .sp
 148 .LP
 149 For \fBcsx_RemoveDeviceNode()\fR, if the \fBAction\fR field is:
 150 .sp
 151 .ne 2
 152 .na
 153 \fB\fBREMOVE_DEVICE_NODE\fR \fR
 154 .ad
 155 .RS 28n
 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
 162 \fRfunction.
 163 .RE
 164 
 165 .sp
 166 .ne 2
 167 .na
 168 \fB\fBREMOVE_ALL_DEVICE_NODES\fR \fR
 169 .ad
 170 .RS 28n
 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.
 174 .RE
 175 
 176 .SH RETURN VALUES
 177 .sp
 178 .ne 2
 179 .na
 180 \fB\fBCS_SUCCESS\fR \fR
 181 .ad
 182 .RS 28n
 183 Successful operation.
 184 .RE
 185 
 186 .sp
 187 .ne 2
 188 .na
 189 \fB\fBCS_BAD_HANDLE\fR \fR
 190 .ad
 191 .RS 28n
 192 Client handle is invalid.
 193 .RE
 194 
 195 .sp
 196 .ne 2
 197 .na
 198 \fB\fBCS_BAD_ATTRIBUTE\fR \fR
 199 .ad
 200 .RS 28n
 201 The value of one or more arguments is invalid.
 202 .RE
 203 
 204 .sp
 205 .ne 2
 206 .na
 207 \fB\fBCS_BAD_ARGS\fR \fR
 208 .ad
 209 .RS 28n
 210 Action is invalid.
 211 .RE
 212 
 213 .sp
 214 .ne 2
 215 .na
 216 \fB\fBCS_OUT_OF_RESOURCE\fR \fR
 217 .ad
 218 .RS 28n
 219 Unable to create or remove device node.
 220 .RE
 221 
 222 .sp
 223 .ne 2
 224 .na
 225 \fB\fBCS_UNSUPPORTED_FUNCTION\fR \fR
 226 .ad
 227 .RS 28n
 228 No \fBPCMCIA \fRhardware installed.
 229 .RE
 230 
 231 .SH CONTEXT
 232 .sp
 233 .LP
 234 These functions may be called from user or kernel context.
 235 .SH SEE ALSO
 236 .sp
 237 .LP
 238 \fBcsx_RegisterClient\fR(9F), \fBddi_create_minor_node\fR(9F),
 239 \fBddi_remove_minor_node\fR(9F)
 240 .sp
 241 .LP
 242 \fIPC Card 95 Standard, PCMCIA/JEIDA\fR