Copyright (c) 1996, Sun Microsystems, Inc. All Rights Reserved
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
#include <sys/pccard.h> int32_t csx_MakeDeviceNode(client_handle_t ch, make_device_node_t *dn);
int32_t csx_RemoveDeviceNode(client_handle_t ch, remove_device_node_t *dn);
Client handle returned from csx_RegisterClient(9F).
Pointer to a make_device_node_t or remove_device_node_t structure.
uint32_t Action; /* device operation */ uint32_t NumDevNodes; /* number of nodes to create */ devnode_desc_t *devnode_desc; /* description of device nodes */
The structure members of remove_device_node_t are:
uint32_t Action; /* device operation */ uint32_t NumDevNodes; /* number of nodes to remove */ devnode_desc_t *devnode_desc; /* description of device nodes */
The structure members of devnode_desc_t are:
char *name; /* device node path and name */ int32_t spec_type; /* device special type (block or char) */ int32_t minor_num; /* device node minor number */ char *node_type; /* device node type */
The Action field is used to specify the operation that csx_MakeDeviceNode() and csx_RemoveDeviceNode() should perform.
The following Action values are defined for csx_MakeDeviceNode(): CREATE_DEVICE_NODE
Create NumDevNodes minor nodes
The following Action values are defined for csx_RemoveDeviceNode(): REMOVE_DEVICE_NODE
Remove NumDevNodes minor nodes
Remove all minor nodes for this client
For csx_MakeDeviceNode(), if the Action field is: CREATE_DEVICE_NODE
The NumDevNodes field must be set to the number of minor devices to create, and the client must allocate the quantity of devnode_desc_t structures specified by NumDevNodes and fill out the fields in the devnode_desc_t structure with the appropriate minor node information. The meanings of the fields in the devnode_desc_t structure are identical to the parameters of the same name to the ddi_create_minor_node(9F) DDI function.
For csx_RemoveDeviceNode(), if the Action field is: REMOVE_DEVICE_NODE
The NumDevNodes field must be set to the number of minor devices to remove, and the client must allocate the quantity of devnode_desc_t structures specified by NumDevNodes and fill out the fields in the devnode_desc_t structure with the appropriate minor node information. The meanings of the fields in the devnode_desc_t structure are identical to the parameters of the same name to the ddi_remove_minor_node(9F) DDI function.
The NumDevNodes field must be set to 0 and the devnode_desc_t structure pointer must be set to NULL. All device nodes for this client will be removed from the filesystem.
Successful operation.
Client handle is invalid.
The value of one or more arguments is invalid.
Action is invalid.
Unable to create or remove device node.
No PCMCIA hardware installed.