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_Error2Text(error2text_t *er);
Solaris DDI Specific (Solaris DDI)
er
Pointer to an error2text_t structure.
This function is a Solaris-specific extension that provides a method for clients to convert Card Services error return codes to text strings.
The structure members of error2text_t are:
uint32_t item; /*the error code*/ char test[CS_ERROR_MAX_BUFSIZE}; /*the error code*/
A pointer to the text for the Card Services error return code in the item field is returned in the text field if the error return code is found. The client is not responsible for allocating a buffer to hold the text. If the Card Services error return code specified in the item field is not found, the text field will be set to a string of the form:
"{unknown Card Services return code}"
CS_SUCCESS
Successful operation.
CS_UNSUPPORTED_FUNCTION
No PCMCIA hardware installed.
This function may be called from user or kernel context.
Example 1 : Using the csxError2Text function
if ((ret = csx_RegisterClient(&client_handle, & client_reg)) != CS_SUCCESS) { error2text_t error2text; error2text.item = ret; csx_Error2Text(&error2text); cmn_err(CE_CONT, "RegisterClient failed %s (0x%x)", error2text.text, ret); }
csx_Event2Text(9F)